depot/third_party/nixpkgs/pkgs/development/python-modules/brian2/default.nix
Default email fa5436e0a7 Project import generated by Copybara.
GitOrigin-RevId: e8057b67ebf307f01bdcc8fba94d94f75039d1f6
2024-06-05 17:53:02 +02:00

55 lines
979 B
Nix

{
lib,
buildPythonPackage,
fetchPypi,
cython,
jinja2,
numpy,
pyparsing,
setuptools,
sympy,
pytest,
pytest-xdist,
python,
}:
buildPythonPackage rec {
pname = "brian2";
version = "2.6.0";
format = "setuptools";
src = fetchPypi {
pname = "Brian2";
inherit version;
hash = "sha256-qYeIMn8l2V2Ckpj5AY7TWihFnfZ//JcP5VacUUfYCf4=";
};
propagatedBuildInputs = [
cython
jinja2
numpy
pyparsing
setuptools
sympy
];
checkInputs = [
pytest
pytest-xdist
];
checkPhase = ''
runHook preCheck
# Cython cache lies in home directory
export HOME=$(mktemp -d)
cd $HOME && ${python.interpreter} -c "import brian2;assert brian2.test()"
runHook postCheck
'';
meta = with lib; {
description = "A clock-driven simulator for spiking neural networks";
homepage = "https://briansimulator.org/";
license = licenses.cecill21;
maintainers = with maintainers; [ jiegec ];
};
}