Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at gcc-offload 62 lines 1.1 kB view raw
1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 cython, 6 cmake, 7 symengine, 8 pytest, 9 sympy, 10 python, 11 setuptools, 12}: 13 14buildPythonPackage rec { 15 pname = "symengine"; 16 version = "0.13.0"; 17 18 build-system = [ setuptools ]; 19 pyproject = true; 20 21 src = fetchFromGitHub { 22 owner = "symengine"; 23 repo = "symengine.py"; 24 rev = "refs/tags/v${version}"; 25 hash = "sha256-PJUzA86SGCnDpqU9j/dr3PlM9inyi8SQX0HGqPQ9wQw="; 26 }; 27 28 env = { 29 SymEngine_DIR = "${symengine}"; 30 }; 31 32 postPatch = '' 33 substituteInPlace setup.py \ 34 --replace-fail "'cython>=0.29.24'" "'cython'" 35 36 export PATH=${cython}/bin:$PATH 37 ''; 38 39 dontUseCmakeConfigure = true; 40 nativeBuildInputs = [ cmake ]; 41 42 buildInputs = [ cython ]; 43 44 nativeCheckInputs = [ 45 pytest 46 sympy 47 ]; 48 49 checkPhase = '' 50 runHook preCheck 51 mkdir empty && cd empty 52 ${python.interpreter} ../bin/test_python.py 53 runHook postCheck 54 ''; 55 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 }; 62}