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