diff --git a/pkgs/development/python-modules/ase/default.nix b/pkgs/development/python-modules/ase/default.nix index a512bc2ae135..09d2b92ffe7f 100644 --- a/pkgs/development/python-modules/ase/default.nix +++ b/pkgs/development/python-modules/ase/default.nix @@ -1,6 +1,7 @@ { lib, stdenv, + fetchFromGitLab, buildPythonPackage, isPy27, fetchPypi, @@ -28,14 +29,14 @@ buildPythonPackage rec { pname = "ase"; - version = "3.25.0"; + version = "3.25.0-unstable-2025-06-24"; pyproject = true; - disabled = isPy27; - - src = fetchPypi { - inherit pname version; - hash = "sha256-N0z4yp/liPBdboVto8nBfvJi3JaAJ7Ix1EkzQUDJYsI="; + src = fetchFromGitLab { + owner = "ase"; + repo = "ase"; + rev = "4e22dabfbe7ae2329e50260ca1b6f08a83527ac3"; + hash = "sha256-ehMyVtPxfTxT8T418VyLGnUEyYip4LPTTaGL0va7qgM="; }; build-system = [ setuptools ]; @@ -62,10 +63,6 @@ buildPythonPackage rec { ]; disabledTests = [ - # AssertionError: assert (1 != 0) == False - # TypeError: list indices must be integers or slices, not numpy.bool - "test_long" - "test_fundamental_params" "test_ase_bandstructure" "test_imports" diff --git a/pkgs/development/python-modules/pymatgen/default.nix b/pkgs/development/python-modules/pymatgen/default.nix index 2ddaebe899d3..adb87f41b992 100644 --- a/pkgs/development/python-modules/pymatgen/default.nix +++ b/pkgs/development/python-modules/pymatgen/default.nix @@ -13,11 +13,13 @@ glibcLocales, # dependencies + bibtexparser, joblib, matplotlib, monty, networkx, numpy, + orjson, palettable, pandas, plotly, @@ -50,7 +52,7 @@ buildPythonPackage rec { pname = "pymatgen"; - version = "2025.1.24"; + version = "2025.6.14"; pyproject = true; disabled = pythonAtLeast "3.13"; @@ -59,7 +61,7 @@ buildPythonPackage rec { owner = "materialsproject"; repo = "pymatgen"; tag = "v${version}"; - hash = "sha256-0P3/M6VI2RKPArMwXD95sjW7dYOTXxUeu4tOliN0IGk="; + hash = "sha256-HMYYhXT5k/EjG1sIBq/53K9ogeSk8ZEJQBrDHCgz+SA="; }; build-system = [ setuptools ]; @@ -70,11 +72,13 @@ buildPythonPackage rec { ]; dependencies = [ + bibtexparser joblib matplotlib monty networkx numpy + orjson palettable pandas plotly @@ -116,6 +120,11 @@ buildPythonPackage rec { pythonImportsCheck = [ "pymatgen" ]; + pytestFlagsArray = [ + # We have not packaged moyopy yet. + "--deselect=tests/analysis/test_prototypes.py::test_get_protostructure_label_from_moyopy" + ]; + nativeCheckInputs = [ addBinToPathHook pytestCheckHook @@ -158,6 +167,9 @@ buildPythonPackage rec { "test_proj_bandstructure_plot" "test_structure" "test_structure_environments" + + # attempt to insert nil object from objects[1] + "test_timer_10_2_7" ]; disabledTestPaths = lib.optionals stdenv.hostPlatform.isDarwin [ diff --git a/pkgs/development/python-modules/pyscf/coerce-numpy-to-int.patch b/pkgs/development/python-modules/pyscf/coerce-numpy-to-int.patch new file mode 100644 index 000000000000..140e6d77b1f0 --- /dev/null +++ b/pkgs/development/python-modules/pyscf/coerce-numpy-to-int.patch @@ -0,0 +1,19 @@ +commit 6df405512d33d432bb45553ddcffbc70edec51f6 +Author: Lein Matsumaru +Date: Sun Jun 29 12:59:57 2025 +0000 + + Coerce int + +diff --git a/pyscf/ci/gcisd.py b/pyscf/ci/gcisd.py +index d58e0364c..050f83962 100644 +--- a/pyscf/ci/gcisd.py ++++ b/pyscf/ci/gcisd.py +@@ -197,7 +197,7 @@ def from_fcivec(ci0, nelec, orbspin, frozen=None): + numpy.count_nonzero(orbspin[:nelec] == 1)) + ucisdvec = ucisd.from_fcivec(ci0, norb//2, nelec, frozen) + nocc = numpy.count_nonzero(~frozen_mask[:sum(nelec)]) +- return from_ucisdvec(ucisdvec, nocc, orbspin[~frozen_mask]) ++ return from_ucisdvec(ucisdvec, int(nocc), orbspin[~frozen_mask]) + + + def make_rdm1(myci, civec=None, nmo=None, nocc=None, ao_repr=False): diff --git a/pkgs/development/python-modules/pyscf/default.nix b/pkgs/development/python-modules/pyscf/default.nix index 919b5201df54..5818570a0030 100644 --- a/pkgs/development/python-modules/pyscf/default.nix +++ b/pkgs/development/python-modules/pyscf/default.nix @@ -2,15 +2,23 @@ buildPythonPackage, lib, fetchFromGitHub, + + # build-sysetm cmake, + + # build inputs blas, libcint, libxc, xcfun, + + # dependencies cppe, h5py, numpy, scipy, + + # tests pytestCheckHook, }: @@ -26,6 +34,12 @@ buildPythonPackage rec { hash = "sha256-UTeZXlNuSWDOcBRVbUUWJ3mQnZZQr17aTw6rRA5DRNI="; }; + patches = [ + # Converts numpy.int64 to int where necessary. + # Upstream issue: https://github.com/pyscf/pyscf/issues/2878 + ./coerce-numpy-to-int.patch + ]; + # setup.py calls Cmake and passes the arguments in CMAKE_CONFIGURE_ARGS to cmake. build-system = [ cmake ]; dontUseCmakeConfigure = true; @@ -60,6 +74,7 @@ buildPythonPackage rec { # Numerically slightly off tests disabledTests = [ + "test_rdm_trace" "test_tdhf_singlet" "test_ab_hf" "test_ea" @@ -99,14 +114,15 @@ buildPythonPackage rec { "--ignore-glob=pyscf/grad/test/test_casscf.py" ]; - meta = with lib; { + meta = { description = "Python-based simulations of chemistry framework"; homepage = "https://github.com/pyscf/pyscf"; - license = licenses.asl20; + license = lib.licenses.asl20; platforms = [ "x86_64-linux" "x86_64-darwin" + "aarch64-darwin" ]; - maintainers = [ maintainers.sheepforce ]; + maintainers = [ lib.maintainers.sheepforce ]; }; }