diff --git a/pkgs/development/python-modules/mdtraj/default.nix b/pkgs/development/python-modules/mdtraj/default.nix index 971688348a1d..a99b36c78765 100644 --- a/pkgs/development/python-modules/mdtraj/default.nix +++ b/pkgs/development/python-modules/mdtraj/default.nix @@ -11,6 +11,7 @@ , wheel , astunparse , numpy +, packaging , pyparsing , scipy , gsd @@ -39,9 +40,31 @@ buildPythonPackage rec { url = "https://github.com/mdtraj/mdtraj/commit/81209d00817ab07cfc4668bf5ec88088d16904c0.patch"; hash = "sha256-ttNmij7csxF0Z5wPPwhGumRX055W2IgFjRAe6nI6GNY="; }) + # remove pkg_resources usage + # https://github.com/mdtraj/mdtraj/pull/1837 + (fetchpatch { + name = "fix-runtime-error.patch"; + url = "https://github.com/mdtraj/mdtraj/commit/02d44d4db7039fceb199c85b4f993244804f470d.patch"; + hash = "sha256-nhbi3iOrDSM87DyIp1KVt383Vvb6aYOgkjuYzviqiq8="; + }) + # remove distutils usage + # https://github.com/mdtraj/mdtraj/pull/1834 + (fetchpatch { + name = "python312-compatibility.patch"; + url = "https://github.com/mdtraj/mdtraj/commit/95d79747deef42c976ca362a57806b61933409f3.patch"; + hash = "sha256-Cq7/d745q6ZgAyWGM4ULnSsWezsbnu1CjSz5eqYSb+g="; + }) + # disable intrinsics when SIMD is not available + # TODO: enable SIMD with python3.12 + # https://github.com/mdtraj/mdtraj/pull/1884 + (fetchpatch { + name = "fix-intrinsics-flag.patch"; + url = "https://github.com/mdtraj/mdtraj/commit/d6041c645d51898e2a09030633210213eec7d4c5.patch"; + hash = "sha256-kcnlHMoA/exJzV8iQltH+LWXrvSk7gsUV+yWK6xn0jg="; + }) ]; - nativeBuildInputs = [ + build-system = [ cython_0 oldest-supported-numpy setuptools @@ -54,9 +77,10 @@ buildPythonPackage rec { llvmPackages.openmp ]; - propagatedBuildInputs = [ + dependencies = [ astunparse numpy + packaging pyparsing scipy ]; @@ -87,7 +111,9 @@ buildPythonPackage rec { "test_read_atomindices_2" # flaky test + "test_compare_rdf_t_master" "test_distances_t" + "test_precentered_2" ]; pythonImportsCheck = [ "mdtraj" ];