From 28659b408990d41259c4eeb1302f593d5a44f638 Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Mon, 16 Mar 2015 07:54:13 +0100 Subject: [PATCH 3/3] gnu: Add IBus. * gnu/packages/ibus.scm: New file. * gnu-system.am (GNU_SYSTEM_MODULES): Add it. --- gnu-system.am | 1 + gnu/packages/ibus.scm | 97 +++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 98 insertions(+) create mode 100644 gnu/packages/ibus.scm diff --git a/gnu-system.am b/gnu-system.am index c3e8c5b..ee01a35 100644 --- a/gnu-system.am +++ b/gnu-system.am @@ -146,6 +146,7 @@ GNU_SYSTEM_MODULES = \ gnu/packages/haskell.scm \ gnu/packages/hugs.scm \ gnu/packages/hurd.scm \ + gnu/packages/ibus.scm \ gnu/packages/icu4c.scm \ gnu/packages/idutils.scm \ gnu/packages/image.scm \ diff --git a/gnu/packages/ibus.scm b/gnu/packages/ibus.scm new file mode 100644 index 0000000..55ed6e8 --- /dev/null +++ b/gnu/packages/ibus.scm @@ -0,0 +1,97 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2015 Ricardo Wurmus +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see . + +(define-module (gnu packages ibus) + #:use-module (guix licenses) + #:use-module (guix packages) + #:use-module (guix download) + #:use-module (guix build-system gnu) + #:use-module (guix build-system glib-or-gtk) + #:use-module (gnu packages) + #:use-module (gnu packages glib) + #:use-module (gnu packages gnome) + #:use-module (gnu packages gtk) + #:use-module (gnu packages iso-codes) + #:use-module (gnu packages pkg-config) + #:use-module (gnu packages python)) + +(define-public ibus + (package + (name "ibus") + (version "1.5.5") + (source (origin + (method url-fetch) + (uri (string-append "https://ibus.googlecode.com/files/ibus-" + version ".tar.gz")) + (sha256 + (base32 + "1v4a9xv2k26g6ggk4282ynfvh68j2r5hg1cdpvnryfa8c2pkdaq2")))) + (build-system glib-or-gtk-build-system) + (arguments + `(#:tests? #f ; tests fail because there's no connection to dbus + #:make-flags + (list "CC=gcc" + (string-append "pyoverridesdir=" + (assoc-ref %outputs "out") + "/lib/python2.7/site-packages/gi/overrides/")) + #:phases + (alist-cons-before + 'configure 'disable-dconf-update + (lambda _ + (substitute* "data/dconf/Makefile.in" + (("dconf update") "echo dconf update")) + #t) + (alist-cons-after + 'wrap-program 'wrap-with-additional-paths + (lambda* (#:key inputs outputs #:allow-other-keys) + ;; Make sure 'ibus-setup' runs with the correct PYTHONPATH and + ;; GI_TYPELIB_PATH. + (let ((out (assoc-ref outputs "out"))) + (substitute* (string-append out "/bin/.ibus-setup-real") + (("exec ") + (string-append "export PYTHONPATH=\"" + (getenv "PYTHONPATH") + "${PYTHONPATH:+:}$PYTHONPATH" "\"\n" + "export GI_TYPELIB_PATH=\"" + (getenv "GI_TYPELIB_PATH") + ":" out "/lib/girepository-1.0" + "${GI_TYPELIB_PATH:+:}$GI_TYPELIB_PATH" + "\"\n" + "\nexec "))) + #t)) + %standard-phases)))) + (inputs + `(("dbus" ,dbus) + ("dconf" ,dconf) + ("gconf" ,gconf) + ("glib" ,glib) + ("gtk2" ,gtk+-2) + ("intltool" ,intltool) + ("libnotify" ,libnotify) + ("iso-codes" ,iso-codes) + ("pygobject2" ,python2-pygobject) + ("python2" ,python-2))) + (native-inputs + `(("glib" ,glib "bin") ; for glib-genmarshal + ("gobject-introspection" ,gobject-introspection) ; for g-ir-compiler + ("pkg-config" ,pkg-config))) + (synopsis "Intelligent input bus") + (description + "IBus means Intelligent Input Bus and is an input framework.") + (home-page "http://ibus.googlecode.com/") + (license lgpl2.1+))) -- 2.1.0