2018-04-12 13:11:04 +01:00
|
|
|
{ lib
|
|
|
|
, fetchPypi
|
|
|
|
, buildPythonPackage
|
|
|
|
, cython
|
2018-06-28 12:44:22 +01:00
|
|
|
, pariSupport ? true, pari # for interfacing with the PARI/GP signal handler
|
2018-04-12 13:11:04 +01:00
|
|
|
}:
|
|
|
|
|
2018-06-28 12:44:22 +01:00
|
|
|
assert pariSupport -> pari != null;
|
|
|
|
|
2018-04-12 13:11:04 +01:00
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "cysignals";
|
2018-12-15 09:42:40 +00:00
|
|
|
version = "1.8.0";
|
2018-04-12 13:11:04 +01:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2018-12-15 09:42:40 +00:00
|
|
|
sha256 = "1yh4lyrinhxxra42p0k4hiyjdrqjmifg4gnmf4bky5wa0mqnyai6";
|
2018-04-12 13:11:04 +01:00
|
|
|
};
|
|
|
|
|
2018-06-28 12:44:22 +01:00
|
|
|
# explicit check:
|
|
|
|
# build/src/cysignals/implementation.c:27:2: error: #error "cysignals must be compiled without _FORTIFY_SOURCE"
|
2018-04-12 13:11:04 +01:00
|
|
|
hardeningDisable = [
|
|
|
|
"fortify"
|
|
|
|
];
|
|
|
|
|
|
|
|
# currently fails, probably because of formatting changes in gdb 8.0
|
2018-07-11 21:25:08 +01:00
|
|
|
# https://trac.sagemath.org/ticket/24692
|
2018-04-12 13:11:04 +01:00
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
preCheck = ''
|
|
|
|
# Make sure cysignals-CSI is in PATH
|
|
|
|
export PATH="$out/bin:$PATH"
|
|
|
|
'';
|
|
|
|
|
2018-06-28 12:44:22 +01:00
|
|
|
buildInputs = lib.optionals pariSupport [
|
|
|
|
pari
|
|
|
|
];
|
|
|
|
|
2018-04-12 13:11:04 +01:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
cython
|
|
|
|
];
|
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "Interrupt and signal handling for Cython";
|
|
|
|
homepage = https://github.com/sagemath/cysignals/;
|
|
|
|
maintainers = with lib.maintainers; [ timokau ];
|
|
|
|
license = lib.licenses.lgpl3Plus;
|
|
|
|
};
|
|
|
|
}
|