Skip to content
Permalink
Browse files

googleearth

  • Loading branch information
peterhoeg committed Apr 30, 2018
1 parent 1b1be29 commit 778ba7c2d1023bc5422d06b91512561a7fe99e5c
Showing with 37 additions and 28 deletions.
  1. +35 −27 pkgs/applications/misc/googleearth/default.nix
  2. +2 −1 pkgs/top-level/all-packages.nix
@@ -1,16 +1,23 @@
{ stdenv, fetchurl, glibc, libGLU_combined, freetype, glib, libSM, libICE, libXi, libXv
, libXrender, libXrandr, libXfixes, libXcursor, libXinerama, libXext, libX11, qt4
, zlib, fontconfig, dpkg }:
, libXrender, libXrandr, libXfixes, libXcursor, libXinerama, libXext, libX11, qt5
, zlib, fontconfig, dpkg, libproxy, libxml2, gstreamer, gst_all_1, dbus }:

let
arch =
if stdenv.system == "x86_64-linux" then "amd64"
else if stdenv.system == "i686-linux" then "i386"
else throw "Unsupported system ${stdenv.system}";
sha256 =
if arch == "amd64"
then "0dwnppn5snl5bwkdrgj4cyylnhngi0g66fn2k41j3dvis83x24k6"
else "0gndbxrj3kgc2dhjqwjifr3cl85hgpm695z0wi01wvwzhrjqs0l2";
arch = {
"x86_64-linux" = "amd64";
"i686-linux" = "i386";
}."${stdenv.system}"; # or throw "Unsupported system ${stdenv.system}";

sha256 = {
"amd64" = "03a973mfzz9yyvq9yhvb46p33dnds3piigcpsh114hl904kik27c";
"i386" = "16y3sv6cbg71r55kqdqj30szhgnsgk17jpf6j2w7qixl3n233z1b";
}."${arch}";

version = {
"amd64" = "7.3.1.4507-r0";
"i386" = "7.3.0.3832-r0";
}."${arch}";

fullPath = stdenv.lib.makeLibraryPath [
glibc
glib
@@ -28,23 +35,26 @@ let
freetype
libXext
libX11
qt4
zlib
fontconfig
libproxy
libxml2
gstreamer
dbus
gst_all_1.gstreamer
gst_all_1.gst-plugins-base
];
in
stdenv.mkDerivation rec {
version = "7.1.4.1529";
name = "googleearth-${version}";

in stdenv.mkDerivation rec {
name = "googleearth-${version}";
src = fetchurl {
url = "https://dl.google.com/earth/client/current/google-earth-stable_current_${arch}.deb";
inherit sha256;
};

phases = "unpackPhase installPhase";

buildInputs = [ dpkg ];
nativeBuildInputs = [ dpkg ];

unpackPhase = ''
dpkg-deb -x ${src} ./
@@ -55,25 +65,23 @@ stdenv.mkDerivation rec {
mv usr/* $out/
rmdir usr
mv * $out/
rm $out/bin/google-earth $out/opt/google/earth/free/google-earth
ln -s $out/opt/google/earth/free/googleearth $out/bin/google-earth
rm $out/bin/google-earth-pro $out/opt/google/earth/pro/google-earth-pro
ln -s $out/opt/google/earth/pro/googleearth $out/bin/google-earth-pro
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
$out/opt/google/earth/pro/googleearth-bin
for a in $out/opt/google/earth/pro/*.so* ; do
patchelf --set-rpath "${fullPath}:\$ORIGIN" $a
done
'';

dontPatchELF = true;
# dontPatchELF = true;

meta = {
meta = with stdenv.lib; {
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;
license = licenses.unfree;
maintainers = with maintainers; [ viric ];
platforms = platforms.linux;
};
}

google-chrome-dev = google-chrome.override { chromium = chromiumDev; channel = "dev"; };

googleearth = callPackage_i686 ../applications/misc/googleearth { };
# googleearth = callPackage_i686 ../applications/misc/googleearth { };
googleearth = callPackage ../applications/misc/googleearth { };

google-play-music-desktop-player = callPackage ../applications/audio/google-play-music-desktop-player {
inherit (gnome2) GConf;

0 comments on commit 778ba7c

Please sign in to comment.
You can’t perform that action at this time.