pymol: use Qt instead of Tk; fixes #192555

This commit is contained in:
samlich 2022-09-23 19:22:04 +00:00
parent 18092e1c7a
commit ab3f0771a4
No known key found for this signature in database
GPG key ID: 0F16C469960FF621

View file

@ -7,12 +7,11 @@
, netcdf
, glew
, glm
, freeglut
, libpng
, libxml2
, tk
, freetype
, msgpack
, qt5
}:
let
pname = "pymol";
@ -47,12 +46,11 @@ python3Packages.buildPythonApplication rec {
sha256 = "sha256-JdsgcVF1w1xFPZxVcyS+GcWg4a1Bd4SvxFOuSdlz9SM=";
};
buildInputs = [ python3Packages.numpy glew glm freeglut libpng libxml2 tk freetype msgpack netcdf ];
nativeBuildInputs = [ qt5.wrapQtAppsHook ];
buildInputs = [ python3Packages.numpy python3Packages.pyqt5 glew glm libpng libxml2 freetype msgpack netcdf ];
NIX_CFLAGS_COMPILE = "-I ${libxml2.dev}/include/libxml2";
hardeningDisable = [ "format" ];
setupPyBuildFlags = [ "--glut" ];
installPhase = ''
python setup.py install --home="$out"
runHook postInstall
@ -60,13 +58,17 @@ python3Packages.buildPythonApplication rec {
postInstall = with python3Packages; ''
wrapProgram $out/bin/pymol \
--prefix PYTHONPATH : ${lib.makeSearchPathOutput "lib" python3.sitePackages [ Pmw tkinter ]}
--prefix PYTHONPATH : ${lib.makeSearchPathOutput "lib" python3.sitePackages [ pyqt5 pyqt5.pyqt5_sip ]}
mkdir -p "$out/share/icons/"
ln -s ../../lib/python/pymol/pymol_path/data/pymol/icons/icon2.svg "$out/share/icons/pymol.svg"
cp -r "${desktopItem}/share/applications/" "$out/share/"
'';
preFixup = ''
wrapQtApp "$out/bin/pymol"
'';
meta = with lib; {
broken = stdenv.isDarwin;
inherit description;