Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at 20.09 1.3 kB view raw
1{ lib 2, fetchPypi 3, buildPythonPackage 4, cython 5, pariSupport ? true, pari # for interfacing with the PARI/GP signal handler 6}: 7 8assert pariSupport -> pari != null; 9 10buildPythonPackage rec { 11 pname = "cysignals"; 12 version = "1.10.2"; 13 14 src = fetchPypi { 15 inherit pname version; 16 sha256 = "1ckxzch3wk5cg80mppky5jib5z4fzslny3001r5zg4ar1ixbc1w1"; 17 }; 18 19 # explicit check: 20 # build/src/cysignals/implementation.c:27:2: error: #error "cysignals must be compiled without _FORTIFY_SOURCE" 21 hardeningDisable = [ 22 "fortify" 23 ]; 24 25 # known failure: https://github.com/sagemath/cysignals/blob/582dbf6a7b0f9ade0abe7a7b8720b7fb32435c3c/testgdb.py#L5 26 doCheck = false; 27 checkTarget = "check-install"; 28 29 preCheck = '' 30 # Make sure cysignals-CSI is in PATH 31 export PATH="$out/bin:$PATH" 32 ''; 33 34 propagatedBuildInputs = [ 35 cython 36 ] ++ lib.optionals pariSupport [ 37 # When cysignals is built with pari, including cysignals into the 38 # buildInputs of another python package will cause cython to link against 39 # pari. 40 pari 41 ]; 42 43 enableParallelBuilding = true; 44 45 meta = { 46 description = "Interrupt and signal handling for Cython"; 47 homepage = "https://github.com/sagemath/cysignals/"; 48 maintainers = with lib.maintainers; [ timokau ]; 49 license = lib.licenses.lgpl3Plus; 50 }; 51}