1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-25 03:17:13 +00:00
nixpkgs/pkgs/development/python-modules/cypari2/default.nix

56 lines
1.2 KiB
Nix
Raw Normal View History

2018-04-11 17:25:50 +01:00
{ stdenv
, buildPythonPackage
, python
, fetchPypi
, pari
, gmp
, cython
, cysignals
}:
buildPythonPackage rec {
pname = "cypari2";
2018-10-22 12:26:13 +01:00
# upgrade may break sage, please test the sage build or ping @timokau on upgrade
2019-04-24 17:42:48 +01:00
version = "2.1.1";
2018-04-11 17:25:50 +01:00
src = fetchPypi {
inherit pname version;
2019-04-24 17:42:48 +01:00
sha256 = "df1ef62e771ec36e5a456f5fc8b51bc6745b70f0efdd0c7a30c3f0b5f1fb93db";
2018-04-11 17:25:50 +01:00
};
# This differs slightly from the default python installPhase in that it pip-installs
# "." instead of "*.whl".
# That is because while the default install phase succeeds to build the package,
# it fails to generate the file "auto_paridecl.pxd".
installPhase = ''
export PYTHONPATH="$out/${python.sitePackages}:$PYTHONPATH"
2018-04-11 17:25:50 +01:00
# install "." instead of "*.whl"
${python.pythonForBuild.pkgs.bootstrapped-pip}/bin/pip install --no-index --prefix=$out --no-cache --build=tmpdir .
2018-04-11 17:25:50 +01:00
'';
nativeBuildInputs = [
2018-04-11 17:25:50 +01:00
pari
];
buildInputs = [
2018-04-11 17:25:50 +01:00
gmp
];
propagatedBuildInputs = [
cysignals
cython
];
checkPhase = ''
make check
'';
meta = with stdenv.lib; {
description = "Cython bindings for PARI";
license = licenses.gpl2;
maintainers = with maintainers; [ timokau ];
homepage = "https://github.com/defeo/cypari2";
2018-04-11 17:25:50 +01:00
};
}