summary refs log tree commit diff
path: root/pkgs/applications/misc/liberasurecode/default.nix
blob: 289423c61220e4faf1f21a0d22ab2e27f5932d59 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
{ lib
, stdenv
, fetchFromGitHub
, autoreconfHook
, doxygen
, installShellFiles
, zlib
}:

stdenv.mkDerivation rec {
  pname = "liberasurecode";
  version = "1.6.3";

  outputs = [ "out" "dev" "doc" ];

  src = fetchFromGitHub {
    owner = "openstack";
    repo = pname;
    rev = version;
    sha256 = "sha256-HCp+FQ9nq4twk6FtfKhzT80wXXJbvG+clrDO2/9ATpU=";
  };

  postPatch = ''
    substituteInPlace doc/doxygen.cfg.in \
      --replace "GENERATE_MAN           = NO" "GENERATE_MAN           = YES"
  '';

  nativeBuildInputs = [ autoreconfHook doxygen installShellFiles ];

  buildInputs = [ zlib ];

  configureFlags = [ "--enable-doxygen" ];

  postInstall = ''
    # remove useless man pages about directories
    rm doc/man/man*/_*
    installManPage doc/man/man*/*

    moveToOutput share/liberasurecode/ $doc
  '';

  checkTarget = "test";

  meta = with lib; {
    description = "Erasure Code API library written in C with pluggable Erasure Code backends";
    homepage = "https://github.com/openstack/liberasurecode";
    license = licenses.bsd2;
    maintainers = teams.openstack.members;
  };
}