Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / python-modules / cysignals / default.nix
blobd03e3ba501ec03f625ecb667810d93238ac8c49a
1 { lib
2 , autoreconfHook
3 , fetchPypi
4 , buildPythonPackage
5 , cython
6 , pariSupport ? true, pari # for interfacing with the PARI/GP signal handler
7 }:
9 assert pariSupport -> pari != null;
11 buildPythonPackage rec {
12   pname = "cysignals";
13   version = "1.11.2";
15   src = fetchPypi {
16     inherit pname version;
17     sha256 = "5858b1760fbe21848121b826b2463a67ac5a45caf3d73105497a68618c5a6fa6";
18   };
20   # explicit check:
21   # build/src/cysignals/implementation.c:27:2: error: #error "cysignals must be compiled without _FORTIFY_SOURCE"
22   hardeningDisable = [
23     "fortify"
24   ];
26   # known failure: https://github.com/sagemath/cysignals/blob/582dbf6a7b0f9ade0abe7a7b8720b7fb32435c3c/testgdb.py#L5
27   doCheck = false;
28   checkTarget = "check-install";
30   preCheck = ''
31     # Make sure cysignals-CSI is in PATH
32     export PATH="$out/bin:$PATH"
33   '';
35   propagatedBuildInputs = [
36     cython
37   ] ++ lib.optionals pariSupport [
38     # When cysignals is built with pari, including cysignals into the
39     # buildInputs of another python package will cause cython to link against
40     # pari.
41     pari
42   ];
44   nativeBuildInputs = [ autoreconfHook ];
46   enableParallelBuilding = true;
48   meta = with lib; {
49     description = "Interrupt and signal handling for Cython";
50     homepage = "https://github.com/sagemath/cysignals/";
51     maintainers = teams.sage.members;
52     license = licenses.lgpl3Plus;
53   };