Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at 21.05 54 lines 1.1 kB view raw
1{ lib 2, buildPythonPackage 3, fetchFromGitHub 4, cython 5, cmake 6, symengine 7, pytest 8, sympy 9, python 10}: 11 12buildPythonPackage rec { 13 pname = "symengine"; 14 version = "0.7.0.post3"; 15 16 src = fetchFromGitHub { 17 owner = "symengine"; 18 repo = "symengine.py"; 19 rev = "v${version}"; 20 sha256 = "1hpwnnv6f7f2wj33zaaj3i2r0d0qj0jwm3fd4ayicj0rvqya50rx"; 21 }; 22 23 postConfigure = '' 24 substituteInPlace setup.py \ 25 --replace "\"cmake\"" "\"${cmake}/bin/cmake\"" 26 27 substituteInPlace cmake/FindCython.cmake \ 28 --replace "SET(CYTHON_BIN cython" "SET(CYTHON_BIN ${cython}/bin/cython" 29 ''; 30 31 nativeBuildUnputs = [ cmake ]; 32 33 buildInputs = [ cython ]; 34 35 checkInputs = [ pytest sympy ]; 36 37 setupPyBuildFlags = [ 38 "--symengine-dir=${symengine}/" 39 "--define=\"CYTHON_BIN=${cython}/bin/cython\"" 40 ]; 41 42 checkPhase = '' 43 mkdir empty 44 cd empty 45 ${python.interpreter} ../bin/test_python.py 46 ''; 47 48 meta = with lib; { 49 description = "Python library providing wrappers to SymEngine"; 50 homepage = "https://github.com/symengine/symengine.py"; 51 license = licenses.mit; 52 maintainers = [ maintainers.costrouc ]; 53 }; 54}