storj-uplink: 1.119.15 -> 1.120.4 (#375732)
[NixPkgs.git] / pkgs / by-name / li / libbytesize / package.nix
blob2e29b8b299060377935cc906476659e370a36b4b
2   lib,
3   autoreconfHook,
4   docbook_xml_dtd_43,
5   docbook_xsl,
6   fetchFromGitHub,
7   gettext,
8   gmp,
9   gtk-doc,
10   libxslt,
11   mpfr,
12   pcre2,
13   pkg-config,
14   python3Packages,
15   stdenv,
18 stdenv.mkDerivation (finalAttrs: {
19   pname = "libbytesize";
20   version = "2.11";
22   src = fetchFromGitHub {
23     owner = "storaged-project";
24     repo = "libbytesize";
25     rev = finalAttrs.version;
26     hash = "sha256-scOnucn7xp6KKEtkpwfyrdzcntJF2l0h0fsQotcceLc=";
27   };
29   outputs = [
30     "out"
31     "dev"
32     "devdoc"
33     "man"
34   ];
36   nativeBuildInputs = [
37     autoreconfHook
38     docbook_xml_dtd_43
39     docbook_xsl
40     gettext
41     gtk-doc
42     libxslt
43     pkg-config
44     python3Packages.python
45   ];
47   nativeInstallCheckInputs = [
48     python3Packages.pythonImportsCheckHook
49   ];
51   buildInputs = [
52     gmp
53     mpfr
54     pcre2
55   ];
57   doInstallCheck = true;
58   strictDeps = true;
60   postInstall = ''
61     substituteInPlace $out/${python3Packages.python.sitePackages}/bytesize/bytesize.py \
62       --replace-fail 'CDLL("libbytesize.so.1")' "CDLL('$out/lib/libbytesize.so.1')"
63   '';
65   pythonImportsCheck = [ "bytesize" ];
67   meta = {
68     homepage = "https://github.com/storaged-project/libbytesize";
69     description = "Tiny library providing a C 'class' for working with arbitrary big sizes in bytes";
70     license = lib.licenses.lgpl2Plus;
71     mainProgram = "bscalc";
72     maintainers = with lib.maintainers; [ AndersonTorres ];
73     platforms = lib.platforms.linux;
74   };