aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Graves <ngraves@ngraves.fr>2024-05-14 22:01:20 +0200
committerGuillaume Le Vaillant <glv@posteo.net>2024-05-15 13:43:42 +0200
commitdcc278885c9d04809008e3053c4ca40760033f55 (patch)
tree0bbf089389b6e7637f7d505a0af0236d85a29d02
parent125fcf9f6969158c7d72469d4fb50dabe5085241 (diff)
downloadguix-dcc278885c9d04809008e3053c4ca40760033f55.tar.gz
guix-dcc278885c9d04809008e3053c4ca40760033f55.zip
gnu: qgis: Improve package style.
* gnu/packages/geo.scm (qgis)[arguments]: Use gexp. Change-Id: Ib72ae48ca0895109548e676c6da2d80ac2e1eca6 Signed-off-by: Guillaume Le Vaillant <glv@posteo.net>
-rw-r--r--gnu/packages/geo.scm57
1 files changed, 25 insertions, 32 deletions
diff --git a/gnu/packages/geo.scm b/gnu/packages/geo.scm
index d67ea90bce..3073af8d32 100644
--- a/gnu/packages/geo.scm
+++ b/gnu/packages/geo.scm
@@ -2920,17 +2920,25 @@ growing set of geoscientific methods.")
(base32 "0mdgqyqr3nswp5qfpjrpr35lxizcrz73a1gs3ddxsd1xr9amzb5s"))))
(build-system cmake-build-system)
(arguments
- `(#:modules ((guix build cmake-build-system)
+ (list
+ #:modules '((guix build cmake-build-system)
((guix build python-build-system) #:prefix python:)
(guix build qt-utils)
(guix build utils))
- #:imported-modules (,@%cmake-build-system-modules
+ #:imported-modules `(,@%cmake-build-system-modules
(guix build python-build-system)
(guix build qt-utils))
- #:configure-flags
- '("-DWITH_QTWEBKIT=NO")
- #:phases
- (modify-phases %standard-phases
+ #:configure-flags
+ #~(list "-DWITH_QTWEBKIT=NO")
+ #:phases
+ #~(let* ((grass-version #$(package-version (this-package-input "grass")))
+ (grass-majorminor (string-join
+ (list-head
+ (string-split grass-version #\.) 2)
+ ""))
+ (grass-dir (string-append #$(this-package-input "grass")
+ "/grass" grass-majorminor)))
+ (modify-phases %standard-phases
;; Configure correct path to PyQt5 SIP directory
(add-after 'unpack 'configure-pyqt5-sip-path
(lambda* (#:key inputs #:allow-other-keys)
@@ -2952,21 +2960,14 @@ growing set of geoscientific methods.")
(replace 'check
(lambda* (#:key inputs outputs tests? parallel-tests?
#:allow-other-keys)
- (when tests?
+ (if tests?
+ (begin
(setenv "HOME" "/tmp")
(system "Xvfb :1 &")
(setenv "DISPLAY" ":1")
(setenv "TRAVIS" "true")
(setenv "CTEST_OUTPUT_ON_FAILURE" "1")
- (let* ((out (assoc-ref outputs "out"))
- (grass-version ,(package-version grass))
- (grass-majorminor (string-join
- (list-head
- (string-split grass-version #\.) 2)
- ""))
- (grass (string-append (assoc-ref inputs "grass")
- "/grass" grass-majorminor)))
- (setenv "GISBASE" grass))
+ (setenv "GISBASE" grass-dir)
(invoke "ctest"
"-j" (if parallel-tests?
(number->string (parallel-job-count))
@@ -3057,31 +3058,23 @@ growing set of geoscientific methods.")
"qgis_sipify"
"qgis_sip_include"
"qgis_sip_uptodate")
- "|")))))
+ "|")))
+ (format #t "test suite not run~%"))))
(add-after 'install 'wrap-python
(assoc-ref python:%standard-phases 'wrap))
(add-after 'wrap-python 'wrap-qt
(lambda* (#:key outputs inputs #:allow-other-keys)
- (let ((out (assoc-ref outputs "out")))
- (wrap-qt-program "qgis" #:output out #:inputs inputs))))
+ (wrap-qt-program "qgis" #:output #$output #:inputs inputs)))
(add-after 'wrap-qt 'wrap-gis
(lambda* (#:key inputs outputs #:allow-other-keys)
;; TODO: Find if there is a way to get SAGA to work.
;; Currently QGIS says "version of SAGA not supported".
;; Disable it for now.
- (let* ((out (assoc-ref outputs "out"))
- ;;(saga (string-append (assoc-ref inputs "saga") "/bin"))
- (grass-version ,(package-version grass))
- (grass-majorminor (string-join
- (list-head
- (string-split grass-version #\.) 2)
- ""))
- (grass (string-append (assoc-ref inputs "grass")
- "/grass" grass-majorminor)))
- (wrap-program (string-append out "/bin/qgis")
- ;;`("PATH" ":" prefix (,saga))
- `("QGIS_PREFIX_PATH" = (,out))
- `("GISBASE" = (,grass)))))))))
+ (wrap-program (string-append #$output "/bin/qgis")
+ ;; `("PATH" ":" prefix
+ ;; (,(dirname (search-input-file inputs "/bin/saga_cmd"))))
+ `("QGIS_PREFIX_PATH" = (,#$output))
+ `("GISBASE" = (,grass-dir)))))))))
(inputs
(list bash-minimal
exiv2