1
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-06-20 08:29:20 +03:00
nixpkgs/pkgs/development/python-modules/symengine/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

56 lines
1.2 KiB
Nix
Raw Normal View History

2019-04-15 17:10:47 -04:00
{ lib
, buildPythonPackage
, fetchFromGitHub
2019-04-15 17:10:47 -04:00
, cython
, cmake
, symengine
, pytest
, sympy
, python
2019-04-15 17:10:47 -04:00
}:
buildPythonPackage rec {
pname = "symengine";
version = "0.9.2";
2019-04-15 17:10:47 -04:00
src = fetchFromGitHub {
owner = "symengine";
repo = "symengine.py";
rev = "v${version}";
sha256 = "sha256-ZHplYEG97foy/unOdSokFFkDl4LK5TI4kypHSLpcCM4=";
2019-04-15 17:10:47 -04:00
};
postConfigure = ''
substituteInPlace setup.py \
--replace "\"cmake\"" "\"${cmake}/bin/cmake\"" \
--replace "'cython>=0.29.24'" "'cython'"
2019-04-15 17:10:47 -04:00
substituteInPlace cmake/FindCython.cmake \
--replace "SET(CYTHON_BIN cython" "SET(CYTHON_BIN ${cython}/bin/cython"
'';
nativeBuildUnputs = [ cmake ];
buildInputs = [ cython ];
2019-04-15 17:10:47 -04:00
checkInputs = [ pytest sympy ];
setupPyBuildFlags = [
"--symengine-dir=${symengine}/"
"--define=\"CYTHON_BIN=${cython}/bin/cython\""
];
2019-04-15 17:10:47 -04:00
checkPhase = ''
mkdir empty
cd empty
${python.interpreter} ../bin/test_python.py
2019-04-15 17:10:47 -04:00
'';
meta = with lib; {
description = "Python library providing wrappers to SymEngine";
homepage = "https://github.com/symengine/symengine.py";
2019-04-15 17:10:47 -04:00
license = licenses.mit;
maintainers = [ maintainers.costrouc ];
};
}