aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/gimp.scm
diff options
context:
space:
mode:
author宋文武 <iyzsong@gmail.com>2016-08-21 00:29:19 +0800
committer宋文武 <iyzsong@gmail.com>2016-08-21 08:28:42 +0800
commit580dfc332966d9a5b4d432bac82d3dec276efbaf (patch)
tree8ee348f56bbcf9b5daecabd01d23241928a127f4 /gnu/packages/gimp.scm
parenta7f05b419282d3c5a1a0ffba92f858956a0a8f11 (diff)
downloadguix-580dfc332966d9a5b4d432bac82d3dec276efbaf.tar
guix-580dfc332966d9a5b4d432bac82d3dec276efbaf.tar.gz
gnu: gimp: Fix python plugin.
* gnu/packages/gimp.scm (gimp)[arguments]: Add phase to install 'sitecustomize.py'.
Diffstat (limited to 'gnu/packages/gimp.scm')
-rw-r--r--gnu/packages/gimp.scm18
1 files changed, 17 insertions, 1 deletions
diff --git a/gnu/packages/gimp.scm b/gnu/packages/gimp.scm
index 7e0b54aef8..6540990b36 100644
--- a/gnu/packages/gimp.scm
+++ b/gnu/packages/gimp.scm
@@ -141,7 +141,23 @@ buffers.")
(arguments
'(#:configure-flags (list (string-append "--with-html-dir="
(assoc-ref %outputs "doc")
- "/share/gtk-doc/html"))))
+ "/share/gtk-doc/html"))
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'install 'install-sitecustomize.py
+ ;; Install 'sitecustomize.py' into gimp's python directory to
+ ;; add pygobject and pygtk to pygimp's search path.
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((pythonpath (getenv "PYTHONPATH"))
+ (out (assoc-ref outputs "out"))
+ (sitecustomize.py
+ (string-append
+ out "/lib/gimp/2.0/python/sitecustomize.py")))
+ (call-with-output-file sitecustomize.py
+ (lambda (port)
+ (format port "import site~%")
+ (format port "for dir in '~a'.split(':'):~%" pythonpath)
+ (format port " site.addsitedir(dir)~%")))))))))
(inputs
`(("babl" ,babl)
("glib" ,glib)