From 38688506b8d58c4ca33d1068d6afe1e49bdc6b59 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Tue, 13 Aug 2024 07:19:52 -0700 Subject: [PATCH] pymol: use python311Packages It depends on distutils and tests/jira/PYMOL-3260.py segfaults on Python 3.12. --- pkgs/applications/science/chemistry/pymol/default.nix | 7 +++---- pkgs/top-level/all-packages.nix | 4 +++- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/pkgs/applications/science/chemistry/pymol/default.nix b/pkgs/applications/science/chemistry/pymol/default.nix index 1733ba2f236c..295ac7e14cb2 100644 --- a/pkgs/applications/science/chemistry/pymol/default.nix +++ b/pkgs/applications/science/chemistry/pymol/default.nix @@ -2,7 +2,6 @@ , lib , fetchFromGitHub , makeDesktopItem -, python3 , python3Packages , netcdf , glew @@ -50,7 +49,7 @@ python3Packages.buildPythonApplication rec { postPatch = '' substituteInPlace setup.py \ - --replace-fail "self.install_libbase" '"${placeholder "out"}/${python3.sitePackages}"' + --replace-fail "self.install_libbase" '"${placeholder "out"}/${python3Packages.python.sitePackages}"' ''; build-system = [ @@ -63,10 +62,10 @@ python3Packages.buildPythonApplication rec { postInstall = with python3Packages; '' wrapProgram $out/bin/pymol \ - --prefix PYTHONPATH : ${lib.makeSearchPathOutput "lib" python3.sitePackages [ pyqt5 pyqt5.pyqt5-sip ]} + --prefix PYTHONPATH : ${lib.makeSearchPathOutput "lib" python3Packages.python.sitePackages [ pyqt5 pyqt5.pyqt5-sip ]} mkdir -p "$out/share/icons/" - ln -s $out/${python3.sitePackages}/pymol/pymol_path/data/pymol/icons/icon2.svg "$out/share/icons/pymol.svg" + ln -s $out/${python3Packages.python.sitePackages}/pymol/pymol_path/data/pymol/icons/icon2.svg "$out/share/icons/pymol.svg" '' + lib.optionalString stdenv.hostPlatform.isLinux '' cp -r "${desktopItem}/share/applications/" "$out/share/" ''; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 2a8e717d4047..d022666500d9 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -36829,7 +36829,9 @@ with pkgs; pdb2pqr = with python3Packages; toPythonApplication pdb2pqr; - pymol = callPackage ../applications/science/chemistry/pymol { }; + pymol = callPackage ../applications/science/chemistry/pymol { + python3Packages = python311Packages; + }; quantum-espresso = callPackage ../applications/science/chemistry/quantum-espresso { hdf5 = hdf5-fortran;