pymol: use Qt instead of Tk; fixes #192555
This commit is contained in:
parent
18092e1c7a
commit
ab3f0771a4
|
@ -7,12 +7,11 @@
|
||||||
, netcdf
|
, netcdf
|
||||||
, glew
|
, glew
|
||||||
, glm
|
, glm
|
||||||
, freeglut
|
|
||||||
, libpng
|
, libpng
|
||||||
, libxml2
|
, libxml2
|
||||||
, tk
|
|
||||||
, freetype
|
, freetype
|
||||||
, msgpack
|
, msgpack
|
||||||
|
, qt5
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
pname = "pymol";
|
pname = "pymol";
|
||||||
|
@ -47,12 +46,11 @@ python3Packages.buildPythonApplication rec {
|
||||||
sha256 = "sha256-JdsgcVF1w1xFPZxVcyS+GcWg4a1Bd4SvxFOuSdlz9SM=";
|
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";
|
NIX_CFLAGS_COMPILE = "-I ${libxml2.dev}/include/libxml2";
|
||||||
hardeningDisable = [ "format" ];
|
hardeningDisable = [ "format" ];
|
||||||
|
|
||||||
setupPyBuildFlags = [ "--glut" ];
|
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
python setup.py install --home="$out"
|
python setup.py install --home="$out"
|
||||||
runHook postInstall
|
runHook postInstall
|
||||||
|
@ -60,13 +58,17 @@ python3Packages.buildPythonApplication rec {
|
||||||
|
|
||||||
postInstall = with python3Packages; ''
|
postInstall = with python3Packages; ''
|
||||||
wrapProgram $out/bin/pymol \
|
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/"
|
mkdir -p "$out/share/icons/"
|
||||||
ln -s ../../lib/python/pymol/pymol_path/data/pymol/icons/icon2.svg "$out/share/icons/pymol.svg"
|
ln -s ../../lib/python/pymol/pymol_path/data/pymol/icons/icon2.svg "$out/share/icons/pymol.svg"
|
||||||
cp -r "${desktopItem}/share/applications/" "$out/share/"
|
cp -r "${desktopItem}/share/applications/" "$out/share/"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
preFixup = ''
|
||||||
|
wrapQtApp "$out/bin/pymol"
|
||||||
|
'';
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
broken = stdenv.isDarwin;
|
broken = stdenv.isDarwin;
|
||||||
inherit description;
|
inherit description;
|
||||||
|
|
Loading…
Reference in a new issue