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

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

76 lines
1.4 KiB
Nix
Raw Normal View History

2024-08-25 14:30:29 +00:00
{
lib,
autoreconfHook,
docbook_xml_dtd_43,
docbook_xsl,
fetchFromGitHub,
gettext,
gmp,
gtk-doc,
libxslt,
mpfr,
pcre2,
pkg-config,
2023-12-24 13:33:39 +00:00
python3Packages,
2024-08-25 14:30:29 +00:00
stdenv,
2018-02-25 13:12:21 +00:00
}:
2023-04-21 14:44:19 +00:00
stdenv.mkDerivation (finalAttrs: {
2019-08-13 21:52:01 +00:00
pname = "libbytesize";
2024-08-25 14:34:55 +00:00
version = "2.11";
2018-02-25 13:12:21 +00:00
src = fetchFromGitHub {
owner = "storaged-project";
repo = "libbytesize";
2023-04-21 14:44:19 +00:00
rev = finalAttrs.version;
2024-08-25 14:34:55 +00:00
hash = "sha256-scOnucn7xp6KKEtkpwfyrdzcntJF2l0h0fsQotcceLc=";
2018-02-25 13:12:21 +00:00
};
2024-08-25 14:30:29 +00:00
outputs = [
"out"
"dev"
"devdoc"
"man"
];
2018-02-25 13:12:21 +00:00
2023-04-12 02:15:19 +00:00
nativeBuildInputs = [
autoreconfHook
docbook_xml_dtd_43
docbook_xsl
gettext
gtk-doc
libxslt
pkg-config
2023-12-24 13:33:39 +00:00
python3Packages.python
];
nativeInstallCheckInputs = [
2023-12-24 13:33:39 +00:00
python3Packages.pythonImportsCheckHook
2023-04-12 02:15:19 +00:00
];
2018-02-25 13:12:21 +00:00
2023-04-12 02:15:19 +00:00
buildInputs = [
gmp
mpfr
pcre2
];
2018-02-25 13:12:21 +00:00
doInstallCheck = true;
2023-07-09 22:55:26 +00:00
strictDeps = true;
2023-12-24 13:33:39 +00:00
postInstall = ''
substituteInPlace $out/${python3Packages.python.sitePackages}/bytesize/bytesize.py \
--replace-fail 'CDLL("libbytesize.so.1")' "CDLL('$out/lib/libbytesize.so.1')"
'';
pythonImportsCheck = [ "bytesize" ];
2023-04-12 02:15:19 +00:00
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;
2024-08-25 14:30:29 +00:00
mainProgram = "bscalc";
2023-04-12 02:15:19 +00:00
maintainers = with lib.maintainers; [ AndersonTorres ];
platforms = lib.platforms.linux;
2018-02-25 13:12:21 +00:00
};
2023-04-12 02:15:19 +00:00
})