depot/third_party/nixpkgs/pkgs/applications/misc/liberasurecode/default.nix
Default email 504525a148 Project import generated by Copybara.
GitOrigin-RevId: bd645e8668ec6612439a9ee7e71f7eac4099d4f6
2024-01-02 12:29:13 +01:00

56 lines
1.2 KiB
Nix

{ lib
, stdenv
, fetchFromGitHub
, autoreconfHook
, doxygen
, installShellFiles
, zlib
}:
stdenv.mkDerivation rec {
pname = "liberasurecode";
version = "1.6.3";
outputs = [ "out" "dev" "doc" ];
src = fetchFromGitHub {
owner = "openstack";
repo = pname;
rev = version;
sha256 = "sha256-HCp+FQ9nq4twk6FtfKhzT80wXXJbvG+clrDO2/9ATpU=";
};
postPatch = ''
substituteInPlace doc/doxygen.cfg.in \
--replace "GENERATE_MAN = NO" "GENERATE_MAN = YES"
substituteInPlace Makefile.am src/Makefile.am \
--replace "-Werror" ""
'';
nativeBuildInputs = [ autoreconfHook doxygen installShellFiles ];
buildInputs = [ zlib ];
configureFlags = [
"--disable-werror"
"--enable-doxygen"
];
postInstall = ''
# remove useless man pages about directories
rm doc/man/man*/_*
installManPage doc/man/man*/*
moveToOutput share/liberasurecode/ $doc
'';
checkTarget = "test";
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;
};
}