depot/third_party/nixpkgs/pkgs/development/python-modules/pplpy/default.nix
Default email 23b612e36f Project import generated by Copybara.
GitOrigin-RevId: ae5c332cbb5827f6b1f02572496b141021de335f
2024-01-25 23:12:00 +09:00

63 lines
1.1 KiB
Nix

{ lib
, fetchPypi
, buildPythonPackage
, gmp
, mpfr
, libmpc
, ppl
, cython_3
, cysignals
, gmpy2
, sphinx
}:
buildPythonPackage rec {
pname = "pplpy";
version = "0.8.9";
format = "setuptools";
src = fetchPypi {
inherit pname version;
sha256 = "sha256-23o7Vx1u8FP3UTeXXpR8OhweRaMLq5Dq8hW05cwVeX4=";
};
buildInputs = [
gmp
mpfr
libmpc
ppl
];
nativeBuildInputs = [
sphinx # docbuild, called by make
];
propagatedBuildInputs = [
cython_3
cysignals
gmpy2
];
outputs = [ "out" "doc" ];
postBuild = ''
# Find the build result in order to put it into PYTHONPATH. The doc
# build needs to import pplpy.
build_result="$PWD/$( find build/ -type d -name 'lib.*' | head -n1 )"
echo "Building documentation"
PYTHONPATH="$build_result:$PYTHONPATH" make -C docs html
'';
postInstall = ''
mkdir -p "$doc/share/doc"
mv docs/build/html "$doc/share/doc/pplpy"
'';
meta = with lib; {
description = "A Python wrapper for ppl";
homepage = "https://gitlab.com/videlec/pplpy";
maintainers = teams.sage.members;
license = licenses.gpl3;
};
}