summary refs log tree commit diff
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2015-12-18 10:57:53 +0100
committerLudovic Courtès <ludo@gnu.org>2015-12-18 11:04:22 +0100
commitae115bc75a4a70f473608a60720c048d771f1885 (patch)
treeee383473ac08a8902359116ccc56158671652d1b
parentbe4fbbe01b76da5e9b3b0156ace8f174efe5df3e (diff)
downloadguix-ae115bc75a4a70f473608a60720c048d771f1885.tar.gz
gnu: python2-pygtk: Use 'modify-phases'.
* gnu/packages/gtk.scm (python2-pygtk)[arguments]: Use 'modify-phases'.
-rw-r--r--gnu/packages/gtk.scm45
1 files changed, 22 insertions, 23 deletions
diff --git a/gnu/packages/gtk.scm b/gnu/packages/gtk.scm
index c0c0794f4a..ccd9ad57cf 100644
--- a/gnu/packages/gtk.scm
+++ b/gnu/packages/gtk.scm
@@ -1005,29 +1005,28 @@ extensive documentation, including API reference and a tutorial.")
        ("gtk+"             ,gtk+-2)))
     (arguments
      `(#:tests? #f
-       #:phases (alist-cons-after
-                 'configure 'fix-codegen
-                 (lambda* (#:key inputs #:allow-other-keys)
-                   (substitute* "pygtk-codegen-2.0"
-                     (("^prefix=.*$")
-                      (string-append
-                       "prefix="
-                       (assoc-ref inputs "python-pygobject") "\n"))))
-                 (alist-cons-after
-                  'install 'install-pth
-                  (lambda* (#:key inputs outputs #:allow-other-keys)
-                    ;; pygtk's modules are stored in a subdirectory of python's
-                    ;; site-packages directory.  Add a .pth file so that python
-                    ;; will add that subdirectory to its module search path.
-                    (let* ((out    (assoc-ref outputs "out"))
-                           (site   (string-append out "/lib/python"
-                                                  ,(version-major+minor
-                                                    (package-version python-2))
-                                                  "/site-packages")))
-                      (call-with-output-file (string-append site "/pygtk.pth")
-                        (lambda (port)
-                          (format port "gtk-2.0~%")))))
-                  %standard-phases))))
+       #:phases (modify-phases %standard-phases
+                  (add-after 'configure 'fix-codegen
+                    (lambda* (#:key inputs #:allow-other-keys)
+                      (substitute* "pygtk-codegen-2.0"
+                        (("^prefix=.*$")
+                         (string-append
+                          "prefix="
+                          (assoc-ref inputs "python-pygobject") "\n")))))
+                  (add-after 'install 'install-pth
+                    (lambda* (#:key inputs outputs #:allow-other-keys)
+                      ;; pygtk's modules are stored in a subdirectory of
+                      ;; python's site-packages directory.  Add a .pth file so
+                      ;; that python will add that subdirectory to its module
+                      ;; search path.
+                      (let* ((out    (assoc-ref outputs "out"))
+                             (site   (string-append out "/lib/python"
+                                                    ,(version-major+minor
+                                                      (package-version python-2))
+                                                    "/site-packages")))
+                        (call-with-output-file (string-append site "/pygtk.pth")
+                          (lambda (port)
+                            (format port "gtk-2.0~%")))))))))
     (home-page "http://www.pygtk.org/")
     (synopsis "Python bindings for GTK+")
     (description