depot/third_party/nixpkgs/pkgs/development/python-modules/pplpy/default.nix
Default email 8ac5e011d6 Project import generated by Copybara.
GitOrigin-RevId: 2c3273caa153ee8eb5786bc8141b85b859e7efd7
2020-04-24 19:36:52 -04:00

62 lines
1.1 KiB
Nix

{ lib
, fetchPypi
, buildPythonPackage
, gmp
, mpfr
, libmpc
, ppl
, cython
, cysignals
, gmpy2
, sphinx
}:
buildPythonPackage rec {
pname = "pplpy";
version = "0.8.4";
src = fetchPypi {
inherit pname version;
sha256 = "0dk8l5r3f2jbkkasddvxwvhlq35pjsiirh801lrapv8lb16r2qmr";
};
buildInputs = [
gmp
mpfr
libmpc
ppl
];
nativeBuildInputs = [
sphinx # docbuild, called by make
];
propagatedBuildInputs = [
cython
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 = with maintainers; [ timokau ];
license = licenses.gpl3;
};
}