···
{ stdenv, fetchurl, glibc, mesa, freetype, glib, libSM, libICE, libXi, libXv
, libXrender, libXrandr, libXfixes, libXcursor, libXinerama, libXext, libX11, qt4
-
/* I haven't found any x86_64 package from them */
-
assert stdenv.system == "i686-linux";
-
name = "googleearth-6.0.3.2197";
-
url = http://dl.google.com/earth/client/current/GoogleEarthLinux.bin;
-
sha256 = "0bcpmnlk03382x577qbnbw3i6y08hr3qmg85pqj35scnl6van74c";
phases = "unpackPhase installPhase";
-
bash $src --noexec --target unpacked
-
mkdir -p $out/{opt/googleearth/,bin};
-
tar xf googleearth-data.tar -C $out/opt/googleearth
-
tar xf googleearth-linux-x86.tar -C $out/opt/googleearth
-
cp bin/googleearth $out/opt/googleearth
-
cat > $out/bin/googleearth << EOF
-
export GOOGLEEARTH_DATA_PATH=$out/opt/googleearth
-
exec $out/opt/googleearth/googleearth
-
chmod +x $out/bin/googleearth
-
for i in $nativeBuildInputs; do
-
fullPath=$fullPath:$i/lib
patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
-
--set-rpath $fullPath \
-
$out/opt/googleearth/googleearth-bin
-
for a in $out/opt/googleearth/*.so* ; do
-
patchelf --set-rpath $fullPath $a
description = "A world sphere viewer";
homepage = http://earth.google.com;
license = stdenv.lib.licenses.unfree;
maintainers = [ stdenv.lib.maintainers.viric ];
···
{ stdenv, fetchurl, glibc, mesa, freetype, glib, libSM, libICE, libXi, libXv
, libXrender, libXrandr, libXfixes, libXcursor, libXinerama, libXext, libX11, qt4
+
, zlib, fontconfig, dpkg }:
+
if stdenv.system == "x86_64-linux" then "amd64"
+
else if stdenv.system == "i686-linux" then "i386"
+
else abort "Unsupported architecture";
+
then "0dwnppn5snl5bwkdrgj4cyylnhngi0g66fn2k41j3dvis83x24k6"
+
else "0gndbxrj3kgc2dhjqwjifr3cl85hgpm695z0wi01wvwzhrjqs0l2";
+
fullPath = stdenv.lib.makeLibraryPath [
+
stdenv.mkDerivation rec {
+
version = "7.1.4.1529";
+
name = "googleearth-${version}";
+
url = "https://dl.google.com/earth/client/current/google-earth-stable_current_${arch}.deb";
phases = "unpackPhase installPhase";
+
buildInputs = [ dpkg ];
+
rm $out/bin/google-earth $out/opt/google/earth/free/google-earth
+
ln -s $out/opt/google/earth/free/googleearth $out/bin/google-earth
patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
+
--set-rpath "${fullPath}:\$ORIGIN" \
+
$out/opt/google/earth/free/googleearth-bin
+
for a in $out/opt/google/earth/free/*.so* ; do
+
patchelf --set-rpath "${fullPath}:\$ORIGIN" $a
description = "A world sphere viewer";
homepage = http://earth.google.com;
license = stdenv.lib.licenses.unfree;
maintainers = [ stdenv.lib.maintainers.viric ];
+
platforms = stdenv.lib.platforms.linux;