nixpkgs/pkgs/by-name/li/liberasurecode/package.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

72 lines
1.4 KiB
Nix
Raw Normal View History

{
lib,
stdenv,
autoreconfHook,
doxygen,
fetchFromGitHub,
installShellFiles,
testers,
zlib,
2022-01-21 00:48:14 +00:00
}:
2021-10-07 14:51:54 +00:00
stdenv.mkDerivation (finalAttrs: {
2021-10-07 14:51:54 +00:00
pname = "liberasurecode";
version = "1.6.4";
2021-10-07 14:51:54 +00:00
outputs = [
"out"
"dev"
"doc"
];
2021-10-07 14:51:54 +00:00
src = fetchFromGitHub {
owner = "openstack";
repo = "liberasurecode";
rev = "refs/tags/${finalAttrs.version}";
hash = "sha256-KYXlRjUudWhFbhyv9V1fmqwBw3/vTBfusxafaNG+Q40=";
2021-10-07 14:51:54 +00:00
};
2022-01-21 00:48:14 +00:00
postPatch = ''
substituteInPlace doc/doxygen.cfg.in \
--replace-fail "GENERATE_MAN = NO" "GENERATE_MAN = YES"
2023-12-01 01:25:18 +00:00
substituteInPlace Makefile.am src/Makefile.am \
--replace-fail "-Werror" ""
2022-01-21 00:48:14 +00:00
'';
nativeBuildInputs = [
autoreconfHook
doxygen
installShellFiles
];
2021-10-07 14:51:54 +00:00
buildInputs = [ zlib ];
configureFlags = [
2023-12-01 01:25:18 +00:00
"--disable-werror"
"--enable-doxygen"
];
2022-01-21 00:48:14 +00:00
postInstall = ''
# remove useless man pages about directories
rm doc/man/man*/_*
installManPage doc/man/man*/*
moveToOutput share/liberasurecode/ $doc
'';
checkTarget = "test";
passthru.tests.pkg-config = testers.hasPkgConfigModules {
package = finalAttrs.finalPackage;
};
2021-10-07 14:51:54 +00:00
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;
pkgConfigModules = [ "erasurecode-1" ];
2021-10-07 14:51:54 +00:00
};
})