[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
02/02: gnu: librecad: Ensure that icons are found at runtime.
From: |
Ricardo Wurmus |
Subject: |
02/02: gnu: librecad: Ensure that icons are found at runtime. |
Date: |
Mon, 27 Nov 2017 06:12:03 -0500 (EST) |
rekado pushed a commit to branch master
in repository guix.
commit 9cc51d16cb22f8a0c50fe81c98abb3b9108db9ff
Author: Ricardo Wurmus <address@hidden>
Date: Mon Nov 27 12:10:38 2017 +0100
gnu: librecad: Ensure that icons are found at runtime.
* gnu/packages/engineering.scm (librecad)[arguments]: Add phase
"wrap-executable".
---
gnu/packages/engineering.scm | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm
index b2127ba..5c36de1 100644
--- a/gnu/packages/engineering.scm
+++ b/gnu/packages/engineering.scm
@@ -127,7 +127,19 @@
(install-file "unix/librecad" bin)
(mkdir-p share)
(copy-recursively "unix/resources" share))
- #t)))))
+ #t))
+ ;; Ensure that icons are found at runtime
+ (add-after 'install 'wrap-executable
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (qt '("qtbase" "qtsvg")))
+ (wrap-program (string-append out "/bin/librecad")
+ `("QT_PLUGIN_PATH" ":" prefix
+ ,(map (lambda (label)
+ (string-append (assoc-ref inputs label)
+ "/lib/qt5/plugins/"))
+ qt)))
+ #t))))))
(inputs
`(("boost" ,boost)
("muparser" ,muparser)