aboutsummaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorNicolas Goaziou <mail@nicolasgoaziou.fr>2017-11-20 18:14:47 +0100
committerNicolas Goaziou <mail@nicolasgoaziou.fr>2017-11-20 18:14:47 +0100
commitaa6ae8d3243ce80d6c427e243c4fa961c3bf8388 (patch)
tree37c2e5c5271d2596a4bc1f459673e9b295ab30fd /gnu
parent92be9ee7e1cfdc8f7dc943217a897611e686c787 (diff)
downloadpatches-aa6ae8d3243ce80d6c427e243c4fa961c3bf8388.tar
patches-aa6ae8d3243ce80d6c427e243c4fa961c3bf8388.tar.gz
gnu: scribus: Fix No module named _sysconfigdata_nd.
* gnu/packages/scribus.scm (scribus): Wrap PATH with expected Python around executable. Fixes <https://bugs.gnu.org/25035>.
Diffstat (limited to 'gnu')
-rw-r--r--gnu/packages/scribus.scm14
1 files changed, 13 insertions, 1 deletions
diff --git a/gnu/packages/scribus.scm b/gnu/packages/scribus.scm
index 6230195ed4..860d346778 100644
--- a/gnu/packages/scribus.scm
+++ b/gnu/packages/scribus.scm
@@ -81,7 +81,19 @@
(arguments
`(#:tests? #f ;no test target
#:configure-flags
- '("-DWANT_GRAPHICSMAGICK=1")))
+ '("-DWANT_GRAPHICSMAGICK=1")
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'install 'wrap-program
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ ;; Fix "ImportError: No module named _sysconfigdata_nd" where
+ ;; Scribus checks PATH and eventually runs system's Python
+ ;; instead of package's.
+ (let* ((out (assoc-ref outputs "out"))
+ (py2 (assoc-ref inputs "python")))
+ (wrap-program (string-append out "/bin/scribus")
+ `("PATH" ":" prefix (,(string-append py2 "/bin")))))
+ #t)))))
(inputs
`(("boost" ,boost)
("cairo" ,cairo)