summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsamlich <1349989+samlich@users.noreply.github.com>2020-01-24 19:51:08 +0000
committersamlich <1349989+samlich@users.noreply.github.com>2020-01-24 19:51:08 +0000
commit77317774ce91f6e6aedcfa62ec7c9c2e30d4d5c0 (patch)
treee1fd9231c1e1fd4e1946f175434530d8b11e42d0
parent3638755ff37ef01c8a95a2e54d209aea4e2e0aa9 (diff)
pymol: link desktop icon
-rw-r--r--pkgs/applications/science/chemistry/pymol/default.nix8
1 files changed, 6 insertions, 2 deletions
diff --git a/pkgs/applications/science/chemistry/pymol/default.nix b/pkgs/applications/science/chemistry/pymol/default.nix
index b20e7480657c..a0e1fa5a3aef 100644
--- a/pkgs/applications/science/chemistry/pymol/default.nix
+++ b/pkgs/applications/science/chemistry/pymol/default.nix
@@ -13,6 +13,7 @@ let
desktopName = "PyMol Molecular Graphics System";
genericName = "Molecular Modeler";
comment = description;
+ icon = pname;
mimeType = "chemical/x-pdb;chemical/x-mdl-molfile;chemical/x-mol2;chemical/seq-aa-fasta;chemical/seq-na-fasta;chemical/x-xyz;chemical/x-mdl-sdf;";
categories = "Graphics;Education;Science;Chemistry;";
};
@@ -33,14 +34,17 @@ python3Packages.buildPythonApplication rec {
setupPyBuildFlags = [ "--glut" ];
installPhase = ''
- python setup.py install --home=$out
- cp -r ${desktopItem}/share/ $out/
+ python setup.py install --home="$out"
runHook postInstall
'';
postInstall = with python3Packages; ''
wrapProgram $out/bin/pymol \
--prefix PYTHONPATH : ${lib.makeSearchPathOutput "lib" python3.sitePackages [ Pmw tkinter ]}
+
+ 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/"
'';
meta = {