2011-02-09 13:33:46 +00:00
|
|
|
{ stdenv, fetchurl, glibc, mesa, freetype, glib, libSM, libICE, libXi, libXv
|
|
|
|
, libXrender, libXrandr, libXfixes, libXcursor, libXinerama, libXext, libX11, qt4
|
|
|
|
, zlib, fontconfig }:
|
2009-04-13 16:40:51 +01:00
|
|
|
|
2009-04-15 10:09:45 +01:00
|
|
|
/* I haven't found any x86_64 package from them */
|
|
|
|
assert stdenv.system == "i686-linux";
|
|
|
|
|
2009-04-13 16:40:51 +01:00
|
|
|
stdenv.mkDerivation {
|
2011-05-21 12:22:20 +01:00
|
|
|
name = "googleearth-6.0.3.2197";
|
2009-04-13 16:40:51 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = http://dl.google.com/earth/client/current/GoogleEarthLinux.bin;
|
2011-05-21 12:22:20 +01:00
|
|
|
sha256 = "0bcpmnlk03382x577qbnbw3i6y08hr3qmg85pqj35scnl6van74c";
|
2009-04-13 16:40:51 +01:00
|
|
|
};
|
|
|
|
|
2012-12-28 18:20:09 +00:00
|
|
|
nativeBuildInputs = [
|
2009-04-13 16:40:51 +01:00
|
|
|
glibc
|
|
|
|
glib
|
|
|
|
stdenv.gcc.gcc
|
|
|
|
libSM
|
|
|
|
libICE
|
|
|
|
libXi
|
|
|
|
libXv
|
|
|
|
mesa
|
|
|
|
libXrender
|
|
|
|
libXrandr
|
|
|
|
libXfixes
|
|
|
|
libXcursor
|
|
|
|
libXinerama
|
|
|
|
freetype
|
|
|
|
libXext
|
|
|
|
libX11
|
2010-10-16 14:11:06 +01:00
|
|
|
qt4
|
2009-10-06 18:37:39 +01:00
|
|
|
zlib
|
2011-02-09 13:33:46 +00:00
|
|
|
fontconfig
|
2009-04-13 16:40:51 +01:00
|
|
|
];
|
|
|
|
|
|
|
|
phases = "unpackPhase installPhase";
|
2010-05-31 00:25:30 +01:00
|
|
|
|
2009-04-13 16:40:51 +01:00
|
|
|
unpackPhase = ''
|
|
|
|
bash $src --noexec --target unpacked
|
|
|
|
cd unpacked
|
|
|
|
'';
|
2010-05-31 00:25:30 +01:00
|
|
|
|
2009-04-13 16:40:51 +01:00
|
|
|
installPhase =''
|
2012-01-18 20:16:00 +00:00
|
|
|
mkdir -p $out/{opt/googleearth/,bin};
|
2009-04-13 16:40:51 +01:00
|
|
|
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
|
|
|
|
#!/bin/sh
|
|
|
|
export GOOGLEEARTH_DATA_PATH=$out/opt/googleearth
|
|
|
|
exec $out/opt/googleearth/googleearth
|
|
|
|
EOF
|
|
|
|
chmod +x $out/bin/googleearth
|
|
|
|
|
|
|
|
fullPath=
|
2012-12-28 18:20:09 +00:00
|
|
|
for i in $nativeBuildInputs; do
|
2009-04-13 16:40:51 +01:00
|
|
|
fullPath=$fullPath:$i/lib
|
|
|
|
done
|
|
|
|
|
2010-01-19 17:15:47 +00:00
|
|
|
patchelf --interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" \
|
2009-04-13 16:40:51 +01:00
|
|
|
--set-rpath $fullPath \
|
|
|
|
$out/opt/googleearth/googleearth-bin
|
|
|
|
|
|
|
|
for a in $out/opt/googleearth/*.so* ; do
|
2010-01-19 17:15:47 +00:00
|
|
|
patchelf --set-rpath $fullPath $a
|
2009-04-13 16:40:51 +01:00
|
|
|
done
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
2009-12-23 19:55:58 +00:00
|
|
|
description = "A world sphere viewer";
|
|
|
|
homepage = http://earth.google.com;
|
2014-06-19 05:19:00 +01:00
|
|
|
license = stdenv.lib.licenses.unfree;
|
2010-02-05 19:22:26 +00:00
|
|
|
maintainers = [ stdenv.lib.maintainers.viric ];
|
2009-04-13 16:40:51 +01:00
|
|
|
};
|
|
|
|
}
|