diff --git a/pkgs/development/python-modules/symengine/default.nix b/pkgs/development/python-modules/symengine/default.nix new file mode 100644 index 000000000000..7e10c02460e8 --- /dev/null +++ b/pkgs/development/python-modules/symengine/default.nix @@ -0,0 +1,43 @@ +{ lib +, buildPythonPackage +, fetchPypi +, cython +, cmake +, symengine +, nose +}: + +buildPythonPackage rec { + pname = "symengine"; + version = "0.3.0"; + + src = fetchPypi { + inherit pname version; + sha256 = "e86d13aadc9f765f2c5462da32950edd36d1a0a52dbfc96e766be3689957c04d"; + }; + + postConfigure = '' + substituteInPlace setup.py \ + --replace "\"cmake\"" "\"${cmake}/bin/cmake\"" + + substituteInPlace cmake/FindCython.cmake \ + --replace "SET(CYTHON_BIN cython" "SET(CYTHON_BIN ${cython}/bin/cython" + ''; + + buildInputs = [ cython cmake ]; + + setupPyBuildFlags = [ "--symengine-dir=${symengine}/" ]; + + # tests fail due to trying to import local "symengine" directory + doCheck = false; + checkPhase = '' + nosetests symengine/tests -v + ''; + + meta = with lib; { + description = "Python library providing wrappers to SymEngine"; + homepage = https://github.com/symengine/symengine.py; + license = licenses.mit; + maintainers = [ maintainers.costrouc ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index a7e223e160c1..c01b86d4f201 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -5937,6 +5937,8 @@ in svtplay-dl = callPackage ../tools/misc/svtplay-dl { }; + symengine = callPackage ../development/libraries/symengine { }; + sysbench = callPackage ../development/tools/misc/sysbench {}; system-config-printer = callPackage ../tools/misc/system-config-printer {