From 77317774ce91f6e6aedcfa62ec7c9c2e30d4d5c0 Mon Sep 17 00:00:00 2001 From: samlich <1349989+samlich@users.noreply.github.com> Date: Fri, 24 Jan 2020 19:51:08 +0000 Subject: pymol: link desktop icon --- pkgs/applications/science/chemistry/pymol/default.nix | 8 ++++++-- 1 file 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 = { -- cgit v1.2.3