about summary refs log tree commit diff
path: root/pkgs/development
diff options
context:
space:
mode:
authorWeijia Wang <9713184+wegank@users.noreply.github.com>2024-05-22 14:48:43 +0200
committerGitHub <noreply@github.com>2024-05-22 14:48:43 +0200
commit4e0a31f582db5f78fa8c56fc43596467dcd6b9f3 (patch)
treef382b99431440684d62fa88edf681a104f2d6f0f /pkgs/development
parent829298ee2c9dc3ea3ca46a6a9f835960f5f70cae (diff)
parentd2797c47910903d0772d51466f531c58409b6be2 (diff)
Merge pull request #313630 from natsukium/openmm/fix
python311Packages.openmm: fix installPhase
Diffstat (limited to 'pkgs/development')
-rw-r--r--pkgs/development/libraries/science/chemistry/openmm/default.nix9
1 files changed, 6 insertions, 3 deletions
diff --git a/pkgs/development/libraries/science/chemistry/openmm/default.nix b/pkgs/development/libraries/science/chemistry/openmm/default.nix
index d146fa073dc34..723ced8b2a590 100644
--- a/pkgs/development/libraries/science/chemistry/openmm/default.nix
+++ b/pkgs/development/libraries/science/chemistry/openmm/default.nix
@@ -42,6 +42,10 @@ stdenv.mkDerivation rec {
     swig
     doxygen
     python3Packages.python
+  ] ++ lib.optionals enablePython [
+    python3Packages.build
+    python3Packages.installer
+    python3Packages.wheel
   ] ++ lib.optional enableCuda addOpenGLRunpath;
 
   buildInputs = [ fftwSinglePrec ]
@@ -84,9 +88,8 @@ stdenv.mkDerivation rec {
       export OPENMM_LIB_PATH=$out/lib
       export OPENMM_INCLUDE_PATH=$out/include
       cd python
-      ${python3Packages.python.pythonOnBuildForHost.interpreter} setup.py build
-      ${python3Packages.python.pythonOnBuildForHost.interpreter} setup.py install --prefix=$out
-      mv $out/lib/python*/site-packages/OpenMM*.egg/{openmm,simtk} $out/lib/python*/site-packages/.
+      ${python3Packages.python.pythonOnBuildForHost.interpreter} -m build --no-isolation --outdir dist/ --wheel
+      ${python3Packages.python.pythonOnBuildForHost.interpreter} -m installer --prefix $out dist/*.whl
     '';
 
   postFixup = ''