Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at 20.09-beta 55 lines 1.3 kB view raw
1{ stdenv 2, buildPythonPackage 3, python 4, fetchPypi 5, pari 6, gmp 7, cython 8, cysignals 9}: 10 11buildPythonPackage rec { 12 pname = "cypari2"; 13 # upgrade may break sage, please test the sage build or ping @timokau on upgrade 14 version = "2.1.1"; 15 16 src = fetchPypi { 17 inherit pname version; 18 sha256 = "df1ef62e771ec36e5a456f5fc8b51bc6745b70f0efdd0c7a30c3f0b5f1fb93db"; 19 }; 20 21 # This differs slightly from the default python installPhase in that it pip-installs 22 # "." instead of "*.whl". 23 # That is because while the default install phase succeeds to build the package, 24 # it fails to generate the file "auto_paridecl.pxd". 25 installPhase = '' 26 export PYTHONPATH="$out/${python.sitePackages}:$PYTHONPATH" 27 28 # install "." instead of "*.whl" 29 ${python.pythonForBuild.pkgs.bootstrapped-pip}/bin/pip install --no-index --prefix=$out --no-cache --build=tmpdir . 30 ''; 31 32 nativeBuildInputs = [ 33 pari 34 ]; 35 36 buildInputs = [ 37 gmp 38 ]; 39 40 propagatedBuildInputs = [ 41 cysignals 42 cython 43 ]; 44 45 checkPhase = '' 46 make check 47 ''; 48 49 meta = with stdenv.lib; { 50 description = "Cython bindings for PARI"; 51 license = licenses.gpl2; 52 maintainers = with maintainers; [ timokau ]; 53 homepage = "https://github.com/defeo/cypari2"; 54 }; 55}