diff --git a/pkgs/development/python-modules/brian2/default.nix b/pkgs/development/python-modules/brian2/default.nix new file mode 100644 index 000000000000..52149b883060 --- /dev/null +++ b/pkgs/development/python-modules/brian2/default.nix @@ -0,0 +1,53 @@ +{ lib +, buildPythonPackage +, fetchPypi +, cython +, jinja2 +, numpy +, pyparsing +, setuptools +, sympy +, pytest +, pytest-xdist +, python +}: + +buildPythonPackage rec { + pname = "brian2"; + version = "2.5.1"; + + src = fetchPypi { + pname = "Brian2"; + inherit version; + sha256 = "sha256-x1EcS7PFCsjPYsq3Lt87SJRW4J5DE/OfdFs3NuyHiLw="; + }; + + 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 ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index d3a9136b83d8..8bb654b8dc5f 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -1421,6 +1421,8 @@ self: super: with self; { brelpy = callPackage ../development/python-modules/brelpy { }; + brian2 = callPackage ../development/python-modules/brian2 { }; + broadlink = callPackage ../development/python-modules/broadlink { }; brother = callPackage ../development/python-modules/brother { };