Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 stdenv, 4 autoreconfHook, 5 doxygen, 6 fetchFromGitHub, 7 installShellFiles, 8 testers, 9 zlib, 10}: 11 12stdenv.mkDerivation (finalAttrs: { 13 pname = "liberasurecode"; 14 version = "1.6.5"; 15 16 outputs = [ 17 "out" 18 "dev" 19 "doc" 20 ]; 21 22 src = fetchFromGitHub { 23 owner = "openstack"; 24 repo = "liberasurecode"; 25 tag = finalAttrs.version; 26 hash = "sha256-242p6lyLM+0UpuYvQqz87Z1S0oayxGXz7CZJW7fbgBk="; 27 }; 28 29 postPatch = '' 30 substituteInPlace doc/doxygen.cfg.in \ 31 --replace-fail "GENERATE_MAN = NO" "GENERATE_MAN = YES" 32 33 substituteInPlace Makefile.am src/Makefile.am \ 34 --replace-fail "-Werror" "" 35 ''; 36 37 nativeBuildInputs = [ 38 autoreconfHook 39 doxygen 40 installShellFiles 41 ]; 42 43 buildInputs = [ zlib ]; 44 45 configureFlags = [ 46 "--disable-werror" 47 "--enable-doxygen" 48 ]; 49 50 postInstall = '' 51 # remove useless man pages about directories 52 rm doc/man/man*/_* 53 installManPage doc/man/man*/* 54 55 moveToOutput share/liberasurecode/ $doc 56 ''; 57 58 checkTarget = "test"; 59 60 passthru.tests.pkg-config = testers.hasPkgConfigModules { 61 package = finalAttrs.finalPackage; 62 }; 63 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 teams = [ teams.openstack ]; 69 pkgConfigModules = [ "erasurecode-1" ]; 70 }; 71})