mirror of
https://github.com/SebastianWendel/nixpkgs.git
synced 2024-11-06 10:16:44 +01:00
54 lines
1.1 KiB
Nix
54 lines
1.1 KiB
Nix
{ lib
|
|
, buildPythonPackage
|
|
, fetchFromGitHub
|
|
, cython
|
|
, cmake
|
|
, symengine
|
|
, pytest
|
|
, sympy
|
|
, python
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "symengine";
|
|
version = "0.4.0";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "symengine";
|
|
repo = "symengine.py";
|
|
rev = "v${version}";
|
|
sha256 = "07i9rwxphi4zgwc7y6f6qvq73iym2cx4k1bpd7rmd3wkpgrrfxqx";
|
|
};
|
|
|
|
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 ];
|
|
|
|
checkInputs = [ pytest sympy ];
|
|
|
|
setupPyBuildFlags = [
|
|
"--symengine-dir=${symengine}/"
|
|
"--define=\"CYTHON_BIN=${cython}/bin/cython\""
|
|
];
|
|
|
|
checkPhase = ''
|
|
mkdir empty
|
|
cd empty
|
|
${python.interpreter} ../bin/test_python.py
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "Python library providing wrappers to SymEngine";
|
|
homepage = "https://github.com/symengine/symengine.py";
|
|
license = licenses.mit;
|
|
maintainers = [ maintainers.costrouc ];
|
|
broken = true;
|
|
};
|
|
}
|