Skip to content
Permalink
Browse files

googleearth: 7.1 -> 7.3 and move to Qt5

  • Loading branch information
peterhoeg committed Oct 17, 2017
1 parent 88b853e commit 4190d1fb5d8e5dbce4d73269a1dcabe6f382b39c
Showing with 58 additions and 39 deletions.
  1. +57 −38 pkgs/applications/misc/googleearth/default.nix
  2. +1 −1 pkgs/top-level/all-packages.nix
@@ -1,16 +1,19 @@
{ stdenv, fetchurl, glibc, mesa, freetype, glib, libSM, libICE, libXi, libXv
, libXrender, libXrandr, libXfixes, libXcursor, libXinerama, libXext, libX11, qt4
, zlib, fontconfig, dpkg }:
, libXrender, libXrandr, libXfixes, libXcursor, libXinerama, libXext, libX11
, qtbase, qtdeclarative, qtlocation, qtmultimedia, qtscript, qtsensors, qtwebchannel, qtwebkit, qtx11extras
, zlib, fontconfig, dpkg, makeWrapper, wrapGAppsHook }:

let
arch =
if stdenv.system == "x86_64-linux" then "amd64"
else if stdenv.system == "i686-linux" then "i386"
else abort "Unsupported architecture";
sha256 =
if arch == "amd64"
then "0dwnppn5snl5bwkdrgj4cyylnhngi0g66fn2k41j3dvis83x24k6"
else "0gndbxrj3kgc2dhjqwjifr3cl85hgpm695z0wi01wvwzhrjqs0l2";
arch = {
"x86_64-linux" = "amd64";
"i686-linux" = "i386";
}."${stdenv.system}" or (throw "system ${stdenv.system} not supported");

sha256 = {
"x86_64-linux" = "05j4j93w64s3gzrp30v4h4sfcwbbndww7g9rkvg09c7rgkl374iw";
"i686-linux" = "16y3sv6cbg71r55kqdqj30szhgnsgk17jpf6j2w7qixl3n233z1b";
}."${stdenv.system}" or (throw "system ${stdenv.system} not supported");

fullPath = stdenv.lib.makeLibraryPath [
glibc
glib
@@ -28,52 +31,68 @@ let
freetype
libXext
libX11
qt4
qtbase qtdeclarative qtlocation qtmultimedia qtscript qtsensors qtwebchannel qtwebkit qtx11extras
zlib
fontconfig
];
in
stdenv.mkDerivation rec {
version = "7.1.4.1529";

in stdenv.mkDerivation rec {
name = "googleearth-${version}";
version = "7.3.0.3832";

src = fetchurl {
url = "https://dl.google.com/earth/client/current/google-earth-stable_current_${arch}.deb";
url = "https://dl.google.com/earth/client/current/google-earth-pro-stable_current_${arch}.deb";
inherit sha256;
};

phases = "unpackPhase installPhase";
dontBuild = true;
dontPatchELF = true;

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

unpackPhase = ''
dpkg-deb -x ${src} ./
mkdir -p $out
dpkg-deb -x ${src} $out
'';

installPhase =''
mkdir $out
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
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
runHook preInstall
dir=$out/opt/google/earth/pro
mv $out/usr/* $out/
rmdir $out/usr
rm $out/bin/* $dir/google-earth-pro $dir/libQt*
for f in $dir/googleearth-bin $dir/repair_tool ; do
patchelf \
--interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
--set-rpath "${fullPath}:\$ORIGIN" \
$f
done
'';
dontPatchELF = true;
for f in $dir/*.so* ; do
patchelf \
--set-rpath "${fullPath}:\$ORIGIN" \
$f
done
for f in $dir/*.desktop ; do
substituteInPlace $f \
--replace Exec=/opt Exec=$out/opt
done
makeWrapper $dir/googleearth $out/bin/google-earth
runHook postInstall
'';

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;
homepage = https://earth.google.com;
license = licenses.unfree;
maintainers = with maintainers; [ viric ];
platforms = platforms.linux;
};
}
@@ -14901,7 +14901,7 @@ with pkgs;

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

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

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

0 comments on commit 4190d1f

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