11 oldest-supported-numpy,
21 buildPythonPackage rec {
26 disabled = pythonOlder "3.7";
28 src = fetchFromGitHub {
31 rev = "refs/tags/v${version}";
32 hash = "sha256-KT5Mk0w6EKTUZzGRnQ6XQPZfH5ZXVuiD+EwSflNqHNo=";
36 # build-time constriant, used to ensure forward and backward compat
37 substituteInPlace pyproject.toml setup.cfg \
38 --replace-fail "numpy>=2.0.0" "numpy"
44 oldest-supported-numpy
47 propagatedBuildInputs = [
56 ] ++ lib.flatten (builtins.attrValues optional-dependencies);
58 # QuTiP tries to access the home directory to create an rc file for us.
59 # We need to go to another directory to run the tests from there.
60 # This is due to the Cython-compiled modules not being in the correct location
63 export HOME=$(mktemp -d);
64 export OMP_NUM_THREADS=$NIX_BUILD_CORES
65 mkdir -p test && cd test
68 # For running tests, see https://qutip.org/docs/latest/installation.html#verifying-the-installation
71 ${python.interpreter} -c "import qutip.testing; qutip.testing.run()"
75 pythonImportsCheck = [ "qutip" ];
77 optional-dependencies = {
78 graphics = [ matplotlib ];
79 ipython = [ ipython ];
87 description = "Open-source software for simulating the dynamics of closed and open quantum systems";
88 homepage = "https://qutip.org/";
89 changelog = "https://github.com/qutip/qutip/releases/tag/v${version}";
90 license = licenses.bsd3;
91 maintainers = with maintainers; [ fabiangd ];