python312Packages.llama-index: 0.12.9 -> 0.12.9.post1 (#371957)
[NixPkgs.git] / pkgs / by-name / li / liberasurecode / package.nix
blob058e3e155ab8293bfaa8dcb06be4362eefddabe9
2   lib,
3   stdenv,
4   autoreconfHook,
5   doxygen,
6   fetchFromGitHub,
7   installShellFiles,
8   testers,
9   zlib,
12 stdenv.mkDerivation (finalAttrs: {
13   pname = "liberasurecode";
14   version = "1.6.5";
16   outputs = [
17     "out"
18     "dev"
19     "doc"
20   ];
22   src = fetchFromGitHub {
23     owner = "openstack";
24     repo = "liberasurecode";
25     tag = finalAttrs.version;
26     hash = "sha256-242p6lyLM+0UpuYvQqz87Z1S0oayxGXz7CZJW7fbgBk=";
27   };
29   postPatch = ''
30     substituteInPlace doc/doxygen.cfg.in \
31       --replace-fail "GENERATE_MAN           = NO" "GENERATE_MAN           = YES"
33     substituteInPlace Makefile.am src/Makefile.am \
34       --replace-fail "-Werror" ""
35   '';
37   nativeBuildInputs = [
38     autoreconfHook
39     doxygen
40     installShellFiles
41   ];
43   buildInputs = [ zlib ];
45   configureFlags = [
46     "--disable-werror"
47     "--enable-doxygen"
48   ];
50   postInstall = ''
51     # remove useless man pages about directories
52     rm doc/man/man*/_*
53     installManPage doc/man/man*/*
55     moveToOutput share/liberasurecode/ $doc
56   '';
58   checkTarget = "test";
60   passthru.tests.pkg-config = testers.hasPkgConfigModules {
61     package = finalAttrs.finalPackage;
62   };
64   meta = with lib; {
65     description = "Erasure Code API library written in C with pluggable Erasure Code backends";
66     homepage = "https://github.com/openstack/liberasurecode";
67     license = licenses.bsd2;
68     maintainers = teams.openstack.members;
69     pkgConfigModules = [ "erasurecode-1" ];
70   };