Merge branch 'patch/google-earth' into 'master'
Draft: nongnu: Add google-earth-pro. See merge request nonguix/nonguix!197
This commit is contained in:
commit
18586da286
249
nongnu/packages/maps.scm
Normal file
249
nongnu/packages/maps.scm
Normal file
|
@ -0,0 +1,249 @@
|
||||||
|
;;; GNU Guix --- Functional package management for GNU
|
||||||
|
;;; Copyright © 2022 Petr Hodina <phodina@protonmail.com>
|
||||||
|
;;;
|
||||||
|
;;; This file is not part of GNU Guix.
|
||||||
|
;;;
|
||||||
|
;;; This program is free software: you can redistribute it and/or modify
|
||||||
|
;;; it under the terms of the GNU General Public License as published by
|
||||||
|
;;; the Free Software Foundation, either version 3 of the License, or
|
||||||
|
;;; (at your option) any later version.
|
||||||
|
;;;
|
||||||
|
;;; This program is distributed in the hope that it will be useful,
|
||||||
|
;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
;;; GNU General Public License for more details.
|
||||||
|
;;;
|
||||||
|
;;; You should have received a copy of the GNU General Public License
|
||||||
|
;;; along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
(define-module (nongnu packages maps)
|
||||||
|
#:use-module (guix packages)
|
||||||
|
#:use-module (guix gexp)
|
||||||
|
#:use-module (gnu packages)
|
||||||
|
#:use-module (gnu packages base)
|
||||||
|
#:use-module (gnu packages bootstrap)
|
||||||
|
#:use-module (gnu packages build-tools)
|
||||||
|
#:use-module (gnu packages cups)
|
||||||
|
#:use-module (gnu packages curl)
|
||||||
|
#:use-module (gnu packages compression)
|
||||||
|
#:use-module (gnu packages fontutils)
|
||||||
|
#:use-module (gnu packages freedesktop)
|
||||||
|
#:use-module (gnu packages gl)
|
||||||
|
#:use-module (gnu packages glib)
|
||||||
|
#:use-module (gnu packages gcc)
|
||||||
|
#:use-module (gnu packages gnome)
|
||||||
|
#:use-module (gnu packages gstreamer)
|
||||||
|
#:use-module (gnu packages networking)
|
||||||
|
#:use-module (gnu packages linux)
|
||||||
|
#:use-module (gnu packages xorg)
|
||||||
|
#:use-module (gnu packages qt)
|
||||||
|
#:use-module (guix download)
|
||||||
|
;; #:use-module (guix build utils)
|
||||||
|
#:use-module (nonguix build-system binary)
|
||||||
|
#:use-module ((guix licenses)
|
||||||
|
#:prefix license:))
|
||||||
|
|
||||||
|
;; Check the latest version with:
|
||||||
|
;; curl -sL https://dl.google.com/linux/earth/deb/dists/stable/main/binary-amd64/Packages | grep -Pom1 'Version: \K[^-]*'
|
||||||
|
(define-public google-earth-pro
|
||||||
|
(package
|
||||||
|
(name "google-earth-pro")
|
||||||
|
(version "7.3.4.8642")
|
||||||
|
(source (origin
|
||||||
|
(method url-fetch)
|
||||||
|
(uri (string-append
|
||||||
|
"https://dl.google.com/linux/earth/deb/pool/main/g/google-earth-pro-stable/google-earth-pro-stable_"
|
||||||
|
version "-r0_amd64.deb"))
|
||||||
|
(sha256
|
||||||
|
(base32
|
||||||
|
"1xwarf77ypndkqk9j4haapp8gmys33grxy4fbrzk63n1qpqkvnzi"))))
|
||||||
|
(build-system binary-build-system)
|
||||||
|
(arguments
|
||||||
|
(list #:install-plan #~`(("opt/google/earth/pro/googleearth-bin" "bin/")
|
||||||
|
("opt/google/earth/pro/" "lib/"
|
||||||
|
#:include-regexp (".*.so"))
|
||||||
|
("usr" "usr"))
|
||||||
|
#:phases #~(modify-phases %standard-phases
|
||||||
|
(replace 'unpack
|
||||||
|
(lambda* (#:key inputs #:allow-other-keys)
|
||||||
|
(let ((debian-files (assoc-ref inputs "source")))
|
||||||
|
(invoke "ar" "x" debian-files)
|
||||||
|
(invoke "tar" "xJf" "data.tar.xz"))))
|
||||||
|
(add-after 'install 'wrap-logic-and-shared-objects
|
||||||
|
(lambda* (#:key inputs outputs #:allow-other-keys)
|
||||||
|
(use-modules (ice-9 ftw)
|
||||||
|
(ice-9 regex)
|
||||||
|
(ice-9 textual-ports))
|
||||||
|
(let* ((google-earth (string-append #$output
|
||||||
|
"/bin/googleearth-bin"))
|
||||||
|
(google-earth-lib (string-append #$output
|
||||||
|
"/lib/libgoogleearth_pro.so"))
|
||||||
|
(rpath (string-append (apply string-append
|
||||||
|
(map (lambda (pkg)
|
||||||
|
(string-append
|
||||||
|
(assoc-ref
|
||||||
|
inputs
|
||||||
|
pkg)
|
||||||
|
"/lib:"))
|
||||||
|
'("alsa-lib"
|
||||||
|
"curl"
|
||||||
|
"cups"
|
||||||
|
"dbus"
|
||||||
|
"desktop-file-utils"
|
||||||
|
"fontconfig-minimal"
|
||||||
|
"freetype"
|
||||||
|
"gcc"
|
||||||
|
"glu"
|
||||||
|
"glibc"
|
||||||
|
"glib"
|
||||||
|
"gst-plugins-base"
|
||||||
|
"hicolor-icon-theme"
|
||||||
|
"libice"
|
||||||
|
"libsm"
|
||||||
|
"libproxy"
|
||||||
|
"libx11"
|
||||||
|
"libxext"
|
||||||
|
"libxcb"
|
||||||
|
"libxi"
|
||||||
|
"libxrender"
|
||||||
|
"mesa"
|
||||||
|
"qtbase"
|
||||||
|
"qtx11extras"
|
||||||
|
"qtmultimedia"
|
||||||
|
"qtlocation"
|
||||||
|
"qtsensors"
|
||||||
|
"qtdeclarative"
|
||||||
|
"qtscript"
|
||||||
|
"qtwebkit"
|
||||||
|
"qtwebchannel"
|
||||||
|
"qtwebengine"
|
||||||
|
"qtsvg"
|
||||||
|
"zlib")))
|
||||||
|
#$output "/lib"))
|
||||||
|
(ld-so (string-append #$glibc
|
||||||
|
#$(glibc-dynamic-linker))))
|
||||||
|
(invoke "patchelf" "--set-rpath" rpath
|
||||||
|
(string-append #$output
|
||||||
|
"/lib/plugins/audio/libqtaudio_alsa.so"))
|
||||||
|
(invoke "patchelf" "--set-rpath" rpath
|
||||||
|
(string-append #$output
|
||||||
|
"/lib/plugins/bearer/libqconnmanbearer.so"))
|
||||||
|
(invoke "patchelf" "--set-rpath" rpath
|
||||||
|
(string-append #$output
|
||||||
|
"/lib/plugins/bearer/libqgenericbearer.so"))
|
||||||
|
(invoke "patchelf" "--set-rpath" rpath
|
||||||
|
(string-append #$output
|
||||||
|
"/lib/plugins/bearer/libqnmbearer.so"))
|
||||||
|
(invoke "patchelf" "--set-rpath" rpath
|
||||||
|
(string-append #$output
|
||||||
|
"/lib/plugins/imageformats/libqgif.so"))
|
||||||
|
(invoke "patchelf" "--set-rpath" rpath
|
||||||
|
(string-append #$output
|
||||||
|
"/lib/plugins/imageformats/libqico.so"))
|
||||||
|
(invoke "patchelf" "--set-rpath" rpath
|
||||||
|
(string-append #$output
|
||||||
|
"/lib/plugins/imageformats/libqjpeg.so"))
|
||||||
|
(invoke "patchelf" "--set-rpath" rpath
|
||||||
|
(string-append #$output
|
||||||
|
"/lib/plugins/imageformats/libqmng.so"))
|
||||||
|
(invoke "patchelf" "--set-rpath" rpath
|
||||||
|
(string-append #$output
|
||||||
|
"/lib/plugins/imageformats/libqsvg.so"))
|
||||||
|
(invoke "patchelf" "--set-rpath" rpath
|
||||||
|
(string-append #$output
|
||||||
|
"/lib/plugins/imageformats/libqwebp.so"))
|
||||||
|
(invoke "patchelf" "--set-rpath" rpath
|
||||||
|
(string-append #$output
|
||||||
|
"/lib/plugins/libnpgeinprocessplugin.so"))
|
||||||
|
(invoke "patchelf" "--set-rpath" rpath
|
||||||
|
(string-append #$output
|
||||||
|
"/lib/plugins/platforms/libqlinuxfb.so"))
|
||||||
|
(invoke "patchelf" "--set-rpath" rpath
|
||||||
|
(string-append #$output
|
||||||
|
"/lib/plugins/platforms/libqminimal.so"))
|
||||||
|
(invoke "patchelf" "--set-rpath" rpath
|
||||||
|
(string-append #$output
|
||||||
|
"/lib/plugins/platforms/libqoffscreen.so"))
|
||||||
|
(invoke "patchelf" "--set-rpath" rpath
|
||||||
|
(string-append #$output
|
||||||
|
"/lib/plugins/platforms/libqxcb.so"))
|
||||||
|
(invoke "patchelf" "--set-rpath" rpath
|
||||||
|
(string-append #$output
|
||||||
|
"/lib/plugins/printsupport/libcupsprintersupport.so"))
|
||||||
|
(with-directory-excursion (string-append #$output
|
||||||
|
"/lib")
|
||||||
|
(for-each (lambda (file)
|
||||||
|
(delete-file file))
|
||||||
|
(list "libQt5XcbQpa.so.5"
|
||||||
|
"libQt5X11Extras.so.5"
|
||||||
|
"libQt5Widgets.so.5"
|
||||||
|
"libQt5WebKitWidgets.so.5"
|
||||||
|
"libQt5WebKit.so.5"
|
||||||
|
"libQt5Svg.so.5"
|
||||||
|
"libQt5ScriptTools.so.5"
|
||||||
|
"libQt5Quick.so.5"
|
||||||
|
"libQt5PrintSupport.so.5"
|
||||||
|
"libQt5OpenGL.so.5"
|
||||||
|
"libQt5Network.so.5"
|
||||||
|
"libQt5MultimediaWidgets.so.5"
|
||||||
|
"libQt5Multimedia.so.5"
|
||||||
|
"libQt5Gui.so.5"
|
||||||
|
"libQt5DBus.so.5"
|
||||||
|
"libQt5Core.so.5")))
|
||||||
|
(for-each (lambda (file)
|
||||||
|
(if (string=? "libdebuginfod.so.1"
|
||||||
|
file)
|
||||||
|
'()
|
||||||
|
(invoke "patchelf" "--set-rpath"
|
||||||
|
rpath
|
||||||
|
(string-append #$output
|
||||||
|
"/lib/"
|
||||||
|
file))))
|
||||||
|
(scandir (string-append #$output
|
||||||
|
"/lib")
|
||||||
|
(lambda (name)
|
||||||
|
(string-contains name ".so"))))
|
||||||
|
(invoke "patchelf" "--set-rpath" rpath
|
||||||
|
google-earth)
|
||||||
|
(invoke "patchelf" "--set-interpreter" ld-so
|
||||||
|
google-earth)))))))
|
||||||
|
(inputs (list alsa-lib
|
||||||
|
curl
|
||||||
|
dbus
|
||||||
|
desktop-file-utils
|
||||||
|
fontconfig
|
||||||
|
freetype
|
||||||
|
`(,gcc "lib")
|
||||||
|
glu
|
||||||
|
glib
|
||||||
|
gst-plugins-base
|
||||||
|
hicolor-icon-theme
|
||||||
|
cups
|
||||||
|
glibc
|
||||||
|
libice
|
||||||
|
libsm
|
||||||
|
libproxy
|
||||||
|
libx11
|
||||||
|
libxext
|
||||||
|
libxcb
|
||||||
|
libxi
|
||||||
|
libxrender
|
||||||
|
mesa
|
||||||
|
qtbase-5
|
||||||
|
qtx11extras
|
||||||
|
qtmultimedia-5
|
||||||
|
qtlocation
|
||||||
|
qtdeclarative-5
|
||||||
|
qtscript
|
||||||
|
qtsensors
|
||||||
|
qtwebchannel-5
|
||||||
|
qtwebengine-5
|
||||||
|
qtwebkit
|
||||||
|
qtsvg-5
|
||||||
|
zlib))
|
||||||
|
(synopsis
|
||||||
|
"3D interface to explore the globe, terrain, streets, buildings and other planets")
|
||||||
|
(description "")
|
||||||
|
(home-page "https://www.google.com/intl/earth/")
|
||||||
|
;; Well what to do
|
||||||
|
(license #f)))
|
Loading…
Reference in New Issue
Block a user