Luke Granger-Brown
57725ef3ec
git-subtree-dir: third_party/nixpkgs git-subtree-split: 76612b17c0ce71689921ca12d9ffdc9c23ce40b2
71 lines
1.4 KiB
Nix
71 lines
1.4 KiB
Nix
{
|
|
lib,
|
|
autoreconfHook,
|
|
docbook_xml_dtd_43,
|
|
docbook_xsl,
|
|
fetchFromGitHub,
|
|
gettext,
|
|
gmp,
|
|
gtk-doc,
|
|
libxslt,
|
|
mpfr,
|
|
pcre2,
|
|
pkg-config,
|
|
python3Packages,
|
|
stdenv,
|
|
}:
|
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
|
pname = "libbytesize";
|
|
version = "2.11";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "storaged-project";
|
|
repo = "libbytesize";
|
|
rev = finalAttrs.version;
|
|
hash = "sha256-scOnucn7xp6KKEtkpwfyrdzcntJF2l0h0fsQotcceLc=";
|
|
};
|
|
|
|
outputs = [
|
|
"out"
|
|
"dev"
|
|
"devdoc"
|
|
"man"
|
|
];
|
|
|
|
nativeBuildInputs = [
|
|
autoreconfHook
|
|
docbook_xml_dtd_43
|
|
docbook_xsl
|
|
gettext
|
|
gtk-doc
|
|
libxslt
|
|
pkg-config
|
|
python3Packages.python
|
|
python3Packages.pythonImportsCheckHook
|
|
];
|
|
|
|
buildInputs = [
|
|
gmp
|
|
mpfr
|
|
pcre2
|
|
];
|
|
|
|
strictDeps = true;
|
|
|
|
postInstall = ''
|
|
substituteInPlace $out/${python3Packages.python.sitePackages}/bytesize/bytesize.py \
|
|
--replace-fail 'CDLL("libbytesize.so.1")' "CDLL('$out/lib/libbytesize.so.1')"
|
|
'';
|
|
|
|
pythonImportsCheck = [ "bytesize" ];
|
|
|
|
meta = {
|
|
homepage = "https://github.com/storaged-project/libbytesize";
|
|
description = "Tiny library providing a C 'class' for working with arbitrary big sizes in bytes";
|
|
license = lib.licenses.lgpl2Plus;
|
|
mainProgram = "bscalc";
|
|
maintainers = with lib.maintainers; [ AndersonTorres ];
|
|
platforms = lib.platforms.linux;
|
|
};
|
|
})
|