Files
nixpkgs/pkgs/by-name/li/liberasurecode/package.nix
Ihar Hrachyshka 567e8dfd8e treewide: clean up 'meta = with' pattern
This commit was created by a combination of scripts and tools:
- an ast-grep script to prefix things in meta with `lib.`,
- a modified nixf-diagnose / nixf combination to remove unused `with
lib;`, and
- regular nixfmt.

Co-authored-by: Wolfgang Walther <walther@technowledgy.de>
2025-12-10 18:09:49 +01:00

73 lines
1.5 KiB
Nix

{
lib,
stdenv,
autoreconfHook,
doxygen,
fetchFromGitHub,
installShellFiles,
testers,
zlib,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "liberasurecode";
version = "1.6.5";
outputs = [
"out"
"dev"
"doc"
];
src = fetchFromGitHub {
owner = "openstack";
repo = "liberasurecode";
tag = finalAttrs.version;
hash = "sha256-242p6lyLM+0UpuYvQqz87Z1S0oayxGXz7CZJW7fbgBk=";
};
postPatch = ''
substituteInPlace doc/doxygen.cfg.in \
--replace-fail "GENERATE_MAN = NO" "GENERATE_MAN = YES"
substituteInPlace Makefile.am src/Makefile.am \
--replace-fail "-Werror" ""
'';
nativeBuildInputs = [
autoreconfHook
doxygen
installShellFiles
];
buildInputs = [ zlib ];
configureFlags = [
"--disable-werror"
"--enable-doxygen"
];
postInstall = ''
# remove useless man pages about directories
rm doc/man/man*/_*
# avoid installing doc/man/man3/noname
installManPage doc/man/man*/*.*
moveToOutput share/liberasurecode/ $doc
'';
checkTarget = "test";
passthru.tests.pkg-config = testers.hasPkgConfigModules {
package = finalAttrs.finalPackage;
};
meta = {
description = "Erasure Code API library written in C with pluggable Erasure Code backends";
homepage = "https://github.com/openstack/liberasurecode";
license = lib.licenses.bsd2;
teams = [ lib.teams.openstack ];
pkgConfigModules = [ "erasurecode-1" ];
};
})