unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
blob 8c661d234d02403b5fe19e1c9676fbf72ff9ef28 1799 bytes (raw)
name: guix/build/qt-utils.scm 	 # note: path name is non-authoritative(*)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
 
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2016 David Craven <david@craven.ch>
;;;
;;; This file is part of GNU Guix.
;;;
;;; GNU Guix 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.
;;;
;;; GNU Guix 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 GNU Guix.  If not, see <http://www.gnu.org/licenses/>.

(define-module (guix build qt-utils)
  #:use-module (guix build utils)
  #:export (wrap-qt-program))

(define (wrap-qt-program out program inputs)
  (define (suffix env-var path)
    (let ((env-val (getenv env-var)))
      (if env-val (string-append env-val ":" path) path)))

  (let ((qml-path        (suffix "QML2_IMPORT_PATH"
                                 (string-append out "/lib/qt5/qml")))
        (plugin-path     (suffix "QT_PLUGIN_PATH"
                                 (string-append out "/lib/qt5/plugins")))
        (xdg-data-path   (suffix "XDG_DATA_DIRS"
                                 (string-append out "/share")))
        (xdg-config-path (suffix "XDG_CONFIG_DIRS"
                                 (string-append out "/etc/xdg"))))
    (wrap-program (string-append out "/bin/" program)
      inputs
      `("QML2_IMPORT_PATH" = (,qml-path))
      `("QT_PLUGIN_PATH" = (,plugin-path))
      `("XDG_DATA_DIRS" = (,xdg-data-path))
      `("XDG_CONFIG_DIRS" = (,xdg-config-path)))))

debug log:

solving 8c661d234d ...
found 8c661d234d in https://yhetil.org/guix-patches/0892bdfbc097b07631190c8526a41d57b456d343.camel@telenet.be/
found d2486ee86c in https://git.savannah.gnu.org/cgit/guix.git
preparing index
index prepared:
100644 d2486ee86c12590e08a60422b555eb2a270a96d3	guix/build/qt-utils.scm

applying [1/1] https://yhetil.org/guix-patches/0892bdfbc097b07631190c8526a41d57b456d343.camel@telenet.be/
diff --git a/guix/build/qt-utils.scm b/guix/build/qt-utils.scm
index d2486ee86c..8c661d234d 100644

Checking patch guix/build/qt-utils.scm...
Applied patch guix/build/qt-utils.scm cleanly.

index at:
100644 8c661d234d02403b5fe19e1c9676fbf72ff9ef28	guix/build/qt-utils.scm

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).