linuxPackages_latest.broadcom_sta: add patch to compile on Kernel 6.12 (#359484)
[NixPkgs.git] / pkgs / development / python-modules / symengine / default.nix
blobabea3479d15bc9ee7b0b75f31172d668dcc283b1
2   lib,
3   buildPythonPackage,
4   fetchFromGitHub,
5   cython,
6   cmake,
7   symengine,
8   pytest,
9   sympy,
10   python,
11   setuptools,
14 buildPythonPackage rec {
15   pname = "symengine";
16   version = "0.13.0";
18   build-system = [ setuptools ];
19   pyproject = true;
21   src = fetchFromGitHub {
22     owner = "symengine";
23     repo = "symengine.py";
24     rev = "refs/tags/v${version}";
25     hash = "sha256-PJUzA86SGCnDpqU9j/dr3PlM9inyi8SQX0HGqPQ9wQw=";
26   };
28   env = {
29     SymEngine_DIR = "${symengine}";
30   };
32   postPatch = ''
33     substituteInPlace setup.py \
34       --replace-fail "'cython>=0.29.24'" "'cython'"
36     export PATH=${cython}/bin:$PATH
37   '';
39   dontUseCmakeConfigure = true;
40   nativeBuildInputs = [ cmake ];
42   buildInputs = [ cython ];
44   nativeCheckInputs = [
45     pytest
46     sympy
47   ];
49   checkPhase = ''
50     runHook preCheck
51     mkdir empty && cd empty
52     ${python.interpreter} ../bin/test_python.py
53     runHook postCheck
54   '';
56   meta = with lib; {
57     description = "Python library providing wrappers to SymEngine";
58     homepage = "https://github.com/symengine/symengine.py";
59     license = licenses.mit;
60     maintainers = [ ];
61   };