about summary refs log tree commit diff
diff options
context:
space:
mode:
authorBrenton Horne <brentonhorne77@gmail.com>2019-01-24 22:16:03 +1000
committerworldofpeace <worldofpeace@users.noreply.github.com>2019-01-25 14:02:47 +0000
commitdb7ccd440efa85fb2a7a428075c0d2848e432a1e (patch)
treedfc8728ec37ad78ef83e68c119525d4522cb7495
parent21bb1b0aac572be5dffdb6d326c4c6fc30406aa9 (diff)
downloadnixlib-db7ccd440efa85fb2a7a428075c0d2848e432a1e.tar
nixlib-db7ccd440efa85fb2a7a428075c0d2848e432a1e.tar.gz
nixlib-db7ccd440efa85fb2a7a428075c0d2848e432a1e.tar.bz2
nixlib-db7ccd440efa85fb2a7a428075c0d2848e432a1e.tar.lz
nixlib-db7ccd440efa85fb2a7a428075c0d2848e432a1e.tar.xz
nixlib-db7ccd440efa85fb2a7a428075c0d2848e432a1e.tar.zst
nixlib-db7ccd440efa85fb2a7a428075c0d2848e432a1e.zip
googleearth: adding application launcher and icons
I am adding an application launcher, and icons for the googleearth
package. They are essentially just those in opt/ with the only
adjustment being to make the launcher execute the correct executable
file.
-rw-r--r--pkgs/applications/misc/googleearth/default.nix9
1 files changed, 9 insertions, 0 deletions
diff --git a/pkgs/applications/misc/googleearth/default.nix b/pkgs/applications/misc/googleearth/default.nix
index 96f8cb116143..0fccf83acf76 100644
--- a/pkgs/applications/misc/googleearth/default.nix
+++ b/pkgs/applications/misc/googleearth/default.nix
@@ -79,6 +79,15 @@ stdenv.mkDerivation rec {
     for a in $out/opt/google/earth/free/*.so* ; do
       patchelf --set-rpath "${fullPath}:\$ORIGIN" $a
     done
+    
+    # Add desktop config file and icons
+    mkdir -p $out/share/{applications,icons/hicolor/{16x16,22x22,24x24,32x32,48x48,64x64,128x128,256x256}/apps,pixmaps}
+    ln -s $out/opt/google/earth/free/google-earth.desktop $out/share/applications/google-earth.desktop
+    sed -i -e "s|Exec=.*|Exec=$out/bin/googleearth|g" $out/opt/google/earth/free/google-earth.desktop
+    for size in 16 22 24 32 48 64 128 256; do
+      ln -s $out/opt/google/earth/free/product_logo_"$size".png $out/share/icons/hicolor/"$size"x"$size"/apps/google-earth.png
+    done
+    ln -s $out/opt/google/earth/free/product_logo_256.png $out/share/pixmaps/google-earth.png
   '';
 
   checkPhase = ''