Merge pull request #192660 from samlich/master
pymol: use Qt instead of Tk; fixes #192555
This commit is contained in:
commit
846f382e4b
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue