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