;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2013 Nikita Karetnikov ;;; ;;; 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 gobject-introspection) #:use-module (guix licenses) #:use-module (guix packages) #:use-module (guix download) #:use-module (guix build-system gnu) #:use-module (gnu packages bison) #:use-module (gnu packages flex) #:use-module (gnu packages glib) #:use-module (gnu packages libffi) #:use-module (gnu packages pkg-config) #:use-module (gnu packages python)) (define-public gobject-introspection (package (name "gobject-introspection") (version "1.34.2") (source (origin (method url-fetch) (uri (string-append "http://ftp.gnome.org/pub/gnome/sources/" name "/1.34/" name "-" version ".tar.xz")) (sha256 (base32 "0a9lq0y67sr3g37l1hy0biqn046jr9wnd05hvwi8j8g2bjilhydw")))) (build-system gnu-build-system) (arguments `(#:phases (alist-cons-before 'configure 'fix-sh (lambda _ (substitute* '("configure" "build-aux/ltmain.sh" "m4/libtool.m4") (("-/bin/sh") (string-append "-" (which "sh")))) (substitute* '("configure" "build-aux/missing" "build-aux/ltmain.sh" "build-aux/config.guess") ((" /bin/sh") (string-append " " (which "sh"))))) (alist-cons-after 'configure 'fix-python (lambda _ (substitute* '("tools/g-ir-annotation-tool.in" "tools/g-ir-scanner.in") (("@PYTHON@") (which "python")))) (alist-cons-before 'build 'fix-sh (lambda _ (substitute* "libtool" (("-/bin/sh") (string-append "-" (which "sh"))) ((" /bin/sh") (string-append " " (which "sh"))))) %standard-phases))))) (inputs `(("bison" ,bison) ("flex" ,flex) ("glib" ,glib) ("libffi" ,libffi) ("pkg-config" ,pkg-config) ("python" ,python))) (home-page "https://live.gnome.org/GObjectIntrospection") (synopsis "GObject introspection, a middleware layer between C libraries") (description "GObject introspection is a middleware layer between C libraries (using GObject) and language bindings. The C library can be scanned at compile time and generate a metadata file, in addition to the actual native C library. Then at runtime, language bindings can read this metadata and automatically provide bindings to call into the C library.") (license (list lgpl2.0+ gpl2+ bsd-2))))