33 if stdenv.hostPlatform.system == "x86_64-linux" then "amd64"
34 else throw "Unsupported system ${stdenv.hostPlatform.system} ";
37 pname = "googleearth-pro";
38 version = "7.3.4.8248";
41 url = "https://dl.google.com/linux/earth/deb/pool/main/g/google-earth-pro-stable/google-earth-pro-stable_${version}-r0_${arch}.deb";
42 sha256 = "1pbapi267snlrjari5k93y6kbrjsqhqxgkxxqaqv4r25az00dx6d";
45 nativeBuildInputs = [ dpkg makeWrapper autoPatchelfHook ];
46 propagatedBuildInputs = [ xkeyboardconfig ];
53 gst_all_1.gst-plugins-base
68 doInstallCheck = true;
73 # deb file contains a setuid binary, so 'dpkg -x' doesn't work here
75 dpkg --fsys-tarfile ${src} | tar --extract -C deb
85 rm $out/bin/google-earth-pro $out/opt/google/earth/pro/googleearth
87 # patch and link googleearth binary
88 ln -s $out/opt/google/earth/pro/googleearth-bin $out/bin/googleearth-pro
90 # patch and link gpsbabel binary
91 ln -s $out/opt/google/earth/pro/gpsbabel $out/bin/gpsbabel
93 # Add desktop config file and icons
94 mkdir -p $out/share/{applications,icons/hicolor/{16x16,22x22,24x24,32x32,48x48,64x64,128x128,256x256}/apps,pixmaps}
95 ln -s $out/opt/google/earth/pro/google-earth-pro.desktop $out/share/applications/google-earth-pro.desktop
96 sed -i -e "s|Exec=.*|Exec=$out/bin/googleearth-pro|g" $out/opt/google/earth/pro/google-earth-pro.desktop
97 for size in 16 22 24 32 48 64 128 256; do
98 ln -s $out/opt/google/earth/pro/product_logo_"$size".png $out/share/icons/hicolor/"$size"x"$size"/apps/google-earth-pro.png
100 ln -s $out/opt/google/earth/pro/product_logo_256.png $out/share/pixmaps/google-earth-pro.png
105 installCheckPhase = ''
106 $out/bin/gpsbabel -V > /dev/null
109 # wayland is not supported by Qt included in binary package, so make sure it uses xcb
111 wrapProgram $out/bin/googleearth-pro \
112 --set QT_QPA_PLATFORM xcb \
113 --set QT_XKB_CONFIG_ROOT "${xkeyboardconfig}/share/X11/xkb"
117 description = "A world sphere viewer";
118 homepage = "https://www.google.com/earth/";
119 sourceProvenance = with sourceTypes; [ binaryNativeCode ];
120 license = licenses.unfree;
121 maintainers = with maintainers; [ friedelino shamilton ];
122 platforms = platforms.linux;
123 knownVulnerabilities = [ "Includes vulnerable bundled libraries." ];