diff options
Diffstat (limited to 'pkgs/development/python-modules/cysignals/default.nix')
-rw-r--r-- | pkgs/development/python-modules/cysignals/default.nix | 41 |
1 files changed, 24 insertions, 17 deletions
diff --git a/pkgs/development/python-modules/cysignals/default.nix b/pkgs/development/python-modules/cysignals/default.nix index 62cc3dd30d8af..9e90eaf38f19d 100644 --- a/pkgs/development/python-modules/cysignals/default.nix +++ b/pkgs/development/python-modules/cysignals/default.nix @@ -1,9 +1,14 @@ -{ lib -, autoreconfHook -, fetchPypi -, buildPythonPackage -, cython -, pariSupport ? true, pari # for interfacing with the PARI/GP signal handler +{ + lib, + autoreconfHook, + fetchPypi, + buildPythonPackage, + cython, + pariSupport ? true, + pari, # for interfacing with the PARI/GP signal handler + + # Reverse dependency + sage, }: assert pariSupport -> pari != null; @@ -20,9 +25,7 @@ buildPythonPackage rec { # explicit check: # build/src/cysignals/implementation.c:27:2: error: #error "cysignals must be compiled without _FORTIFY_SOURCE" - hardeningDisable = [ - "fortify" - ]; + hardeningDisable = [ "fortify" ]; # known failure: https://github.com/sagemath/cysignals/blob/582dbf6a7b0f9ade0abe7a7b8720b7fb32435c3c/testgdb.py#L5 doCheck = false; @@ -33,19 +36,23 @@ buildPythonPackage rec { export PATH="$out/bin:$PATH" ''; - propagatedBuildInputs = [ - cython - ] ++ lib.optionals pariSupport [ - # When cysignals is built with pari, including cysignals into the - # buildInputs of another python package will cause cython to link against - # pari. - pari - ]; + propagatedBuildInputs = + [ cython ] + ++ lib.optionals pariSupport [ + # When cysignals is built with pari, including cysignals into the + # buildInputs of another python package will cause cython to link against + # pari. + pari + ]; nativeBuildInputs = [ autoreconfHook ]; enableParallelBuilding = true; + passthru.tests = { + inherit sage; + }; + meta = with lib; { description = "Interrupt and signal handling for Cython"; mainProgram = "cysignals-CSI"; |