guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 12/13] gnu: Add python2-pygtk.


From: Eric Bavier
Subject: [PATCH 12/13] gnu: Add python2-pygtk.
Date: Thu, 20 Nov 2014 23:41:07 -0600

* gnu/packages/gtk.scm (python2-pygtk): New variable.
---
 gnu/packages/gtk.scm |   49 ++++++++++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 48 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/gtk.scm b/gnu/packages/gtk.scm
index d8c8a29..a4b336b 100644
--- a/gnu/packages/gtk.scm
+++ b/gnu/packages/gtk.scm
@@ -25,6 +25,7 @@
   #:use-module (guix packages)
   #:use-module (guix download)
   #:use-module (guix build-system gnu)
+  #:use-module (guix build-system python)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages fontutils)
   #:use-module (gnu packages ghostscript)
@@ -38,7 +39,8 @@
   #:use-module (gnu packages python)
   #:use-module (gnu packages guile)
   #:use-module (gnu packages xml)
-  #:use-module (gnu packages xorg))
+  #:use-module (gnu packages xorg)
+  #:use-module ((srfi srfi-1) #:select (take)))
 
 (define-public atk
   (package
@@ -630,3 +632,48 @@ extensive documentation, including API reference and a 
tutorial.")
        ("atkmm" ,atkmm)
        ("gtk+" ,gtk+-2)
        ("glibmm" ,glibmm)))))
+
+(define-public python2-pygtk
+  (package
+    (name "python2-pygtk")
+    (version "2.24.0")
+    (source
+     (origin
+      (method url-fetch)
+      (uri (string-append "http://ftp.gnome.org/pub/GNOME/sources";
+                          "/pygtk/" (version-major+minor version)
+                          "/pygtk-" version ".tar.bz2"))
+      (sha256
+       (base32
+        "04k942gn8vl95kwf0qskkv6npclfm31d78ljkrkgyqxxcni1w76d"))))
+    (build-system gnu-build-system)
+    (native-inputs
+     `(("pkg-config" ,pkg-config)))
+    (inputs
+     `(("python" ,python-2)
+       ("glib"   ,glib)))
+    (propagated-inputs
+     `(("python-pycairo"   ,python2-py2cairo)    ;loaded at runtime
+       ("python-pygobject" ,python2-pygobject-2) ;referenced in pc file
+       ("gtk+"             ,gtk+-2)))
+    (arguments
+     `(#:tests? #f
+       #:phases (alist-cons-after
+                 'install 'install-pth
+                 (lambda* (#:key inputs outputs #:allow-other-keys)
+                   (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)))
+    (home-page "http://www.pygtk.org/";)
+    (synopsis "Python bindings for GTK")
+    (description
+     "PyGTK allows you to write full featured GTK programs in Python.  It is
+targetted at GTK 2.x, and can be used in conjunction with gnome-python to
+write Gnome applications.")
+    (license license:lgpl2.1+)))
-- 
1.7.9.5




reply via email to

[Prev in Thread] Current Thread [Next in Thread]