diff options
Diffstat (limited to 'gnu/packages/gtk.scm')
-rw-r--r-- | gnu/packages/gtk.scm | 117 |
1 files changed, 113 insertions, 4 deletions
diff --git a/gnu/packages/gtk.scm b/gnu/packages/gtk.scm index 15d6ab441b..8646397aad 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 (gnu packages xdisorg)) (define-public atk (package @@ -272,10 +274,11 @@ printing and other features typical of a source code editor.") (base32 "05s6ksvy1yan6h6zny9n3bmvygcnzma6ljl6i0z9cci2xg116c8q")))) (build-system gnu-build-system) - (inputs + (propagated-inputs ; required by gdk-pixbuf-2.0.pc `(("glib" ,glib) - ("libjpeg" ,libjpeg) - ("libpng" ,libpng) + ("libpng" ,libpng))) + (inputs + `(("libjpeg" ,libjpeg) ("libtiff" ,libtiff))) (native-inputs `(("pkg-config" ,pkg-config) @@ -634,3 +637,109 @@ extensive documentation, including API reference and a tutorial.") ("atkmm" ,atkmm) ("gtk+" ,gtk+-2) ("glibmm" ,glibmm))))) + +(define-public python-pycairo + (package + (name "python-pycairo") + (version "1.10.0") + (source + (origin + (method url-fetch) + (uri (string-append "http://cairographics.org/releases/pycairo-" + version ".tar.bz2")) + (sha256 + (base32 + "1gjkf8x6hyx1skq3hhwcbvwifxvrf9qxis5vx8x5igmmgs70g94s")))) + (build-system python-build-system) + (native-inputs + `(("pkg-config" ,pkg-config))) + (propagated-inputs ;pycairo.pc references cairo + `(("cairo" ,cairo))) + (arguments + `(#:tests? #f + #:phases (alist-cons-before + 'build 'configure + (lambda* (#:key outputs #:allow-other-keys) + (zero? (system* "./waf" "configure" + (string-append "--prefix=" + (assoc-ref outputs "out"))))) + (alist-replace + 'build + (lambda _ + (zero? (system* "./waf" "build"))) + (alist-replace + 'install + (lambda _ + (zero? (system* "./waf" "install"))) + %standard-phases))))) + (home-page "http://cairographics.org/pycairo/") + (synopsis "Python bindings for cairo") + (description + "Pycairo is a set of Python bindings for the Cairo graphics library.") + (license license:lgpl3+))) + +(define-public python2-py2cairo + (package (inherit python-pycairo) + (name "python2-py2cairo") + (version "1.10.0") + (source + (origin + (method url-fetch) + (uri (string-append "http://cairographics.org/releases/py2cairo-" + version ".tar.bz2")) + (sha256 + (base32 + "0cblk919wh6w0pgb45zf48xwxykfif16qk264yga7h9fdkq3j16k")))) + (arguments + `(#:python ,python-2 + ,@(package-arguments python-pycairo))) + ;; Dual-licensed under LGPL 2.1 or Mozilla Public License 1.1 + (license (list license:lgpl2.1 license:mpl1.1)))) + +(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) + ;; 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))) + (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+))) |