aboutsummaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2014-05-27 23:19:49 +0200
committerLudovic Courtès <ludo@gnu.org>2014-05-27 23:19:49 +0200
commitaf018f5e0a1b7c67e9f40ca68929bd35b94206d3 (patch)
tree8c3efe66f8ac1f6178357937c0a41c6f5ff8f0f8 /gnu
parentd84a7be6675bd647931d8eff9134d00dd5a6bd58 (diff)
parent35066aa596931ef84922298c2760ceba69940cd1 (diff)
downloadguix-af018f5e0a1b7c67e9f40ca68929bd35b94206d3.tar
guix-af018f5e0a1b7c67e9f40ca68929bd35b94206d3.tar.gz
Merge branch 'master' into core-updates
Diffstat (limited to 'gnu')
-rw-r--r--gnu/packages/admin.scm180
-rw-r--r--gnu/packages/algebra.scm23
-rw-r--r--gnu/packages/autotools.scm14
-rw-r--r--gnu/packages/backup.scm71
-rw-r--r--gnu/packages/base.scm3
-rw-r--r--gnu/packages/bittorrent.scm91
-rw-r--r--gnu/packages/calcurse.scm2
-rw-r--r--gnu/packages/ccache.scm57
-rw-r--r--gnu/packages/compression.scm23
-rw-r--r--gnu/packages/cyrus-sasl.scm10
-rw-r--r--gnu/packages/doxygen.scm74
-rw-r--r--gnu/packages/ftp.scm56
-rw-r--r--gnu/packages/games.scm64
-rw-r--r--gnu/packages/gcc.scm11
-rw-r--r--gnu/packages/gdb.scm10
-rw-r--r--gnu/packages/gimp.scm63
-rw-r--r--gnu/packages/glib.scm11
-rw-r--r--gnu/packages/gnome.scm665
-rw-r--r--gnu/packages/gnupg.scm2
-rw-r--r--gnu/packages/gtk.scm88
-rw-r--r--gnu/packages/guile.scm11
-rw-r--r--gnu/packages/imagemagick.scm4
-rw-r--r--gnu/packages/kde.scm131
-rw-r--r--gnu/packages/libevent.scm47
-rw-r--r--gnu/packages/linux.scm174
-rw-r--r--gnu/packages/lua.scm17
-rw-r--r--gnu/packages/mail.scm73
-rw-r--r--gnu/packages/make-bootstrap.scm6
-rw-r--r--gnu/packages/man.scm6
-rw-r--r--gnu/packages/maths.scm545
-rw-r--r--gnu/packages/mcrypt.scm114
-rw-r--r--gnu/packages/mp3.scm27
-rw-r--r--gnu/packages/mpd.scm6
-rw-r--r--gnu/packages/mpi.scm130
-rw-r--r--gnu/packages/openssl.scm6
-rw-r--r--gnu/packages/patches/ccache-stdc-predef-test.patch157
-rw-r--r--gnu/packages/patches/clucene-pkgconfig.patch21
-rw-r--r--gnu/packages/patches/doxygen-test.patch38
-rw-r--r--gnu/packages/patches/doxygen-tmake.patch24
-rw-r--r--gnu/packages/patches/mhash-keygen-test-segfault.patch13
-rw-r--r--gnu/packages/patches/openssl-CVE-2010-5298.patch27
-rw-r--r--gnu/packages/patches/openssl-extension-checking-fixes.patch40
-rw-r--r--gnu/packages/patches/perl-tk-x11-discover.patch14
-rw-r--r--gnu/packages/patches/petsc-fix-threadcomm.patch15
-rw-r--r--gnu/packages/patches/pybugz-encode-error.patch17
-rw-r--r--gnu/packages/patches/pybugz-stty.patch19
-rw-r--r--gnu/packages/patches/scotch-test-threading.patch139
-rw-r--r--gnu/packages/patches/soprano-find-clucene.patch15
-rw-r--r--gnu/packages/patches/superlu-dist-scotchmetis.patch21
-rw-r--r--gnu/packages/pciutils.scm91
-rw-r--r--gnu/packages/perl.scm4
-rw-r--r--gnu/packages/python.scm56
-rw-r--r--gnu/packages/qemu.scm4
-rw-r--r--gnu/packages/qt.scm9
-rw-r--r--gnu/packages/rdf.scm128
-rw-r--r--gnu/packages/rsync.scm27
-rw-r--r--gnu/packages/screen.scm4
-rw-r--r--gnu/packages/sdl.scm15
-rw-r--r--gnu/packages/slim.scm12
-rw-r--r--gnu/packages/ssh.scm35
-rw-r--r--gnu/packages/tcl.scm4
-rw-r--r--gnu/packages/version-control.scm24
-rw-r--r--gnu/packages/video.scm178
-rw-r--r--gnu/packages/wdiff.scm4
-rw-r--r--gnu/packages/xiph.scm10
-rw-r--r--gnu/packages/xorg.scm20
-rw-r--r--gnu/services.scm12
-rw-r--r--gnu/services/avahi.scm108
-rw-r--r--gnu/services/base.scm219
-rw-r--r--gnu/services/dbus.scm120
-rw-r--r--gnu/services/dmd.scm76
-rw-r--r--gnu/services/networking.scm58
-rw-r--r--gnu/services/xorg.scm118
-rw-r--r--gnu/system.scm553
-rw-r--r--gnu/system/file-systems.scm72
-rw-r--r--gnu/system/grub.scm84
-rw-r--r--gnu/system/linux-initrd.scm347
-rw-r--r--gnu/system/linux.scm89
-rw-r--r--gnu/system/shadow.scm117
-rw-r--r--gnu/system/vm.scm478
80 files changed, 5276 insertions, 1175 deletions
diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm
index 51b40c889e..fded33c60b 100644
--- a/gnu/packages/admin.scm
+++ b/gnu/packages/admin.scm
@@ -40,10 +40,14 @@
#:select (tar))
#:use-module ((gnu packages compression)
#:select (gzip))
+ #:use-module ((gnu packages openssl)
+ #:renamer (symbol-prefix-proc 'o:))
#:use-module (gnu packages bison)
#:use-module (gnu packages flex)
#:use-module (gnu packages glib)
#:use-module (gnu packages pkg-config)
+ #:use-module (gnu packages texinfo)
+ #:use-module (gnu packages groff)
#:use-module (gnu packages xorg))
(define-public dmd
@@ -471,6 +475,28 @@ network statistics collection, security monitoring, network debugging, etc.")
;; fad-*.c and a couple other files are BSD-4, but the rest is BSD-3.
(license bsd-3)))
+(define-public tcpdump
+ (package
+ (name "tcpdump")
+ (version "4.5.1")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "http://www.tcpdump.org/release/tcpdump-"
+ version ".tar.gz"))
+ (sha256
+ (base32
+ "15hb7zkzd66nag102qbv100hcnf7frglbkylmr8adwr8f5jkkaql"))))
+ (build-system gnu-build-system)
+ (inputs `(("libpcap" ,libpcap)
+ ("openssl" ,o:openssl)))
+ (native-inputs `(("perl" ,perl))) ; for tests
+ (home-page "http://www.tcpdump.org/")
+ (synopsis "Network packet analyzer")
+ (description
+ "Tcpdump is a command-line tool to analyze network traffic passing
+through the network interface controller.")
+ (license bsd-3)))
+
(define-public jnettop
(package
(name "jnettop")
@@ -542,3 +568,157 @@ by bandwidth they use.")
console window to allow commands to be interactively run on multiple servers
over ssh connections.")
(license gpl2+)))
+
+(define-public rottlog
+ (package
+ (name "rottlog")
+ (version "0.72.2")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "mirror://gnu/rottlog/rottlog-"
+ version ".tar.gz"))
+ (sha256
+ (base32
+ "0751mb9l2f0jrk3vj6q8ilanifd121dliwk0c34g8k0dlzsv3kd7"))
+ (modules '((guix build utils)))
+ (snippet
+ '(substitute* "Makefile.in"
+ (("-o \\$\\{LOG_OWN\\} -g \\$\\{LOG_GROUP\\}")
+ ;; Don't try to chown root.
+ "")
+ (("mkdir -p \\$\\(ROTT_STATDIR\\)")
+ ;; Don't attempt to create /var/lib/rottlog.
+ "true")))))
+ (build-system gnu-build-system)
+ (arguments
+ '(#:configure-flags (list (string-append "ROTT_ETCDIR="
+ (assoc-ref %outputs "out")
+ "/etc")
+ "--localstatedir=/var")
+ #:phases (alist-cons-after
+ 'install 'install-info
+ (lambda _
+ (zero? (system* "make" "install-info")))
+ %standard-phases)))
+ (native-inputs `(("texinfo" ,texinfo)
+ ("util-linux" ,util-linux))) ; for 'cal'
+ (home-page "http://www.gnu.org/software/rottlog/")
+ (synopsis "Log rotation and management")
+ (description
+ "GNU Rot[t]log is a program for managing log files. It is used to
+automatically rotate out log files when they have reached a given size or
+according to a given schedule. It can also be used to automatically compress
+and archive such logs. Rot[t]log will mail reports of its activity to the
+system administrator.")
+ (license gpl3+)))
+
+(define-public sudo
+ (package
+ (name "sudo")
+ (version "1.8.10p2")
+ (source (origin
+ (method url-fetch)
+ (uri
+ (list (string-append "http://www.sudo.ws/sudo/dist/sudo-"
+ version ".tar.gz")
+ (string-append "ftp://ftp.sudo.ws/pub/sudo/OLD/sudo-"
+ version ".tar.gz")))
+ (sha256
+ (base32
+ "1wbrygz584abmywklq0b4xhqn3s1bjk3rrladslr5nycdpdvhv5s"))))
+ (build-system gnu-build-system)
+ (arguments
+ '(#:configure-flags '("--with-logpath=/var/log/sudo.log")
+ #:phases (alist-cons-before
+ 'configure 'pre-configure
+ (lambda _
+ (substitute* "configure"
+ ;; Refer to the right executables.
+ (("/usr/bin/mv") (which "mv"))
+ (("/usr/bin/sh") (which "sh")))
+ (substitute* (find-files "." "Makefile\\.in")
+ (("-O [[:graph:]]+ -G [[:graph:]]+")
+ ;; Allow installation as non-root.
+ "")
+ (("^install: (.*)install-sudoers(.*)" _ before after)
+ ;; Don't try to create /etc/sudoers.
+ (string-append "install: " before after "\n"))))
+ %standard-phases)
+
+ ;; XXX: The 'testsudoers' test series expects user 'root' to exist, but
+ ;; the chroot's /etc/passwd doesn't have it. Turn off the tests.
+ #:tests? #f))
+ (inputs
+ `(("groff" ,groff)
+ ("linux-pam" ,linux-pam)
+ ("coreutils" ,coreutils)))
+ (home-page "http://www.sudo.ws/")
+ (synopsis "Run commands as root")
+ (description
+ "Sudo (su \"do\") allows a system administrator to delegate authority to
+give certain users (or groups of users) the ability to run some (or all)
+commands as root or another user while providing an audit trail of the
+commands and their arguments.")
+
+ ;; See <http://www.sudo.ws/sudo/license.html>.
+ (license x11)))
+
+(define-public wpa-supplicant
+ (package
+ (name "wpa-supplicant")
+ (version "2.1")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append
+ "http://hostap.epitest.fi/releases/wpa_supplicant-"
+ version
+ ".tar.gz"))
+ (sha256
+ (base32
+ "0xxjw7lslvql1ykfbwmbhdrnjsjljf59fbwf837418s97dz2wqwi"))))
+ (build-system gnu-build-system)
+ (arguments
+ '(#:phases (alist-replace
+ 'configure
+ (lambda* (#:key outputs #:allow-other-keys)
+ (chdir "wpa_supplicant")
+ (copy-file "defconfig" ".config")
+ (let ((port (open-file ".config" "al")))
+ (display "
+ CONFIG_DEBUG_SYSLOG=y
+ CONFIG_CTRL_IFACE_DBUS=y
+ CONFIG_CTRL_IFACE_DBUS_NEW=y
+ CONFIG_CTRL_IFACE_DBUS_INTRO=y
+ CONFIG_DRIVER_NL80211=y
+ CFLAGS += $(shell pkg-config libnl-3.0 --cflags)
+ CONFIG_LIBNL32=y
+ CONFIG_READLINE=y\n" port)
+ (close-port port)))
+ %standard-phases)
+
+ #:make-flags (list "CC=gcc"
+ (string-append "BINDIR=" (assoc-ref %outputs "out")
+ "/sbin")
+ (string-append "LIBDIR=" (assoc-ref %outputs "out")
+ "/lib"))
+ #:tests? #f))
+ (inputs
+ `(("readline" ,readline)
+ ("libnl" ,libnl)
+ ("dbus" ,dbus)
+ ("openssl" ,o:openssl)))
+ (native-inputs
+ `(("pkg-config" ,pkg-config)))
+ (home-page "http://hostap.epitest.fi/wpa_supplicant/")
+ (synopsis "Connecting to WPA and WPA2-protected wireless networks")
+ (description
+ "wpa_supplicant is a WPA Supplicant with support for WPA and WPA2 (IEEE
+802.11i / RSN). Supplicant is the IEEE 802.1X/WPA component that is used in
+the client stations. It implements key negotiation with a WPA Authenticator
+and it controls the roaming and IEEE 802.11 authentication/association of the
+WLAN driver.
+
+This package provides the 'wpa_supplicant' daemon and the 'wpa_cli' command.")
+
+ ;; In practice, this is linked against Readline, which makes it GPLv3+.
+ (license bsd-3)))
diff --git a/gnu/packages/algebra.scm b/gnu/packages/algebra.scm
index 86f8361a63..9ed978536d 100644
--- a/gnu/packages/algebra.scm
+++ b/gnu/packages/algebra.scm
@@ -21,6 +21,7 @@
(define-module (gnu packages algebra)
#:use-module (gnu packages)
#:use-module (gnu packages multiprecision)
+ #:use-module (gnu packages mpi)
#:use-module (gnu packages perl)
#:use-module (gnu packages readline)
#:use-module (gnu packages flex)
@@ -123,14 +124,14 @@ PARI is also available as a C library to allow for faster computations.")
(define-public gp2c
(package
(name "gp2c")
- (version "0.0.8pl1")
+ (version "0.0.9pl1")
(source (origin
(method url-fetch)
(uri (string-append
"http://pari.math.u-bordeaux.fr/pub/pari/GP2C/gp2c-"
version ".tar.gz"))
(sha256 (base32
- "0r1xrshgx0db2snmacwvg5r99fhd9rpblcfs86pfsp23hnjxj9i0"))))
+ "1p36060vwhn38j77r4c3jqyaslvhvgm6fdw2486k7krxk5ai7ph5"))))
(build-system gnu-build-system)
(native-inputs `(("perl" ,perl)))
(inputs `(("pari-gp" ,pari-gp)))
@@ -196,14 +197,14 @@ syntax is similar to that of C, so basic usage is familiar. It also includes
(define-public fftw
(package
(name "fftw")
- (version "3.3.3")
+ (version "3.3.4")
(source (origin
(method url-fetch)
(uri (string-append "ftp://ftp.fftw.org/pub/fftw/fftw-"
version".tar.gz"))
(sha256
(base32
- "1wwp9b2va7vkq3ay7a9jk22nr4x5q6m37rzqy2j8y3d11c5grkc5"))))
+ "10h9mzjxnwlsjziah4lri85scc05rlajz39nqf3mbh4vja8dw34g"))))
(build-system gnu-build-system)
(arguments
'(#:configure-flags '("--enable-shared" "--enable-openmp")
@@ -237,3 +238,17 @@ cosine/ sine transforms or DCT/DST).")
(description
(string-append (package-description fftw)
" Single-precision version."))))
+
+(define-public fftw-openmpi
+ (package (inherit fftw)
+ (name "fftw-openmpi")
+ (inputs
+ `(("openmpi" ,openmpi)
+ ,@(package-inputs fftw)))
+ (arguments
+ (substitute-keyword-arguments (package-arguments fftw)
+ ((#:configure-flags cf)
+ `(cons "--enable-mpi" ,cf))))
+ (description
+ (string-append (package-description fftw)
+ " With OpenMPI parallelism support."))))
diff --git a/gnu/packages/autotools.scm b/gnu/packages/autotools.scm
index bd38f2a901..db1db45fc1 100644
--- a/gnu/packages/autotools.scm
+++ b/gnu/packages/autotools.scm
@@ -74,6 +74,20 @@ know anything about Autoconf or M4.")
(base32
"1fjm21k2na07f3vasf288a0zx66lbv0hd3l9bvv3q8p62s3pg569"))))))
+(define-public autoconf-2.64
+ ;; As of GDB 7.8, GDB is still developed using this version of Autoconf.
+ (package (inherit autoconf)
+ (version "2.64")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "mirror://gnu/autoconf/autoconf-"
+ version ".tar.xz"))
+ (sha256
+ (base32
+ "0j3jdjpf5ly39dlp0bg70h72nzqr059k0x8iqxvaxf106chpgn9j"))))))
+
+
(define* (autoconf-wrapper #:optional (autoconf autoconf))
"Return an wrapper around AUTOCONF that generates `configure' scripts that
use our own Bash instead of /bin/sh in shebangs. For that reason, it should
diff --git a/gnu/packages/backup.scm b/gnu/packages/backup.scm
new file mode 100644
index 0000000000..574bb11816
--- /dev/null
+++ b/gnu/packages/backup.scm
@@ -0,0 +1,71 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2014 Eric Bavier <bavier@member.fsf.org>
+;;;
+;;; 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 <http://www.gnu.org/licenses/>.
+
+(define-module (gnu packages backup)
+ #:use-module (guix packages)
+ #:use-module (guix licenses)
+ #:use-module (guix download)
+ #:use-module (guix build-system python)
+ #:use-module (gnu packages)
+ #:use-module (gnu packages python)
+ #:use-module (gnu packages gnupg)
+ #:use-module (gnu packages rsync)
+ #:use-module (srfi srfi-1))
+
+(define-public duplicity
+ (package
+ (name "duplicity")
+ (version "0.6.24")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "https://code.launchpad.net/duplicity/"
+ (string-join (take (string-split version #\.) 2) ".")
+ "-series/" version "/+download/duplicity-"
+ version ".tar.gz"))
+ (sha256
+ (base32
+ "0l14nrhbgkyjgvh339bbhnm6hrdwrjadphq1jmpi0mcgcdbdfh8x"))))
+ (build-system python-build-system)
+ (native-inputs
+ `(("python2-setuptools" ,python2-setuptools)))
+ (inputs
+ `(("python" ,python-2)
+ ("librsync" ,librsync)
+ ("mock" ,python2-mock) ;for testing
+ ("lockfile" ,python2-lockfile)
+ ("gnupg" ,gnupg-1))) ;gpg executable needed
+ (arguments
+ `(#:python ,python-2 ;setup assumes Python 2
+ #:test-target "test"
+ #:phases (alist-cons-before
+ 'check 'patch-tests
+ (lambda _
+ (substitute* "testing/functional/__init__.py"
+ (("/bin/sh") (which "sh"))))
+ %standard-phases)))
+ (home-page "http://duplicity.nongnu.org/index.html")
+ (synopsis "Encrypted backup using rsync algorithm")
+ (description
+ "Duplicity backs up directories by producing encrypted tar-format volumes
+and uploading them to a remote or local file server. Because duplicity uses
+librsync, the incremental archives are space efficient and only record the
+parts of files that have changed since the last backup. Because duplicity
+uses GnuPG to encrypt and/or sign these archives, they will be safe from
+spying and/or modification by the server.")
+ (license gpl2+)))
diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm
index 8771d2bf37..0139a6b506 100644
--- a/gnu/packages/base.scm
+++ b/gnu/packages/base.scm
@@ -1184,4 +1184,7 @@ and binaries, plus debugging symbols in the 'debug' output), and Binutils.")
(define-public gcc-toolchain-4.8
(gcc-toolchain gcc-final))
+(define-public gcc-toolchain-4.9
+ (gcc-toolchain gcc-4.9))
+
;;; base.scm ends here
diff --git a/gnu/packages/bittorrent.scm b/gnu/packages/bittorrent.scm
new file mode 100644
index 0000000000..e21b7fbee2
--- /dev/null
+++ b/gnu/packages/bittorrent.scm
@@ -0,0 +1,91 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2014 Ludovic Courtès <ludo@gnu.org>
+;;;
+;;; 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 <http://www.gnu.org/licenses/>.
+
+(define-module (gnu packages bittorrent)
+ #:use-module (guix packages)
+ #:use-module (guix download)
+ #:use-module (guix build-system gnu)
+ #:use-module ((guix licenses)
+ #:renamer (symbol-prefix-proc 'l:))
+ #:use-module (gnu packages openssl)
+ #:use-module (gnu packages libevent)
+ #:use-module (gnu packages curl)
+ #:use-module (gnu packages pkg-config)
+ #:use-module (gnu packages file)
+ #:use-module (gnu packages linux)
+ #:use-module ((gnu packages compression)
+ #:select (zlib))
+ #:use-module (gnu packages glib)
+ #:use-module (gnu packages gtk))
+
+(define-public transmission
+ (package
+ (name "transmission")
+ (version "2.83")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append
+ "https://transmission.cachefly.net/transmission-"
+ version ".tar.xz"))
+ (sha256
+ (base32
+ "0cqlgl6jmjw1caybz6nzh3l8z0jak1dxba01isv72zvy2r8b1qdh"))))
+ (build-system gnu-build-system)
+ (outputs '("out" ; library and command-line interface
+ "gui")) ; graphical user interface
+ (arguments
+ '(#:phases (alist-cons-after
+ 'install 'move-gui
+ (lambda* (#:key outputs #:allow-other-keys)
+ ;; Move the GUI to its own output, so that "out" doesn't
+ ;; depend on GTK+.
+ (let ((out (assoc-ref outputs "out"))
+ (gui (assoc-ref outputs "gui")))
+ (mkdir-p (string-append gui "/bin"))
+ (rename-file (string-append out "/bin/transmission-gtk")
+ (string-append gui
+ "/bin/transmission-gtk"))))
+ %standard-phases)))
+ (inputs
+ `(("inotify-tools" ,inotify-tools)
+ ("libevent" ,libevent)
+ ("curl" ,curl)
+ ("openssl" ,openssl)
+ ("file" ,file)
+ ("zlib" ,zlib)
+ ("gtk+" ,gtk+)))
+ (native-inputs
+ `(("intltool" ,intltool)
+ ("pkg-config" ,pkg-config)))
+ (home-page "http://www.transmissionbt.com/")
+ (synopsis "Fast and easy BitTorrent client")
+ (description
+ "Transmission is a BitTorrent client that comes with graphical,
+textual, and Web user interfaces. Transmission also has a daemon for
+unattended operationg. It supports local peer discovery, full encryption,
+DHT, µTP, PEX and Magnet Links.")
+
+ ;; COPYING reads:
+ ;;
+ ;; Transmission can be redistributed and/or modified under the terms of
+ ;; the GNU GPLv2 (http://www.gnu.org/licenses/license-list.html#GPLv2),
+ ;; the GNU GPLv3 (http://www.gnu.org/licenses/license-list.html#GNUGPLv3),
+ ;; or any future license endorsed by Mnemosyne LLC.
+ ;;
+ ;; A few files files carry an MIT/X11 license header.
+ (license l:gpl3+)))
diff --git a/gnu/packages/calcurse.scm b/gnu/packages/calcurse.scm
index 84dab0c53c..c13cfeaa37 100644
--- a/gnu/packages/calcurse.scm
+++ b/gnu/packages/calcurse.scm
@@ -16,7 +16,7 @@
;;; You should have received a copy of the GNU General Public License
;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
-(define-module (gnu packages autogen)
+(define-module (gnu packages calcurse)
#:use-module (guix packages)
#:use-module (guix licenses)
#:use-module (guix download)
diff --git a/gnu/packages/ccache.scm b/gnu/packages/ccache.scm
new file mode 100644
index 0000000000..4918ec9609
--- /dev/null
+++ b/gnu/packages/ccache.scm
@@ -0,0 +1,57 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2014 Eric Bavier <bavier@member.fsf.org>
+;;;
+;;; 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 <http://www.gnu.org/licenses/>.
+
+(define-module (gnu packages ccache)
+ #:use-module (guix packages)
+ #:use-module ((guix licenses) #:select (gpl3+))
+ #:use-module (guix download)
+ #:use-module (guix build-system gnu)
+ #:use-module (gnu packages)
+ #:use-module (gnu packages perl)
+ #:use-module (gnu packages compression))
+
+(define-public ccache
+ (package
+ (name "ccache")
+ (version "3.1.9")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "https://www.samba.org/ftp/ccache/ccache-"
+ version ".tar.xz"))
+ (sha256
+ (base32
+ "1i06015jjc0n55xgvhv2h37fjp0i7z8a10s0v40f87c5mprzv0a9"))
+ (patches (list (search-patch "ccache-stdc-predef-test.patch")))))
+ (build-system gnu-build-system)
+ (native-inputs `(("perl" ,perl))) ;for test.sh
+ (inputs `(("zlib" ,zlib)))
+ (arguments
+ '(#:phases (alist-cons-before
+ 'check 'patch-test-shebangs
+ (lambda _
+ (substitute* '("test/test_hashutil.c" "test.sh")
+ (("#!/bin/sh") (string-append "#!" (which "sh")))))
+ %standard-phases)))
+ (home-page "https://ccache.samba.org/")
+ (synopsis "Compiler cache")
+ (description
+ "Ccache is a compiler cache. It speeds up recompilation by caching
+previous compilations and detecting when the same compilation is being done
+again. Supported languages are C, C++, Objective-C and Objective-C++.")
+ (license gpl3+)))
diff --git a/gnu/packages/compression.scm b/gnu/packages/compression.scm
index a4c6f53202..c8328076cf 100644
--- a/gnu/packages/compression.scm
+++ b/gnu/packages/compression.scm
@@ -238,6 +238,29 @@ LZO is written in ANSI C. Both the source code and the compressed data
format are designed to be portable across platforms.")
(license license:gpl2+)))
+(define-public lzop
+ (package
+ (name "lzop")
+ (version "1.03")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "http://www.lzop.org/download/lzop-"
+ version ".tar.gz"))
+ (sha256
+ (base32
+ "1jdjvc4yjndf7ihmlcsyln2rbnbaxa86q4jskmkmm7ylfy65nhn1"))))
+ (build-system gnu-build-system)
+ (inputs `(("lzo" ,lzo)))
+ (home-page "http://www.lzop.org/")
+ (synopsis "Compress or expand files")
+ (description
+ "Lzop is a file compressor which is very similar to gzip. Lzop uses the
+LZO data compression library for compression services, and its main advantages
+over gzip are much higher compression and decompression speed (at the cost of
+some compression ratio).")
+ (license license:gpl2+)))
+
(define-public lzip
(package
(name "lzip")
diff --git a/gnu/packages/cyrus-sasl.scm b/gnu/packages/cyrus-sasl.scm
index b724d4fc2f..1913f93f0d 100644
--- a/gnu/packages/cyrus-sasl.scm
+++ b/gnu/packages/cyrus-sasl.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2013 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2013, 2014 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2013 Andreas Enge <andreas@enge.fr>
;;;
;;; This file is part of GNU Guix.
@@ -34,8 +34,12 @@
(version "2.1.26")
(source (origin
(method url-fetch)
- (uri (string-append "ftp://ftp.cyrusimap.org/cyrus-sasl/cyrus-sasl-" version
- ".tar.gz"))
+ (uri (list (string-append
+ "http://cyrusimap.org/releases/cyrus-sasl-"
+ version ".tar.gz")
+ (string-append
+ "ftp://ftp.cyrusimap.org/cyrus-sasl/cyrus-sasl-"
+ version ".tar.gz")))
(sha256 (base32
"1hvvbcsg21nlncbgs0cgn3iwlnb3vannzwsp6rwvnn9ba4v53g4g"))))
(build-system gnu-build-system)
diff --git a/gnu/packages/doxygen.scm b/gnu/packages/doxygen.scm
new file mode 100644
index 0000000000..8c51ae858e
--- /dev/null
+++ b/gnu/packages/doxygen.scm
@@ -0,0 +1,74 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2014 Andreas Enge <andreas@enge.fr>
+;;;
+;;; 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 <http://www.gnu.org/licenses/>.
+
+(define-module (gnu packages doxygen)
+ #:use-module ((guix licenses) #:select (gpl3+))
+ #:use-module (guix packages)
+ #:use-module (guix download)
+ #:use-module (guix build-system gnu)
+ #:use-module (gnu packages)
+ #:use-module (gnu packages bison)
+ #:use-module (gnu packages flex)
+ #:use-module (gnu packages graphviz)
+ #:use-module (gnu packages perl)
+ #:use-module (gnu packages xml)
+ #:use-module (gnu packages python))
+
+(define-public doxygen
+ (package
+ (name "doxygen")
+ (version "1.8.7")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "http://ftp.stack.nl/pub/users/dimitri/"
+ name "-" version ".src.tar.gz"))
+ (sha256
+ (base32
+ "1ng3dv5fninhfi2fj75ghkr5jwsl653fxv2sxhaswj11x2vcdsn6"))
+ (patches (list (search-patch "doxygen-tmake.patch")
+ (search-patch "doxygen-test.patch")))))
+ (build-system gnu-build-system)
+ (native-inputs
+ `(("bison" ,bison)
+ ("flex" ,flex)
+ ("libxml2" ,libxml2) ; provides xmllint for the tests
+ ("perl" ,perl) ; for the tests
+ ("python" ,python-2))) ; for creating the documentation
+ (propagated-inputs
+ `(("graphviz" ,graphviz)))
+ (arguments
+ `(#:test-target "test"
+ #:phases
+ (alist-replace
+ 'configure
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let ((out (assoc-ref outputs "out")))
+ ;; do not pass "--enable-fast-install", which makes the
+ ;; configure process fail
+ (zero? (system*
+ "./configure"
+ "--prefix" out))))
+ %standard-phases)))
+ (home-page "http://www.stack.nl/~dimitri/doxygen/")
+ (synopsis "tool for generating documentation from annotated sources")
+ (description "Doxygen is the de facto standard tool for generating
+documentation from annotated C++ sources, but it also supports other popular
+programming languages such as C, Objective-C, C#, PHP, Java, Python,
+IDL (Corba, Microsoft, and UNO/OpenOffice flavors), Fortran, VHDL, Tcl,
+and to some extent D.")
+ (license gpl3+)))
diff --git a/gnu/packages/ftp.scm b/gnu/packages/ftp.scm
new file mode 100644
index 0000000000..96af2bf649
--- /dev/null
+++ b/gnu/packages/ftp.scm
@@ -0,0 +1,56 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2014 Ludovic Courtès <ludo@gnu.org>
+;;;
+;;; 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 <http://www.gnu.org/licenses/>.
+
+(define-module (gnu packages ftp)
+ #:use-module ((guix licenses) #:select (gpl3+))
+ #:use-module (guix packages)
+ #:use-module (guix download)
+ #:use-module (guix build-system gnu)
+ #:use-module (gnu packages ncurses)
+ #:use-module (gnu packages readline)
+ #:use-module (gnu packages pkg-config)
+ #:use-module (gnu packages gnutls)
+ #:use-module (gnu packages compression))
+
+(define-public lftp
+ (package
+ (name "lftp")
+ (version "4.4.15")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "http://lftp.yar.ru/ftp/lftp-"
+ version ".tar.xz"))
+ (sha256
+ (base32
+ "0s38vc2ij869dwx3i1c7sk96mqv0hknf3cqf86av59rqnix0px3m"))))
+ (build-system gnu-build-system)
+ (native-inputs
+ `(("pkg-config" ,pkg-config)))
+ (inputs
+ `(("zlib" ,zlib)
+ ("readline" ,readline)
+ ("gnutls" ,gnutls)))
+ (home-page "http://lftp.yar.ru/")
+ (synopsis "Command-line file transfer program")
+ (description
+ "LFTP is a sophisticated FTP/HTTP client, and a file transfer program
+supporting a number of network protocols. Like Bash, it has job control and
+uses the Readline library for input. It has bookmarks, a built-in mirror
+command, and can transfer several files in parallel. It was designed with
+reliability in mind.")
+ (license gpl3+)))
diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
index 46fbd21805..0e5616cd59 100644
--- a/gnu/packages/games.scm
+++ b/gnu/packages/games.scm
@@ -1,5 +1,6 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2013 John Darrington <jmd@gnu.org>
+;;; Copyright © 2014 David Thompson <dthompson2@worcester.edu>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -32,6 +33,7 @@
#:use-module (gnu packages xorg)
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages sqlite)
+ #:use-module (gnu packages sdl)
#:use-module (guix build-system gnu))
(define-public gnubg
@@ -94,3 +96,65 @@ you to set the size of the cube (the default is 3x3) or to change the colors.
You may even apply photos to the faces instead of colors. The game is
scriptable with Guile.")
(license gpl3+)))
+
+(define-public abbaye
+ (package
+ (name "abbaye")
+ (version "1.13")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "http://abbaye-for-linux.googlecode.com/files/abbaye-for-linux-src-"
+ version ".tar.gz"))
+ (sha256
+ (base32
+ "1wgvckgqa2084rbskxif58wbb83xbas8s1i8s7d57xbj08ryq8rk"))))
+ (build-system gnu-build-system)
+ (arguments
+ '(#:modules ((ice-9 match)
+ (guix build gnu-build-system)
+ (guix build utils))
+ #:phases (alist-cons-after
+ 'set-paths 'set-sdl-paths
+ (lambda* (#:key inputs outputs (search-paths '()) #:allow-other-keys)
+ (define input-directories
+ (match inputs
+ (((_ . dir) ...)
+ dir)))
+ ;; This package does not use pkg-config, so modify CPATH
+ ;; variable to point to include/SDL for SDL header files.
+ (set-path-environment-variable "CPATH"
+ '("include/SDL")
+ input-directories))
+ (alist-cons-after
+ 'patch-source-shebangs 'patch-makefile
+ (lambda* (#:key outputs #:allow-other-keys)
+ ;; Replace /usr with package output directory.
+ (for-each (lambda (file)
+ (substitute* file
+ (("/usr") (assoc-ref outputs "out"))))
+ '("makefile" "src/pantallas.c" "src/comun.h")))
+ (alist-cons-before
+ 'install 'make-install-dirs
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let ((prefix (assoc-ref outputs "out")))
+ ;; Create directories that the makefile assumes exist.
+ (mkdir-p (string-append prefix "/bin"))
+ (mkdir-p (string-append prefix "/share/applications"))))
+ ;; No configure script.
+ (alist-delete 'configure %standard-phases))))
+ #:tests? #f)) ;; No check target.
+ (native-inputs `(("pkg-config" ,pkg-config)))
+ (inputs `(("sdl" ,sdl)
+ ("sdl-gfx" ,sdl-gfx)
+ ("sdl-image" ,sdl-image)
+ ("sdl-mixer" ,sdl-mixer)
+ ("sdl-ttf" ,sdl-ttf)))
+ (home-page "http://code.google.com/p/abbaye-for-linux/")
+ (synopsis "GNU/Linux port of the indie game \"l'Abbaye des Morts\"")
+ (description "L'Abbaye des Morts is a 2D platform game set in 13th century
+France. The Cathars, who preach about good Christian beliefs, were being
+expelled by the Catholic Church out of the Languedoc region in France. One of
+them, called Jean Raymond, found an old church in which to hide, not knowing
+that beneath its ruins lay buried an ancient evil.")
+ (license gpl3+)))
diff --git a/gnu/packages/gcc.scm b/gnu/packages/gcc.scm
index cb7817c084..a8d63fc98a 100644
--- a/gnu/packages/gcc.scm
+++ b/gnu/packages/gcc.scm
@@ -227,6 +227,17 @@ Go. It also includes runtime support libraries for these languages.")
(base32
"1j6dwgby4g3p3lz7zkss32ghr45zpdidrg8xvazvn91lqxv25p09"))))))
+(define-public gcc-4.9
+ (package (inherit gcc-4.7)
+ (version "4.9.0")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "mirror://gnu/gcc/gcc-"
+ version "/gcc-" version ".tar.bz2"))
+ (sha256
+ (base32
+ "0mqjxpw2klskls00lwx1k24pnyzm3whqxg3hk74c3sddgfllgc5r"))))))
+
(define (custom-gcc gcc name languages)
"Return a custom version of GCC that supports LANGUAGES."
(package (inherit gcc)
diff --git a/gnu/packages/gdb.scm b/gnu/packages/gdb.scm
index f521ef5839..1b8a0bbe22 100644
--- a/gnu/packages/gdb.scm
+++ b/gnu/packages/gdb.scm
@@ -33,14 +33,14 @@
(define-public gdb
(package
(name "gdb")
- (version "7.7")
+ (version "7.7.1")
(source (origin
(method url-fetch)
(uri (string-append "mirror://gnu/gdb/gdb-"
version ".tar.bz2"))
(sha256
(base32
- "08vcb97j1b7vxwq6088wb6s3g3bm8iwikd922y0xsgbbxv3d2104"))))
+ "199sn1p0gzli6icp9dcvrphdvyi7hm4cc9zhziq0q6vg81h55g8d"))))
(build-system gnu-build-system)
(arguments
'(#:tests? #f ; FIXME "make check" fails on single-processor systems.
@@ -57,7 +57,11 @@
("readline" ,readline)
("ncurses" ,ncurses)
("python" ,python-wrapper)
- ("dejagnu" ,dejagnu)))
+ ("dejagnu" ,dejagnu)
+
+ ;; Allow use of XML-formatted syscall information. This enables 'catch
+ ;; syscall' and similar commands.
+ ("libxml2" ,libxml2)))
(native-inputs
`(("texinfo" ,texinfo)))
(home-page "http://www.gnu.org/software/gdb/")
diff --git a/gnu/packages/gimp.scm b/gnu/packages/gimp.scm
new file mode 100644
index 0000000000..bdcd46f38e
--- /dev/null
+++ b/gnu/packages/gimp.scm
@@ -0,0 +1,63 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2014 Ludovic Courtès <ludo@gnu.org>
+;;;
+;;; 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 <http://www.gnu.org/licenses/>.
+
+(define-module (gnu packages gimp)
+ #:use-module (guix packages)
+ #:use-module (guix download)
+ #:use-module ((guix licenses)
+ #:renamer (symbol-prefix-proc 'license:))
+ #:use-module (guix build-system gnu)
+ #:use-module (gnu packages pkg-config)
+ #:use-module (gnu packages glib)
+ #:use-module (gnu packages gtk)
+ #:use-module (gnu packages gnome)
+ #:use-module (gnu packages libpng)
+ #:use-module (gnu packages libjpeg)
+ #:use-module ((gnu packages ghostscript)
+ #:select (lcms))
+ #:use-module (gnu packages compression)
+ #:use-module (gnu packages xml)
+ #:use-module (gnu packages photo)
+ #:use-module (gnu packages xorg)
+ #:use-module (gnu packages imagemagick))
+
+(define-public babl
+ (package
+ (name "babl")
+ (version "0.1.10")
+ (source (origin
+ (method url-fetch)
+ (uri (list (string-append "http://ftp.gtk.org/pub/babl/0.1/babl-"
+ version ".tar.bz2")
+ (string-append "ftp://ftp.gtk.org/pub/babl/0.1/babl-"
+ version ".tar.bz2")))
+ (sha256
+ (base32
+ "1x2mb7zfbvk9d0a7h5cpdff9hhjsadxvqml2jay2bpf7x9nc6gwl"))))
+ (build-system gnu-build-system)
+ (home-page "http://gegl.org/babl/")
+ (synopsis "Image pixel format conversion library")
+ (description
+ "babl is a dynamic, any to any, pixel format translation library.
+It allows converting between different methods of storing pixels known as
+pixel formats that have with different bitdepths and other data
+representations, color models and component permutations.
+
+A vocabulary to formulate new pixel formats from existing primitives is
+provided as well as the framework to add new color models and data types.")
+ (license license:lgpl3+)))
diff --git a/gnu/packages/glib.scm b/gnu/packages/glib.scm
index 49ffaa8f6e..77f21f95ce 100644
--- a/gnu/packages/glib.scm
+++ b/gnu/packages/glib.scm
@@ -160,6 +160,17 @@ shared NFS home directories.")
;; In 'gio/tests', 'gdbus-test-codegen-generated.h' is #included in a
;; file that gets compiled possibly before it has been fully generated.
#:parallel-tests? #f))
+
+ (native-search-paths
+ ;; This variable is not really "owned" by GLib, but several related
+ ;; packages refer to it: gobject-introspection's tools use it as a search
+ ;; path for .gir files, and it's also a search path for schemas produced
+ ;; by 'glib-compile-schemas'.
+ (list (search-path-specification
+ (variable "XDG_DATA_DIRS")
+ (directories '("share")))))
+ (search-paths native-search-paths)
+
(synopsis "Thread-safe general utility library; basis of GTK+ and GNOME")
(description
"GLib provides data structure handling for C, portability wrappers,
diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index 5d17b019fd..232afc6e44 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -1,5 +1,6 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2013 Andreas Enge <andreas@enge.fr>
+;;; Copyright © 2014 Ludovic Courtès <ludo@gnu.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -17,25 +18,31 @@
;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
(define-module (gnu packages gnome)
- #:use-module ((guix licenses) #:select (gpl2 gpl2+ lgpl2.0+ lgpl2.1+ lgpl3))
+ #:use-module ((guix licenses)
+ #:renamer (symbol-prefix-proc 'license:))
#:use-module (guix packages)
#:use-module (guix download)
#:use-module (guix build-system gnu)
#:use-module (gnu packages)
+ #:use-module (gnu packages bison)
+ #:use-module (gnu packages flex)
#:use-module (gnu packages glib)
#:use-module (gnu packages gnupg)
#:use-module (gnu packages gstreamer)
#:use-module (gnu packages gtk)
#:use-module (gnu packages pdf)
+ #:use-module (gnu packages popt)
#:use-module (gnu packages ghostscript)
#:use-module (gnu packages iso-codes)
#:use-module (gnu packages libcanberra)
+ #:use-module (gnu packages libjpeg)
#:use-module (gnu packages libpng)
#:use-module (gnu packages perl)
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages python)
#:use-module (gnu packages xml)
#:use-module (gnu packages gl)
+ #:use-module (gnu packages compression)
#:use-module (gnu packages xorg))
(define-public brasero
@@ -75,7 +82,7 @@
(description "Brasero is an application to burn CD/DVD for the Gnome
Desktop. It is designed to be as simple as possible and has some unique
features to enable users to create their discs easily and quickly.")
- (license gpl2+)))
+ (license license:gpl2+)))
(define-public gnome-desktop
(package
@@ -116,7 +123,7 @@ stability. Documentation for the API is available with gtk-doc.
The gnome-about program helps find which version of GNOME is installed.")
; Some bits under the LGPL.
- (license gpl2+)))
+ (license license:gpl2+)))
(define-public gnome-doc-utils
(package
@@ -146,7 +153,7 @@ The gnome-about program helps find which version of GNOME is installed.")
"Gnome-doc-utils is a collection of documentation utilities for the
Gnome project. It includes xml2po tool which makes it easier to translate
and keep up to date translations of documentation.")
- (license gpl2+))) ; xslt under lgpl
+ (license license:gpl2+))) ; xslt under lgpl
(define-public libgnome-keyring
(package
@@ -177,7 +184,7 @@ and keep up to date translations of documentation.")
"Client library to access passwords from the GNOME keyring.")
;; Though a couple of files are LGPLv2.1+.
- (license lgpl2.0+)))
+ (license license:lgpl2.0+)))
(define-public evince
(package
@@ -242,7 +249,7 @@ and keep up to date translations of documentation.")
currently supports PDF, PostScript, DjVu, TIFF and DVI. The goal
of Evince is to replace the multiple document viewers that exist
on the GNOME Desktop with a single simple application.")
- (license gpl2+)))
+ (license license:gpl2+)))
(define-public gsettings-desktop-schemas
(package
@@ -269,7 +276,7 @@ on the GNOME Desktop with a single simple application.")
(description
"Gsettings-desktop-schemas contains a collection of GSettings schemas
for settings shared by various components of the GNOME desktop.")
- (license lgpl2.1+)))
+ (license license:lgpl2.1+)))
(define-public icon-naming-utils
(package
@@ -294,7 +301,7 @@ for settings shared by various components of the GNOME desktop.")
"To help with the transition to the Freedesktop Icon Naming
Specification, the icon naming utility maps the icon names used by the
GNOME and KDE desktops to the icon names proposed in the specification.")
- (license lgpl2.1+)))
+ (license license:lgpl2.1+)))
(define-public gnome-icon-theme
(package
@@ -321,7 +328,7 @@ GNOME and KDE desktops to the icon names proposed in the specification.")
"GNOME icon theme")
(description
"Icons for the GNOME desktop.")
- (license lgpl3))) ; or Creative Commons BY-SA 3.0
+ (license license:lgpl3))) ; or Creative Commons BY-SA 3.0
(define-public shared-mime-info
(package
@@ -352,7 +359,7 @@ and the update-mime-database command used to extend it. It requires glib2 to
be installed for building the update command. Additionally, it uses intltool
for translations, though this is only a dependency for the maintainers. This
database is translated at Transifex.")
- (license gpl2+)))
+ (license license:gpl2+)))
(define-public hicolor-icon-theme
(package
@@ -374,7 +381,7 @@ database is translated at Transifex.")
"Freedesktop icon theme")
(description
"Freedesktop icon theme.")
- (license gpl2)))
+ (license license:gpl2)))
(define-public libnotify
(package
@@ -405,7 +412,7 @@ database is translated at Transifex.")
notification daemon, as defined in the Desktop Notifications spec. These
notifications can be used to inform the user about an event or display
some form of information without getting in the user's way.")
- (license lgpl2.1+)))
+ (license license:lgpl2.1+)))
(define-public libpeas
(package
@@ -421,45 +428,16 @@ some form of information without getting in the user's way.")
(base32
"13fzyzv6c0cfdj83z1s16lv8k997wpnzyzr0wfwcfkcmvz64g1q0"))))
(build-system gnu-build-system)
- (arguments
- `(#:modules ((guix build gnome)
- (guix build gnu-build-system)
- (guix build utils))
- #:imported-modules ((guix build gnome)
- (guix build gnu-build-system)
- (guix build utils))
- #:phases
- (alist-replace
- 'configure
- (lambda* (#:key inputs #:allow-other-keys #:rest args)
- (let ((configure (assoc-ref %standard-phases 'configure)))
- (substitute* "libpeas-gtk/Makefile.in"
- (("--add-include-path")
- (string-append
- " --add-include-path=" (gir-directory inputs "atk")
- " --add-include-path=" (gir-directory inputs "gdk-pixbuf")
- " --add-include-path=" (gir-directory inputs "gtk+")
- " --add-include-path=" (gir-directory inputs "pango")
- " --add-include-path")))
- (substitute* "libpeas-gtk/Makefile.in"
- (("--includedir=\\$\\(top_builddir")
- (string-append
- " --includedir=" (gir-directory inputs "atk")
- " --includedir=" (gir-directory inputs "gdk-pixbuf")
- " --includedir=" (gir-directory inputs "gtk+")
- " --includedir=" (gir-directory inputs "pango")
- " --includedir=$(top_builddir")))
- (apply configure args)))
- %standard-phases)))
(inputs
`(("atk" ,atk)
("gdk-pixbuf" ,gdk-pixbuf)
("glib" ,glib)
- ("gobject-introspection" ,gobject-introspection)
("gtk+" ,gtk+)
- ("intltool" ,intltool)
- ("pango" ,pango)
- ("pkg-config" ,pkg-config)))
+ ("pango" ,pango)))
+ (native-inputs
+ `(("pkg-config" ,pkg-config)
+ ("gobject-introspection" ,gobject-introspection)
+ ("intltool" ,intltool)))
(home-page "https://wiki.gnome.org/Libpeas")
(synopsis "GObject plugin system")
(description
@@ -469,7 +447,7 @@ set of features including, but not limited to: multiple extension points; on
demand (lazy) programming language support for C, Python and JS; simplicity of
the API")
- (license lgpl2.0+)))
+ (license license:lgpl2.0+)))
(define-public gtkglext
(package
@@ -495,7 +473,7 @@ the API")
(description "GtkGLExt is an OpenGL extension to GTK+. It provides
additional GDK objects which support OpenGL rendering in GTK+ and GtkWidget
API add-ons to make GTK+ widgets OpenGL-capable.")
- (license lgpl2.1+)))
+ (license license:lgpl2.1+)))
(define-public glade3
(package
@@ -522,4 +500,593 @@ API add-ons to make GTK+ widgets OpenGL-capable.")
(description "Glade is a rapid application development (RAD) tool to
enable quick & easy development of user interfaces for the GTK+ toolkit and
the GNOME desktop environment.")
- (license lgpl2.0+)))
+ (license license:lgpl2.0+)))
+
+(define-public libcroco
+ (package
+ (name "libcroco")
+ (version "0.6.8")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append
+ "mirror://gnome/sources/libcroco/0.6/libcroco-"
+ version
+ ".tar.xz"))
+ (sha256
+ (base32
+ "0w453f3nnkbkrly7spx5lx5pf6mwynzmd5qhszprq8amij2invpa"))))
+ (build-system gnu-build-system)
+ (native-inputs
+ `(("pkg-config" ,pkg-config)))
+ (inputs
+ `(("glib" ,glib)
+ ("libxml2" ,libxml2)
+ ("zlib" ,zlib)))
+ (home-page "https://github.com/GNOME/libcroco")
+ (synopsis "CSS2 parsing and manipulation library")
+ (description
+ "Libcroco is a standalone CSS2 parsing and manipulation library.
+The parser provides a low level event driven SAC-like API and a CSS object
+model like API. Libcroco provides a CSS2 selection engine and an experimental
+XML/CSS rendering engine.")
+
+ ;; LGPLv2.1-only.
+ (license license:lgpl2.1)))
+
+(define-public libgsf
+ (package
+ (name "libgsf")
+ (version "1.14.30")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "mirror://gnome/sources/libgsf/1.14/libgsf-"
+ version ".tar.xz"))
+ (sha256
+ (base32
+ "0w2v1a9sxsymd1mcy4mwsz4r6za9iwq69rj86nb939p41d4c6j6b"))))
+ (build-system gnu-build-system)
+ (native-inputs
+ `(("intltool" ,intltool)
+ ("pkg-config" ,pkg-config)))
+ (inputs
+ `(("python" ,python)
+ ("zlib" ,zlib)
+ ("bzip2" ,bzip2)))
+ (propagated-inputs
+ `(("gdk-pixbuf" ,gdk-pixbuf)
+ ("glib" ,glib)
+ ("libxml2" ,libxml2)))
+ (home-page "http://www.gnome.org/projects/libgsf")
+ (synopsis "GNOME's Structured File Library")
+ (description
+ "Libgsf aims to provide an efficient extensible I/O abstraction for
+dealing with different structured file formats.")
+
+ ;; LGPLv2.1-only.
+ (license license:lgpl2.1)))
+
+(define-public librsvg
+ (package
+ (name "librsvg")
+ (version "2.40.2")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append
+ "mirror://gnome/sources/librsvg/2.40/librsvg-"
+ version ".tar.xz"))
+ (sha256
+ (base32
+ "071959yjb2i1bja7ciy4bmpnd6fn2is9jjqsvvvnsqwl69j9n128"))))
+ (build-system gnu-build-system)
+ (arguments
+ `(#:phases
+ (alist-cons-before
+ 'configure 'augment-gir-search-path
+ (lambda* (#:key inputs #:allow-other-keys)
+ (substitute* "gdk-pixbuf-loader/Makefile.in"
+ ;; By default the gdk-pixbuf loader is installed under
+ ;; gdk-pixbuf's prefix. Work around that.
+ (("gdk_pixbuf_moduledir = .*$")
+ (string-append "gdk_pixbuf_moduledir = "
+ "$(prefix)/lib/gdk-pixbuf-2.0/2.0.10/"
+ "loaders\n"))
+ ;; Likewise, create a separate 'loaders.cache' file.
+ (("gdk_pixbuf_cache_file = .*$")
+ "gdk_pixbuf_cache_file = $(gdk_pixbuf_moduledir).cache\n")))
+ %standard-phases)))
+ (native-inputs
+ `(("pkg-config" ,pkg-config)
+ ("gobject-introspection" ,gobject-introspection))) ; g-ir-compiler, etc.
+ (inputs
+ `(("pango" ,pango)
+ ("libcroco" ,libcroco)
+ ("bzip2" ,bzip2)
+ ("libgsf" ,libgsf)
+ ("libxml2" ,libxml2)))
+ (propagated-inputs
+ ;; librsvg-2.0.pc refers to all of that.
+ `(("cairo" ,cairo)
+ ("gdk-pixbuf" ,gdk-pixbuf)
+ ("glib" ,glib)))
+ (home-page "https://wiki.gnome.org/LibRsvg")
+ (synopsis "Render SVG files using Cairo")
+ (description
+ "librsvg is a C library to render SVG files using the Cairo 2D graphics
+library.")
+ (license license:lgpl2.0+)))
+
+(define-public libidl
+ (package
+ (name "libidl")
+ (version "0.8.14")
+ (source (origin
+ (method url-fetch)
+ (uri (let ((upstream-name "libIDL"))
+ (string-append
+ "mirror://gnome/sources/" upstream-name "/" (string-take version 3) "/" upstream-name "-"
+ version
+ ".tar.bz2")))
+ (sha256
+ (base32
+ "08129my8s9fbrk0vqvnmx6ph4nid744g5vbwphzkaik51664vln5"))))
+ (build-system gnu-build-system)
+ (inputs `(("glib" ,glib)))
+ (native-inputs
+ `(("pkg-config" ,pkg-config)
+ ("flex", flex)
+ ("bison" ,bison)))
+ (home-page "http://freecode.com/projects/libidl")
+ (synopsis "Create trees of CORBA Interface Definition Language files")
+ (description "libidl is a library for creating trees of CORBA Interface
+Definition Language (idl) files, which is a specification for defining
+portable interfaces. libidl was initially written for orbit (the orb from the
+GNOME project, and the primary means of libidl distribution). However, the
+functionality was designed to be as reusable and portable as possible.")
+ (license license:lgpl2.0+)))
+
+
+(define-public orbit2
+ (package
+ (name "orbit2")
+ (version "2.14.19")
+ (source (origin
+ (method url-fetch)
+ (uri (let ((upstream-name "ORBit2"))
+ (string-append
+ "mirror://gnome/sources/" upstream-name "/" (string-take version 4) "/" upstream-name "-"
+ version
+ ".tar.bz2")))
+ (sha256
+ (base32 "0l3mhpyym9m5iz09fz0rgiqxl2ym6kpkwpsp1xrr4aa80nlh1jam"))))
+ (build-system gnu-build-system)
+ (arguments
+ ;; The programmer kindly gives us a hook to turn off deprecation warnings ...
+ `(#:configure-flags '("DISABLE_DEPRECATED_CFLAGS=-DGLIB_DISABLE_DEPRECATION_WARNINGS")
+ ;; ... which they then completly ignore !!
+ #:phases
+ (alist-cons-before
+ 'configure 'ignore-deprecations
+ (lambda _
+ (substitute* "linc2/src/Makefile.in"
+ (("-DG_DISABLE_DEPRECATED") "-DGLIB_DISABLE_DEPRECATION_WARNINGS")))
+ %standard-phases)))
+ (inputs `(("glib" ,glib)
+ ("libidl" ,libidl)))
+ (native-inputs
+ `(("pkg-config" ,pkg-config)))
+ (home-page "https://projects.gnome.org/orbit2/")
+ (synopsis "CORBA 2.4-compliant Object Request Broker")
+ (description "orbit2 is a CORBA 2.4-compliant Object Request Broker (orb)
+featuring mature C, C++ and Python bindings.")
+ ;; Licence notice is unclear. The Web page simply say "GPL" without giving a version.
+ ;; SOME of the code files have licence notices for GPLv2+
+ ;; The tarball contains files of the text of GPLv2 and LGPLv2
+ (license license:gpl2+)))
+
+
+(define-public libbonobo
+ (package
+ (name "libbonobo")
+ (version "2.32.1")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append
+ "mirror://gnome/sources/" name "/" (string-take version 4) "/" name "-"
+ version
+ ".tar.bz2"))
+ (sha256
+ (base32 "0swp4kk6x7hy1rvd1f9jba31lvfc6qvafkvbpg9h0r34fzrd8q4i"))))
+ (build-system gnu-build-system)
+ (arguments
+ ;; The programmer kindly gives us a hook to turn off deprecation warnings ...
+ `(#:configure-flags '("DISABLE_DEPRECATED_CFLAGS=-DGLIB_DISABLE_DEPRECATION_WARNINGS")
+ ;; ... which they then completly ignore !!
+ #:phases
+ (alist-cons-before
+ 'configure 'ignore-deprecations
+ (lambda _
+ (substitute* "activation-server/Makefile.in"
+ (("-DG_DISABLE_DEPRECATED") "-DGLIB_DISABLE_DEPRECATION_WARNINGS")))
+ %standard-phases)))
+ (inputs `(("popt" ,popt)
+ ("libxml2" ,libxml2)))
+ ;; The following are Required by the .pc file
+ (propagated-inputs
+ `(("glib" ,glib)
+ ("orbit2" ,orbit2)))
+ (native-inputs
+ `(("intltool" ,intltool)
+ ("pkg-config" ,pkg-config)
+ ("flex" ,flex)
+ ("bison" ,bison)))
+ (home-page "https://developer.gnome.org/libbonobo/")
+ (synopsis "Framework for creating reusable components for use in GNOME applications")
+ (description "Bonobo is a framework for creating reusable components for
+use in GNOME applications, built on top of CORBA.")
+ ;; Licence not explicitly stated. Source files contain no licence notices.
+ ;; Tarball contains text of both GPLv2 and LGPLv2
+ ;; GPLv2 covers both conditions
+ (license license:gpl2+)))
+
+
+(define-public gconf
+ (package
+ (name "gconf")
+ (version "3.2.6")
+ (source (origin
+ (method url-fetch)
+ (uri
+ (let ((upstream-name "GConf"))
+ (string-append
+ "mirror://gnome/sources/" upstream-name "/" (string-take version 3) "/" upstream-name "-"
+ version
+ ".tar.xz")))
+ (sha256
+ (base32 "0k3q9nh53yhc9qxf1zaicz4sk8p3kzq4ndjdsgpaa2db0ccbj4hr"))))
+ (build-system gnu-build-system)
+ (inputs `(("glib" ,glib)
+ ("dbus" ,dbus)
+ ("dbus-glib" ,dbus-glib)
+ ("libxml2" ,libxml2)))
+ (propagated-inputs `(("orbit2" ,orbit2))) ; referred to in the .pc file
+ (native-inputs
+ `(("intltool" ,intltool)
+ ("pkg-config" ,pkg-config)))
+ (home-page "https://projects.gnome.org/gconf/")
+ (synopsis "store application preferences")
+ (description "gconf is a system for storing application preferences. It
+is intended for user preferences; not arbitrary data storage.")
+ (license license:lgpl2.0+)))
+
+
+(define-public gnome-mime-data
+ (package
+ (name "gnome-mime-data")
+ (version "2.18.0")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append
+ "mirror://gnome/sources/" name "/" (string-take version 4) "/" name "-"
+ version
+ ".tar.bz2"))
+ (sha256
+ (base32
+ "1mvg8glb2a40yilmyabmb7fkbzlqd3i3d31kbkabqnq86xdnn69p"))))
+ (build-system gnu-build-system)
+ (native-inputs
+ `(("perl" ,perl)
+ ("intltool" ,intltool)))
+ (home-page "http://www.gnome.org")
+ (synopsis "base MIME and Application database for GNOME")
+ (description "GNOME Mime Data is a module which contains the base MIME
+and Application database for GNOME. The data stored by this module is
+designed to be accessed through the MIME functions in GnomeVFS.")
+ (license license:gpl2+)))
+
+
+(define-public gnome-vfs
+ (package
+ (name "gnome-vfs")
+ (version "2.24.4")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append
+ "mirror://gnome/sources/" name "/" (string-take version 4) "/" name "-"
+ version
+ ".tar.bz2"))
+ (sha256
+ (base32 "1ajg8jb8k3snxc7rrgczlh8daxkjidmcv3zr9w809sq4p2sn9pk2"))))
+ (build-system gnu-build-system)
+ (arguments
+ ;; The programmer kindly gives us a hook to turn off deprecation warnings ...
+ `(#:configure-flags '("DISABLE_DEPRECATED_CFLAGS=-DGLIB_DISABLE_DEPRECATION_WARNINGS")
+ ;; ... which they then completly ignore !!
+ #:phases
+ (alist-cons-before
+ 'configure 'ignore-deprecations
+ (lambda _
+ (begin
+ (substitute* "libgnomevfs/Makefile.in"
+ (("-DG_DISABLE_DEPRECATED") "-DGLIB_DISABLE_DEPRECATION_WARNINGS"))
+ (substitute* "daemon/Makefile.in"
+ (("-DG_DISABLE_DEPRECATED") "-DGLIB_DISABLE_DEPRECATION_WARNINGS"))))
+ %standard-phases)))
+ (inputs `(("glib" ,glib)
+ ("libxml2" ,libxml2)
+ ("dbus-glib" ,dbus-glib)
+ ("dbus" ,dbus)
+ ("gconf" ,gconf)
+ ("gnome-mime-data" ,gnome-mime-data)
+ ("zlib" ,zlib)))
+ (native-inputs
+ `(("intltool" ,intltool)
+ ("pkg-config" ,pkg-config)))
+ (home-page "https://developer.gnome.org/gnome-vfs/")
+ (synopsis "access files and folders in GNOME applications")
+ (description "GnomeVFS is the core library used to access files and
+folders in GNOME applications. It provides a file system abstraction which
+allows applications to access local and remote files with a single consistent API.")
+ (license license:lgpl2.0+)))
+
+
+
+(define-public libgnome
+ (package
+ (name "libgnome")
+ (version "2.32.1")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append
+ "mirror://gnome/sources/" name "/" (string-take version 3) "/" name "-"
+ version
+ ".tar.bz2"))
+ (sha256
+ (base32
+ "197pnq8y0knqjhm2fg4j6hbqqm3qfzfnd0irhwxpk1b4hqb3kimj"))))
+ (build-system gnu-build-system)
+ (arguments
+ `(#:phases
+ (alist-cons-before
+ 'configure 'enable-deprecated
+ (lambda _
+ (substitute* "libgnome/Makefile.in"
+ (("-DG_DISABLE_DEPRECATED") "-DGLIB_DISABLE_DEPRECATION_WARNINGS")))
+ %standard-phases)))
+ (inputs `(("popt" ,popt)
+ ("libxml2" ,libxml2)))
+ (native-inputs
+ `(("intltool" ,intltool)
+ ("pkg-config" ,pkg-config)))
+ ;; The following are listed as Required in the .pc file
+ ;; (except for libcanberra -- which seems to be oversight on the part
+ ;; of the upstream developers -- anything that links against libgnome,
+ ;; must also link against libcanberra
+ (propagated-inputs
+ `(("libcanberra" ,libcanberra)
+ ("libbonobo" ,libbonobo)
+ ("gconf" ,gconf)
+ ("gnome-vfs" ,gnome-vfs)
+ ("glib" ,glib)))
+ (home-page "https://developer.gnome.org/libgnome/")
+ (synopsis "Useful routines for building applications")
+ (description "The libgnome library provides a number of useful routines
+for building modern applications, including session management, activation of
+files and URIs, and displaying help.")
+ (license license:lgpl2.0+)))
+
+
+(define-public libart-lgpl
+ (package
+ (name "libart-lgpl")
+ (version "2.3.9")
+ (source (origin
+ (method url-fetch)
+ (uri (let ((upstream-name "libart_lgpl"))
+ (string-append
+ "mirror://gnome/sources/" upstream-name "/"
+ (string-take version 3) "/" upstream-name "-" version
+ ".tar.bz2")))
+ (sha256
+ (base32
+ "072r4svs4hjf2f4gxzx02n3f970kdv9fpx54r2m8bd42fjyyawrw"))))
+ (build-system gnu-build-system)
+ (native-inputs
+ `(("pkg-config" ,pkg-config)))
+ (home-page "https://people.gnome.org/~mathieu/libart")
+ (synopsis "2D drawing library")
+ (description "Libart is a 2D drawing library intended as a
+high-quality vector-based 2D library with antialiasing and alpha composition.")
+ (license license:lgpl2.0+)))
+
+
+
+(define-public libgnomecanvas
+ (package
+ (name "libgnomecanvas")
+ (version "2.30.3")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append
+ "mirror://gnome/sources/" name "/" (string-take version 4) "/" name "-"
+ version
+ ".tar.gz"))
+ (sha256
+ (base32
+ "1nhnq4lfkk8ljkdafscwaggx0h95mq0rxnd7zgqyq0xb6kkqbjm8"))))
+ (build-system gnu-build-system)
+ ;; Mentioned as Required in the .pc file
+ (propagated-inputs `(("libart-lgpl" ,libart-lgpl)
+ ("gtk+" ,gtk+-2)))
+ (native-inputs
+ `(("intltool" ,intltool)
+ ("pkg-config" ,pkg-config)))
+ (home-page "https://developer.gnome.org/libgnomecanvas/")
+ (synopsis "Flexible widget for creating interactive structured graphics")
+ (description "The GnomeCanvas widget provides a flexible widget for
+creating interactive structured graphics.")
+ (license license:lgpl2.0+)))
+
+(define-public libgnomeui
+ (package
+ (name "libgnomeui")
+ (version "2.24.5")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append
+ "mirror://gnome/sources/" name "/" (string-take version 4) "/" name "-"
+ version
+ ".tar.bz2"))
+ (sha256
+ (base32
+ "03rwbli76crkjl6gp422wrc9lqpl174k56cp9i96b7l8jlj2yddf"))))
+ (build-system gnu-build-system)
+ ;; Mentioned as Required in the .pc file
+ (propagated-inputs `(("libgnome" ,libgnome)
+ ("libgnome-keyring" ,libgnome-keyring)))
+ (inputs `(("libgnomecanvas" ,libgnomecanvas)
+ ("libbonoboui" ,libbonoboui)
+ ("libjpeg" ,libjpeg)
+ ("popt" ,popt)
+ ("libbonobo" ,libbonobo)
+ ("libxml2" ,libxml2)
+ ("libglade" ,libglade)))
+ (native-inputs
+ `(("intltool" ,intltool)
+ ("pkg-config" ,pkg-config)))
+ (home-page "https://developer.gnome.org/libgnomeui/")
+ (synopsis "Additional widgets for applications")
+ (description "The libgnomeui library provides additional widgets for
+applications. Many of the widgets from libgnomeui have already been ported to GTK+.")
+ (license license:lgpl2.0+)))
+
+(define-public libglade
+ (package
+ (name "libglade")
+ (version "2.6.4")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append
+ "mirror://gnome/sources/" name "/" (string-take version 3) "/" name "-"
+ version
+ ".tar.bz2"))
+ (sha256
+ (base32
+ "1v2x2s04jry4gpabws92i0wq2ghd47yr5n9nhgnkd7c38xv1wdk4"))))
+ (build-system gnu-build-system)
+ (inputs
+ `(("gtk+-2" ,gtk+-2)
+ ("libxml2" ,libxml2)
+ ("python" ,python))) ;; needed for the optional libglade-convert program
+ (native-inputs
+ `(("pkg-config" ,pkg-config)))
+ (home-page "https://developer.gnome.org/libglade")
+ (synopsis "load glade interfaces and access the glade built widgets")
+ (description "libglade is a library that provides interfaces for loading
+graphical interfaces described in glade files and for accessing the
+widgets built in the loading process.")
+ (license license:gpl2+))) ; This is correct. GPL not LGPL
+
+(define-public libgnomeprint
+ (package
+ (name "libgnomeprint")
+ (version "2.8.2")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append
+ "mirror://gnome/sources/" name "/" (string-take version 3) "/" name "-"
+ version
+ ".tar.bz2"))
+ (sha256
+ (base32
+ "129ka3nn8gx9dlfry17ib79azxk45wzfv5rgqzw6dwx2b5ns8phm"))))
+ (build-system gnu-build-system)
+ (inputs
+ `(("popt" ,popt)
+ ("libart-lgpl" ,libart-lgpl)
+ ("gtk+" ,gtk+-2)
+ ("libxml2" ,libxml2)))
+ (native-inputs
+ `(("intltool" ,intltool)
+ ("pkg-config" ,pkg-config)))
+ (home-page "https://projects.gnome.org/gnome-print/home/faq.html")
+ (synopsis "printing framework for GNOME")
+ (description "Gnome-print is a high-quality printing framework for GNOME.")
+ (license license:lgpl2.0+)))
+
+
+(define-public libgnomeprintui
+ (package
+ (name "libgnomeprintui")
+ (version "2.8.2")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append
+ "mirror://gnome/sources/" name "/" (string-take version 3) "/" name "-"
+ version
+ ".tar.bz2"))
+ (sha256
+ (base32
+ "1ivipk7r61rg90p9kp889j28xlyyj6466ypvwa4jvnrcllnaajsw"))))
+ (build-system gnu-build-system)
+ ;; Mentioned as Required in the .pc file
+ (propagated-inputs `(("libgnomeprint" ,libgnomeprint)))
+ (inputs `(("gtk+" ,gtk+-2)
+ ("glib" ,glib)
+ ("gnome-icon-theme" ,gnome-icon-theme)
+ ("libgnomecanvas" ,libgnomecanvas)
+ ("libxml2" ,libxml2)))
+ (native-inputs
+ `(("intltool" ,intltool)
+ ("pkg-config" ,pkg-config)))
+ (home-page "https://projects.gnome.org/gnome-print/home/faq.html")
+ (synopsis "Printing framework for GNOME")
+ (description "Gnome-print is a high-quality printing framework for GNOME.")
+ (license license:lgpl2.0+)))
+
+
+(define-public libbonoboui
+ (package
+ (name "libbonoboui")
+ (version "2.24.5")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append
+ "mirror://gnome/sources/" name "/" (string-take version 3) "/" name "-"
+ version
+ ".tar.bz2"))
+ (sha256
+ (base32
+ "1kbgqh7bw0fdx4f1a1aqwpff7gp5mwhbaz60c6c98bc4djng5dgs"))))
+ (build-system gnu-build-system)
+ (arguments
+ `(#:phases
+ (alist-cons-before
+ 'check 'start-xserver
+ (lambda* (#:key inputs #:allow-other-keys)
+ (let ((xorg-server (assoc-ref inputs "xorg-server"))
+ (disp ":1"))
+
+ (setenv "HOME" (getcwd))
+ (setenv "DISPLAY" disp)
+ ;; There must be a running X server and make check doesn't start one.
+ ;; Therefore we must do it.
+ (zero? (system (format #f "~a/bin/Xvfb ~a &" xorg-server disp)))))
+ %standard-phases)))
+ ;; Mentioned as Required by the .pc file
+ (propagated-inputs `(("libxml2" ,libxml2)))
+ (inputs
+ `(("popt" ,popt)
+ ("pangox-compat" ,pangox-compat)
+ ("libgnome" ,libgnome)
+ ("libgnomecanvas" ,libgnomecanvas)
+ ("libglade" ,libglade)))
+ (native-inputs
+ `(("intltool" ,intltool)
+ ("xorg-server" ,xorg-server) ; For running the tests
+ ("pkg-config" ,pkg-config)))
+ (home-page "https://developer.gnome.org/libbonoboui/")
+ (synopsis "Some user interface controls using Bonobo")
+ (description "The Bonobo UI library provides a number of user interface
+controls using the Bonobo component framework.")
+ (license license:lgpl2.0+)))
+
diff --git a/gnu/packages/gnupg.scm b/gnu/packages/gnupg.scm
index f3fbef06fe..39f1ac0036 100644
--- a/gnu/packages/gnupg.scm
+++ b/gnu/packages/gnupg.scm
@@ -279,7 +279,7 @@ and every application benefits from this.")
"1g1jly3wl4ks6h8ydkygyl2c4i7v3z91rg42005m6vm70y1d8b3d"))))
(build-system gnu-build-system)
(inputs `(("perl" ,perl)
- ("python" ,python-wrapper)
+ ("python" ,python-2) ; uses the Python 2 'print' syntax
("gpg" ,gnupg)))
(arguments
`(#:tests? #f
diff --git a/gnu/packages/gtk.scm b/gnu/packages/gtk.scm
index fa92e5ab8c..54cfbfb5f1 100644
--- a/gnu/packages/gtk.scm
+++ b/gnu/packages/gtk.scm
@@ -1,6 +1,6 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2013 Andreas Enge <andreas@enge.fr>
-;;; Copyright © 2013 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2013, 2014 Ludovic Courtès <ludo@gnu.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -53,9 +53,10 @@
(base32
"1c2hbg66wfvibsz2ia0ri48yr62751fn950i97c53j3b0fjifsb3"))))
(build-system gnu-build-system)
- (inputs `(("glib" ,glib)
- ("gobject-introspection" ,gobject-introspection)))
- (native-inputs `(("pkg-config" ,pkg-config)))
+ (inputs `(("glib" ,glib)))
+ (native-inputs
+ `(("pkg-config" ,pkg-config)
+ ("gobject-introspection" ,gobject-introspection))) ; g-ir-compiler, etc.
(synopsis "GNOME accessibility toolkit")
(description
"ATK provides the set of accessibility interfaces that are implemented
@@ -156,10 +157,10 @@ affine transformation (scale, rotation, shear, etc.)")
`(("cairo" ,cairo)
("harfbuzz" ,harfbuzz)))
(inputs
- `(("gobject-introspection" ,gobject-introspection)
- ("zlib" ,zlib)))
+ `(("zlib" ,zlib)))
(native-inputs
- `(("pkg-config" ,pkg-config)))
+ `(("pkg-config" ,pkg-config)
+ ("gobject-introspection" ,gobject-introspection))) ; g-ir-compiler, etc.
(synopsis "GNOME text and font handling library")
(description
"Pango is the core text and font handling library used in GNOME
@@ -168,6 +169,33 @@ used throughout the world.")
(license license:lgpl2.0+)
(home-page "https://developer.gnome.org/pango/")))
+(define-public pangox-compat
+ (package
+ (name "pangox-compat")
+ (version "0.0.2")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append
+ "mirror://gnome/sources/" name "/" (string-take version 3) "/" name "-"
+ version
+ ".tar.xz"))
+ (sha256
+ (base32
+ "0ip0ziys6mrqqmz4n71ays0kf5cs1xflj1gfpvs4fgy2nsrr482m"))))
+ (build-system gnu-build-system)
+ (inputs
+ `(("glib" ,glib)
+ ("pango" ,pango)))
+ (native-inputs
+ `(("intltool" ,intltool)
+ ("pkg-config" ,pkg-config)))
+ (home-page "https://developer.gnome.org/pango")
+ (synopsis "functions now obsolete in pango")
+ (description "Pangox was a X backend to pango. It is now obsolete and no
+longer provided by recent pango releases. pangox-compat provides the
+functions which were removed.")
+ (license license:lgpl2.0+)))
+
(define-public gtksourceview
(package
@@ -236,12 +264,12 @@ printing and other features typical of a source code editor.")
(build-system gnu-build-system)
(inputs
`(("glib" ,glib)
- ("gobject-introspection", gobject-introspection)
("libjpeg" ,libjpeg)
("libpng" ,libpng)
("libtiff" ,libtiff)))
(native-inputs
- `(("pkg-config" ,pkg-config)))
+ `(("pkg-config" ,pkg-config)
+ ("gobject-introspection", gobject-introspection))) ; g-ir-compiler, etc.
(synopsis "GNOME image loading and manipulation library")
(description
"GdkPixbuf is a library for image loading and manipulation developed
@@ -366,21 +394,15 @@ application suites.")
("libxinerama" ,libxinerama)
("pango" ,pango)))
(inputs
- `(("gobject-introspection" ,gobject-introspection)
- ("libxml2" ,libxml2)))
+ `(("libxml2" ,libxml2)))
(native-inputs
- `(("perl" ,perl)
+ `(("perl" ,perl)
("pkg-config" ,pkg-config)
+ ("gobject-introspection" ,gobject-introspection)
("python-wrapper" ,python-wrapper)
("xorg-server" ,xorg-server)))
(arguments
- `(#:modules ((guix build gnome)
- (guix build gnu-build-system)
- (guix build utils))
- #:imported-modules ((guix build gnome)
- (guix build gnu-build-system)
- (guix build utils))
- #:phases
+ `(#:phases
(alist-replace
'configure
(lambda* (#:key inputs #:allow-other-keys #:rest args)
@@ -391,32 +413,8 @@ application suites.")
;; directory.
;; See the manual page for dbus-uuidgen to correct this issue.
(substitute* "testsuite/Makefile.in"
- (("SUBDIRS = gdk gtk a11y css reftests") "SUBDIRS = gdk"))
-
- ;; We need to tell GIR where it can find some of the required .gir
- ;; files.
- (substitute* "gdk/Makefile.in"
- (("--add-include-path=../gdk")
- (string-append
- "--add-include-path=../gdk"
- " --add-include-path=" (gir-directory inputs "gdk-pixbuf")
- " --add-include-path=" (gir-directory inputs "pango")))
- (("--includedir=\\.")
- (string-append "--includedir=."
- " --includedir=" (gir-directory inputs "gdk-pixbuf")
- " --includedir=" (gir-directory inputs "pango"))))
-
- (substitute* "gtk/Makefile.in"
- (("--add-include-path=../gdk")
- (string-append "--add-include-path=../gdk"
- " --add-include-path=" (gir-directory inputs "atk")
- " --add-include-path=" (gir-directory inputs "gdk-pixbuf")
- " --add-include-path=" (gir-directory inputs "pango")))
- (("--includedir=../gdk")
- (string-append "--includedir=../gdk"
- " --includedir=" (gir-directory inputs "atk")
- " --includedir=" (gir-directory inputs "gdk-pixbuf")
- " --includedir=" (gir-directory inputs "pango"))))
+ (("SUBDIRS = gdk gtk a11y css reftests")
+ "SUBDIRS = gdk"))
(apply configure args)))
%standard-phases)))))
diff --git a/gnu/packages/guile.scm b/gnu/packages/guile.scm
index a240937f75..4c42d82345 100644
--- a/gnu/packages/guile.scm
+++ b/gnu/packages/guile.scm
@@ -247,7 +247,8 @@ many readers as needed).")
(inputs `(("ncurses" ,ncurses)
("guile" ,guile-2.0)))
(arguments
- '(#:configure-flags (list (string-append "--with-guilesitedir="
+ '(#:configure-flags (list "--with-ncursesw" ; Unicode support
+ (string-append "--with-guilesitedir="
(assoc-ref %outputs "out")
"/share/guile/site/2.0"))
#:phases (alist-cons-after
@@ -271,18 +272,18 @@ library.")
(define-public mcron
(package
(name "mcron")
- (version "1.0.6")
+ (version "1.0.7")
(source (origin
(method url-fetch)
(uri (string-append "mirror://gnu/mcron/mcron-"
version ".tar.gz"))
(sha256
(base32
- "0yvrfzzdy2m7fbqkr61fw01wd9r2jpnbyabxhcsfivgxywknl0fy"))
+ "1d214fmhsn3kvpnwxnqwfpy6gr5c5dbz2mx3sijhxi070vkfibxc"))
(patches (list (search-patch "mcron-install.patch")))))
(build-system gnu-build-system)
- (inputs
- `(("ed" ,ed) ("which" ,which) ("guile" ,guile-1.8)))
+ (native-inputs `(("pkg-config" ,pkg-config)))
+ (inputs `(("ed" ,ed) ("which" ,which) ("guile" ,guile-2.0)))
(home-page "http://www.gnu.org/software/mcron/")
(synopsis "Run jobs at scheduled times")
(description
diff --git a/gnu/packages/imagemagick.scm b/gnu/packages/imagemagick.scm
index d8c1afaaec..0c80c0a57f 100644
--- a/gnu/packages/imagemagick.scm
+++ b/gnu/packages/imagemagick.scm
@@ -37,14 +37,14 @@
(define-public imagemagick
(package
(name "imagemagick")
- (version "6.8.8-10")
+ (version "6.8.9-0")
(source (origin
(method url-fetch)
(uri (string-append "mirror://imagemagick/ImageMagick-"
version ".tar.xz"))
(sha256
(base32
- "0crdazi2f1qj1ppb01f0mhqjw5q3afswgw49fa1m100bxmqpf77k"))))
+ "1lapn2798fkc2wn81slpms5p21kq4dsyg45khsk7n8p69cvrmw2b"))))
(build-system gnu-build-system)
(arguments
`(#:phases (alist-cons-before
diff --git a/gnu/packages/kde.scm b/gnu/packages/kde.scm
index 2666e58a7a..bc5d2d533a 100644
--- a/gnu/packages/kde.scm
+++ b/gnu/packages/kde.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2013 Andreas Enge <andreas@enge.fr>
+;;; Copyright © 2013, 2014 Andreas Enge <andreas@enge.fr>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -17,14 +17,22 @@
;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
(define-module (gnu packages kde)
- #:use-module ((guix licenses) #:select (bsd-2 lgpl2.1+))
+ #:use-module ((guix licenses) #:select (bsd-2 lgpl2.0+ lgpl2.1 lgpl2.1+))
#:use-module (guix packages)
#:use-module (guix download)
#:use-module (guix build-system cmake)
+ #:use-module (gnu packages compression)
+ #:use-module (gnu packages doxygen)
+ #:use-module (gnu packages geeqie)
#:use-module (gnu packages glib)
+ #:use-module (gnu packages perl)
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages pulseaudio)
+ #:use-module (gnu packages python)
#:use-module (gnu packages qt)
+ #:use-module (gnu packages rdf)
+ #:use-module (gnu packages video)
+ #:use-module (gnu packages xml)
#:use-module (gnu packages xorg))
(define-public automoc4
@@ -78,3 +86,122 @@
(synopsis "Qt 4 multimedia API")
(description "KDE desktop environment")
(license lgpl2.1+)))
+
+(define-public qjson
+ (package
+ (name "qjson")
+ (version "0.8.1")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "https://github.com/flavio/qjson/archive/"
+ version ".tar.gz"))
+ (sha256
+ (base32
+ "163fspi0xc705irv79qw861fmh68pjyla9vx3kqiq6xrdhb9834j"))))
+ (build-system cmake-build-system)
+ (inputs
+ `(("qt" ,qt-4)))
+ (arguments
+ `(#:tests? #f)) ; no test target
+ (home-page "http://qjson.sourceforge.net/")
+ (synopsis "Qt-based library for handling JSON")
+ (description "QJson is a Qt-based library that maps JSON data to QVariant
+objects and vice versa. JSON arrays are mapped to QVariantList instances,
+while JSON objects are mapped to QVariantMap.")
+ (license lgpl2.1+)))
+
+(define-public libdbusmenu-qt
+ (package
+ (name "libdbusmenu-qt")
+ (version "0.9.2")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "https://launchpad.net/" name "/trunk/"
+ version "/+download/"
+ name "-" version ".tar.bz2"))
+ (sha256
+ (base32
+ "1v0ri5g9xw2z64ik0kx0ra01v8rpjn2kxprrxppkls1wvav1qv5f"))))
+ (build-system cmake-build-system)
+ (native-inputs
+ `(("doxygen" ,doxygen) ; used for static documentation
+ ("pkg-config" ,pkg-config)
+ ("qjson", qjson))) ; used for the tests
+ (inputs
+ `(("qt" ,qt-4)))
+ (arguments
+ `(#:tests? #f)) ; no check target
+ (home-page "https://launchpad.net/libdbusmenu-qt/")
+ (synopsis "Qt implementation of the DBusMenu protocol")
+ (description "The library provides a Qt implementation of the DBusMenu
+protocol. The DBusMenu protocol makes it possible for applications to export
+and import their menus over DBus.")
+ (license lgpl2.0+)))
+
+(define-public attica
+ (package
+ (name "attica")
+ (version "0.4.2")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "http://download.kde.org/stable/"
+ name "/"
+ name "-" version ".tar.bz2"))
+ (sha256
+ (base32
+ "1y74gsyzi70dfr9d1f1b08k130rm3jaibsppg8dv5h3211vm771v"))))
+ (build-system cmake-build-system)
+ (inputs
+ `(("qt" ,qt-4)))
+ (home-page "https://projects.kde.org/projects/kdesupport/attica")
+ (synopsis "Qt library for the Open Collaboration Services API")
+ (description "Attica is a Qt library that implements the Open
+Collaboration Services API version 1.6. It grants easy access to the
+services such as querying information about persons and contents. The
+library is used in KNewStuff3 as content provider. In order to integrate
+with KDE's Plasma Desktop, a platform plugin exists in kdebase.")
+ (license lgpl2.1+)))
+
+(define-public strigi
+ (package
+ (name "strigi")
+ (version "0.7.8")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "http://www.vandenoever.info/software/"
+ name "/"
+ name "-" version ".tar.bz2"))
+ (sha256
+ (base32
+ "12grxzqwnvbyqw7q1gnz42lypadxmq89vk2qpxczmpmc4nk63r23"))))
+ (build-system cmake-build-system)
+ (native-inputs
+ `(("pkg-config" ,pkg-config)))
+ ;; FIXME: Add optional inputs XAttr, FAM, Log4cxx
+ (inputs
+ `(("clucene" ,clucene)
+ ("dbus" ,dbus)
+ ("exiv2" ,exiv2)
+ ("ffmpeg" ,ffmpeg)
+ ("libxml2" ,libxml2)
+ ("perl" ,perl)
+ ("python" ,python-wrapper)
+ ("qt" ,qt-4)
+ ("zlib" ,zlib)))
+ (arguments
+ `(#:tests? #f)) ; FIXME: Test 23/25 ProcessInputStreamTest fails.
+ (home-page "http://www.vandenoever.info/software/strigi/")
+ (synopsis "Desktop search daemon")
+ (description "Strigi is a desktop search daemon with the following
+main features:
+very fast crawling;
+very small memory footprint;
+no hammering of the system;
+pluggable backend, currently clucene and hyperestraier, sqlite3 and xapian
+are in the works;
+communication between daemon and search program over an abstract interface,
+currently a simple socket;
+simple interface for implementing plugins for extracting information;
+calculation of sha1 for every file crawled
+(allows fast finding of duplicates).")
+ (license lgpl2.0+)))
diff --git a/gnu/packages/libevent.scm b/gnu/packages/libevent.scm
index dce1ac1a69..7b8adbace4 100644
--- a/gnu/packages/libevent.scm
+++ b/gnu/packages/libevent.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2013 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2013, 2014 Ludovic Courtès <ludo@gnu.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -23,7 +23,9 @@
#:use-module (guix download)
#:use-module (guix build-system gnu)
#:use-module (gnu packages which)
- #:use-module (gnu packages python))
+ #:use-module (gnu packages python)
+ #:use-module (gnu packages autotools)
+ #:use-module (gnu packages pkg-config))
(define-public libevent
(package
@@ -58,3 +60,44 @@ network servers. An application just needs to call event_dispatch() and
then add or remove events dynamically without having to change the event
loop.")
(license bsd-3)))
+
+(define-public libuv
+ (package
+ (name "libuv")
+ (version "0.11.25")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "https://github.com/joyent/libuv/archive/v"
+ version ".tar.gz"))
+ (sha256
+ (base32
+ "1ys2wlypdbv59yywn91d5vl329z50mi7ivi3fj5rjm4mr9g3wnmr"))))
+ (build-system gnu-build-system)
+ (arguments
+ '(#:phases (alist-cons-before
+ 'configure 'autogen
+ (lambda _
+ ;; Fashionable people don't run 'make dist' these days, so
+ ;; we need to do that ourselves.
+ (zero? (system* "./autogen.sh")))
+ %standard-phases)
+
+ ;; XXX: Some tests want /dev/tty, attempt to make connections, etc.
+ #:tests? #f))
+ (native-inputs `(("autoconf" ,(autoconf-wrapper))
+ ("automake" ,automake)
+ ("libtool" ,libtool "bin")
+
+ ;; libuv.pc is installed only when pkg-config is found.
+ ("pkg-config" ,pkg-config)))
+ (home-page "https://github.com/joyent/libuv")
+ (synopsis "Library for asynchronous I/O")
+ (description
+ "libuv is a multi-platform support library with a focus on asynchronous
+I/O. Among other things, it supports event loops via epoll, kqueue, and
+similar IOCP, and event ports, asynchronous TCP/UDP sockets, asynchronous DNS
+resolution, asynchronous file system operations, and threading primitives.")
+
+ ;; A few files fall under other non-copyleft licenses; see 'LICENSE' for
+ ;; details.
+ (license x11)))
diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index da5b31a169..130a0f2a9a 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -38,11 +38,14 @@
#:use-module (gnu packages attr)
#:use-module (gnu packages xml)
#:use-module (gnu packages autotools)
+ #:use-module (gnu packages texinfo)
+ #:use-module (gnu packages check)
#:use-module (guix packages)
#:use-module (guix download)
#:use-module (guix build-system gnu)
#:use-module (guix build-system cmake)
- #:use-module (guix build-system python))
+ #:use-module (guix build-system python)
+ #:use-module (guix build-system trivial))
(define-public (system->linux-architecture arch)
"Return the Linux architecture name for ARCH, a Guix system name such as
@@ -440,7 +443,8 @@ slabtop, and skill.")
"0ibkkvp6kan0hn0d1anq4n2md70j5gcm7mwna515w82xwyr02rfw"))))
(build-system gnu-build-system)
(inputs `(("util-linux" ,util-linux)))
- (native-inputs `(("pkg-config" ,pkg-config)))
+ (native-inputs `(("pkg-config" ,pkg-config)
+ ("texinfo" ,texinfo))) ; for the libext2fs Info manual
(arguments
'(#:phases (alist-cons-before
'configure 'patch-shells
@@ -466,6 +470,39 @@ slabtop, and skill.")
lgpl2.0 ; libext2fs
x11)))) ; libuuid
+(define-public e2fsck/static
+ (package
+ (name "e2fsck-static")
+ (version (package-version e2fsprogs))
+ (build-system trivial-build-system)
+ (source #f)
+ (arguments
+ `(#:modules ((guix build utils))
+ #:builder
+ (begin
+ (use-modules (guix build utils)
+ (ice-9 ftw)
+ (srfi srfi-26))
+
+ (let ((source (string-append (assoc-ref %build-inputs "e2fsprogs")
+ "/sbin"))
+ (bin (string-append (assoc-ref %outputs "out") "/sbin")))
+ (mkdir-p bin)
+ (with-directory-excursion bin
+ (for-each (lambda (file)
+ (copy-file (string-append source "/" file)
+ file)
+ (remove-store-references file)
+ (chmod file #o555))
+ (scandir source (cut string-prefix? "fsck." <>))))))))
+ (inputs `(("e2fsprogs" ,(static-package e2fsprogs))))
+ (synopsis "Statically-linked fsck.* commands from e2fsprogs")
+ (description
+ "This package provides statically-linked command of fsck.ext[234] taken
+from the e2fsprogs package. It is meant to be used in initrds.")
+ (home-page (package-home-page e2fsprogs))
+ (license (package-license e2fsprogs))))
+
(define-public strace
(package
(name "strace")
@@ -962,6 +999,23 @@ space, using the FUSE library. Mounting a union file system allows you to
UnionFS-FUSE additionally supports copy-on-write.")
(license bsd-3)))
+(define fuse-static
+ (package (inherit fuse)
+ (name "fuse-static")
+ (source (origin (inherit (package-source fuse))
+ (modules '((guix build utils)))
+ (snippet
+ ;; Normally libfuse invokes mount(8) so that /etc/mtab is
+ ;; updated. Change calls to 'mtab_needs_update' to 0 so that
+ ;; it doesn't do that, allowing us to remove the dependency on
+ ;; util-linux (something that is useful in initrds.)
+ '(substitute* '("lib/mount_util.c"
+ "util/mount_util.c")
+ (("mtab_needs_update[[:blank:]]*\\([a-z_]+\\)")
+ "0")
+ (("/bin/")
+ "")))))))
+
(define-public unionfs-fuse/static
(package (inherit unionfs-fuse)
(synopsis "User-space union file system (statically linked)")
@@ -976,4 +1030,118 @@ UnionFS-FUSE additionally supports copy-on-write.")
libs " dl)"))))))
(arguments
'(#:tests? #f
- #:configure-flags '("-DCMAKE_EXE_LINKER_FLAGS=-static")))))
+ #:configure-flags '("-DCMAKE_EXE_LINKER_FLAGS=-static")))
+ (inputs `(("fuse" ,fuse-static)))))
+
+(define-public numactl
+ (package
+ (name "numactl")
+ (version "2.0.9")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append
+ "ftp://oss.sgi.com/www/projects/libnuma/download/numactl-"
+ version
+ ".tar.gz"))
+ (sha256
+ (base32
+ "073myxlyyhgxh1w3r757ajixb7s2k69czc3r0g12c3scq7k3784w"))))
+ (build-system gnu-build-system)
+ (arguments
+ '(#:phases (alist-replace
+ 'configure
+ (lambda* (#:key outputs #:allow-other-keys)
+ ;; There's no 'configure' script, just a raw makefile.
+ (substitute* "Makefile"
+ (("^prefix := .*$")
+ (string-append "prefix := " (assoc-ref outputs "out")
+ "\n"))
+ (("^libdir := .*$")
+ ;; By default the thing tries to install under
+ ;; $prefix/lib64 when on a 64-bit platform.
+ (string-append "libdir := $(prefix)/lib\n"))))
+ %standard-phases)
+
+ #:make-flags (list
+ ;; By default the thing tries to use 'cc'.
+ "CC=gcc"
+
+ ;; Make sure programs have an RPATH so they can find
+ ;; libnuma.so.
+ (string-append "LDLIBS=-Wl,-rpath="
+ (assoc-ref %outputs "out") "/lib"))
+
+ ;; There's a 'test' target, but it requires NUMA support in the kernel
+ ;; to run, which we can't assume to have.
+ #:tests? #f))
+ (home-page "http://oss.sgi.com/projects/libnuma/")
+ (synopsis "Tools for non-uniform memory access (NUMA) machines")
+ (description
+ "NUMA stands for Non-Uniform Memory Access, in other words a system whose
+memory is not all in one place. The numactl program allows you to run your
+application program on specific CPU's and memory nodes. It does this by
+supplying a NUMA memory policy to the operating system before running your
+program.
+
+The package contains other commands, such as numademo, numastat and memhog.
+The numademo command provides a quick overview of NUMA performance on your
+system.")
+ (license (list gpl2 ; programs
+ lgpl2.1)))) ; library
+
+(define-public kbd
+ (package
+ (name "kbd")
+ (version "2.0.1")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "mirror://kernel.org/linux/utils/kbd/kbd-"
+ version ".tar.gz"))
+ (sha256
+ (base32
+ "0c34b0za2v0934acvgnva0vaqpghmmhz4zh7k0m9jd4mbc91byqm"))))
+ (build-system gnu-build-system)
+ (arguments
+ '(#:phases (alist-cons-before
+ 'build 'pre-build
+ (lambda* (#:key inputs #:allow-other-keys)
+ (let ((gzip (assoc-ref %build-inputs "gzip"))
+ (bzip2 (assoc-ref %build-inputs "bzip2")))
+ (substitute* "src/libkeymap/findfile.c"
+ (("gzip")
+ (string-append gzip "/bin/gzip"))
+ (("bzip2")
+ (string-append bzip2 "/bin/bzip2")))))
+ %standard-phases)))
+ (inputs `(("check" ,check)
+ ("gzip" ,guix:gzip)
+ ("bzip2" ,guix:bzip2)
+ ("pam" ,linux-pam)))
+ (native-inputs `(("pkg-config" ,pkg-config)))
+ (home-page "ftp://ftp.kernel.org/pub/linux/utils/kbd/")
+ (synopsis "Linux keyboard utilities and keyboard maps")
+ (description
+ "This package contains keytable files and keyboard utilities compatible
+for systems using the Linux kernel. This includes commands such as
+'loadkeys', 'setfont', 'kbdinfo', and 'chvt'.")
+ (license gpl2+)))
+
+(define-public inotify-tools
+ (package
+ (name "inotify-tools")
+ (version "3.13")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append
+ "mirror://sourceforge/inotify-tools/inotify-tools/"
+ version "/inotify-tools-" version ".tar.gz"))
+ (sha256
+ (base32
+ "0icl4bx041axd5dvhg89kilfkysjj86hjakc7bk8n49cxjn4cha6"))))
+ (build-system gnu-build-system)
+ (home-page "http://inotify-tools.sourceforge.net/")
+ (synopsis "Monitor file accesses")
+ (description
+ "The inotify-tools packages provides a C library and command-line tools
+to use Linux' inotify mechanism, which allows file accesses to be monitored.")
+ (license gpl2+)))
diff --git a/gnu/packages/lua.scm b/gnu/packages/lua.scm
index 991cfc6e67..a85c120469 100644
--- a/gnu/packages/lua.scm
+++ b/gnu/packages/lua.scm
@@ -2,6 +2,7 @@
;;; Copyright © 2013 Cyril Roelandt <tipecaml@gmail.com>
;;; Copyright © 2014 Raimon Grau <raimonster@gmail.com>
;;; Copyright © 2014 Mark H Weaver <mhw@netris.org>
+;;; Copyright © 2014 Andreas Enge <andreas@enge.fr>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -29,13 +30,13 @@
(define-public lua
(package
(name "lua")
- (version "5.2.1")
+ (version "5.2.3")
(source (origin
(method url-fetch)
(uri (string-append "http://www.lua.org/ftp/lua-"
version ".tar.gz"))
(sha256
- (base32 "1rbv2ysq5fdksz7xg07dnrkl8i0gnx855hg4z6b324vng6l4sc34"))))
+ (base32 "0b8034v1s82n4dg5rzcn12067ha3nxaylp2vdp8gg08kjsbzphhk"))))
(build-system gnu-build-system)
(inputs `(("readline", readline)))
(arguments
@@ -45,7 +46,7 @@
#:test-target "test"
#:phases (alist-replace
'build
- (lambda _ (zero? (system* "make" "linux"))) ; XXX: Other OS.
+ (lambda _ (zero? (system* "make" "CFLAGS=-fPIC" "linux")))
(alist-replace
'install
(lambda* (#:key outputs #:allow-other-keys)
@@ -66,6 +67,16 @@ automatic memory management with incremental garbage collection, making it ideal
for configuration, scripting, and rapid prototyping.")
(license x11)))
+(define-public lua-5.1
+ (package (inherit lua)
+ (version "5.1.5")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "http://www.lua.org/ftp/lua-"
+ version ".tar.gz"))
+ (sha256
+ (base32 "0cskd4w0g6rdm2q8q3i4n1h3j8kylhs3rq8mxwl9vwlmlxbgqh16"))))))
+
(define-public luajit
(package
(name "luajit")
diff --git a/gnu/packages/mail.scm b/gnu/packages/mail.scm
index 3790b583ee..796dcd7e88 100644
--- a/gnu/packages/mail.scm
+++ b/gnu/packages/mail.scm
@@ -20,9 +20,12 @@
(define-module (gnu packages mail)
#:use-module (gnu packages)
#:use-module (gnu packages autotools)
+ #:use-module (gnu packages base)
#:use-module (gnu packages cyrus-sasl)
#:use-module (gnu packages dejagnu)
+ #:use-module (gnu packages emacs)
#:use-module (gnu packages gdbm)
+ #:use-module (gnu packages glib)
#:use-module (gnu packages gnupg)
#:use-module (gnu packages gnutls)
#:use-module (gnu packages guile)
@@ -32,7 +35,9 @@
#:use-module (gnu packages ncurses)
#:use-module (gnu packages openssl)
#:use-module (gnu packages perl)
+ #:use-module (gnu packages python)
#:use-module (gnu packages readline)
+ #:use-module (gnu packages search)
#:use-module (gnu packages texinfo)
#:use-module (gnu packages compression)
#:use-module (gnu packages glib)
@@ -44,6 +49,7 @@
#:use-module (guix packages)
#:use-module (guix download)
#:use-module (guix build-system gnu)
+ #:use-module (guix build-system python)
#:use-module (srfi srfi-1))
(define-public mailutils
@@ -253,4 +259,71 @@ content (body). The program is able to learn from the user's classifications
and corrections. It is based on a Bayesian filter.")
(license gpl2)))
+(define-public offlineimap
+ (package
+ (name "offlineimap")
+ (version "6.5.5")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "https://github.com/OfflineIMAP/offlineimap/"
+ "archive/v" version ".tar.gz"))
+ (sha256
+ (base32
+ "00k84qagph3xnxss6rkxm61x07ngz8fvffx4z9jyw5baf3cdd32p"))))
+ (build-system python-build-system)
+ (native-inputs `(("python" ,python-2)))
+ (arguments
+ ;; The setup.py script expects python-2.
+ `(#:python ,python-2
+ ;; Tests require a modifiable IMAP account.
+ #:tests? #f))
+ (home-page "http://www.offlineimap.org")
+ (synopsis "Synch emails between two repositories")
+ (description
+ "OfflineImap synchronizes emails between two repositories, so that you
+can read the same mailbox from multiple computers. It supports IMAP as REMOTE
+repository and Maildir/IMAP as LOCAL repository.")
+ (license gpl2+)))
+
+(define-public mu
+ (package
+ (name "mu")
+ (version "0.9.9.5")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "https://mu0.googlecode.com/files/mu-"
+ version ".tar.gz"))
+ (sha256
+ (base32
+ "1hwkliyb8fjrz5sw9fcisssig0jkdxzhccw0ld0l9a10q1l9mqhp"))))
+ (build-system gnu-build-system)
+ (native-inputs
+ `(("pkg-config" ,pkg-config)
+ ("texinfo" ,texinfo)))
+ ;; TODO: Add webkit and gtk to build the mug GUI.
+ (inputs
+ `(("xapian" ,xapian)
+ ("emacs" ,emacs)
+ ("guile" ,guile-2.0)
+ ("glib" ,glib)
+ ("gmime" ,gmime)
+ ("tzdata" ,tzdata))) ;for mu/test/test-mu-query.c
+ (arguments
+ '(#:phases (alist-cons-before
+ 'check 'check-tz-setup
+ (lambda* (#:key inputs #:allow-other-keys)
+ ;; For mu/test/test-mu-query.c
+ (setenv "TZDIR"
+ (string-append (assoc-ref inputs "tzdata")
+ "/share/zoneinfo")))
+ %standard-phases)))
+ (home-page "http://www.djcbsoftware.nl/code/mu/")
+ (synopsis "Quickly find emails")
+ (description
+ "Mu is a tool for dealing with e-mail messages stored in the
+Maildir-format. Mu's purpose in life is to help you to quickly find the
+messages you need; in addition, it allows you to view messages, extract
+attachments, create new maildirs, and so on.")
+ (license gpl3+)))
+
;;; mail.scm ends here
diff --git a/gnu/packages/make-bootstrap.scm b/gnu/packages/make-bootstrap.scm
index 97a13b4b74..2e3e9ec4c1 100644
--- a/gnu/packages/make-bootstrap.scm
+++ b/gnu/packages/make-bootstrap.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2012, 2013 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2012, 2013, 2014 Ludovic Courtès <ludo@gnu.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -40,7 +40,9 @@
%glibc-bootstrap-tarball
%gcc-bootstrap-tarball
%guile-bootstrap-tarball
- %bootstrap-tarballs))
+ %bootstrap-tarballs
+
+ %guile-static-stripped))
;;; Commentary:
;;;
diff --git a/gnu/packages/man.scm b/gnu/packages/man.scm
index a6c2c1c0a8..03058a55e1 100644
--- a/gnu/packages/man.scm
+++ b/gnu/packages/man.scm
@@ -102,6 +102,10 @@ a flexible and convenient way.")
("groff" ,groff)
("less" ,less)
("libpipeline" ,libpipeline)))
+ (native-search-paths
+ (list (search-path-specification
+ (variable "MANPATH")
+ (directories '("share/man")))))
(home-page "http://man-db.nongnu.org/")
(synopsis "Standard Unix documentation system")
(description
@@ -117,7 +121,7 @@ the traditional flat-text whatis databases.")
(source (origin
(method url-fetch)
(uri (string-append
- "mirror://kernel/linux/docs/man-pages/man-pages-"
+ "mirror://kernel.org/linux/docs/man-pages/man-pages-"
version ".tar.xz"))
(sha256
(base32
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index 68c326752c..8ef4f44f5a 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -1,7 +1,8 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2013 Andreas Enge <andreas@enge.fr>
+;;; Copyright © 2013, 2014 Andreas Enge <andreas@enge.fr>
;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org>
;;; Copyright © 2014 John Darrington <jmd@gnu.org>
+;;; Copyright © 2014 Eric Bavier <bavier@member.fsf.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -24,11 +25,16 @@
#:renamer (symbol-prefix-proc 'license:))
#:use-module (guix packages)
#:use-module (guix download)
+ #:use-module (guix utils)
#:use-module (guix build-system cmake)
#:use-module (guix build-system gnu)
+ #:use-module (gnu packages algebra)
+ #:use-module (gnu packages bison)
+ #:use-module (gnu packages cmake)
#:use-module (gnu packages compression)
#:use-module (gnu packages curl)
#:use-module (gnu packages elf)
+ #:use-module (gnu packages flex)
#:use-module (gnu packages fltk)
#:use-module (gnu packages fontutils)
#:use-module (gnu packages gettext)
@@ -37,14 +43,18 @@
#:use-module (gnu packages ghostscript)
#:use-module (gnu packages gtk)
#:use-module (gnu packages less)
+ #:use-module (gnu packages gnome)
#:use-module (gnu packages xorg)
#:use-module (gnu packages gl)
+ #:use-module (gnu packages mpi)
#:use-module (gnu packages multiprecision)
#:use-module (gnu packages pcre)
+ #:use-module (gnu packages popt)
#:use-module (gnu packages perl)
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages python)
#:use-module (gnu packages readline)
+ #:use-module (gnu packages tcsh)
#:use-module (gnu packages texinfo)
#:use-module (gnu packages texlive)
#:use-module (gnu packages xml))
@@ -137,7 +147,7 @@ LP/MIP solver is included in the package.")
(define-public pspp
(package
(name "pspp")
- (version "0.8.2")
+ (version "0.8.3")
(source
(origin
(method url-fetch)
@@ -145,7 +155,7 @@ LP/MIP solver is included in the package.")
version ".tar.gz"))
(sha256
(base32
- "1w7h3dglgx0jlq1wb605b8pgfsk2vr1q2q2rj7bsajh9ihbcsixr"))))
+ "0vri2pzvmm38qaihfvwlry30f40lcnps4blg59ixic4q20ldxf5d"))))
(build-system gnu-build-system)
(inputs
`(("cairo" ,cairo)
@@ -190,43 +200,14 @@ output in text, PostScript, PDF or HTML.")
(inputs `(("fortran" ,gfortran-4.8)
("python" ,python-2)))
(arguments
- `(#:modules ((guix build cmake-build-system)
- (guix build utils)
- (guix build rpath)
- (srfi srfi-1))
- #:imported-modules ((guix build cmake-build-system)
- (guix build gnu-build-system)
- (guix build utils)
- (guix build rpath))
- #:configure-flags '("-DBUILD_SHARED_LIBS:BOOL=YES")
+ `(#:configure-flags '("-DBUILD_SHARED_LIBS:BOOL=YES")
#:phases (alist-cons-before
'check 'patch-python
(lambda* (#:key inputs #:allow-other-keys)
(let ((python (assoc-ref inputs "python")))
(substitute* "lapack_testing.py"
(("/usr/bin/env python") python))))
- (alist-cons-after
- 'strip 'add-libs-to-runpath
- (lambda* (#:key inputs outputs #:allow-other-keys)
- (let* ((out (assoc-ref outputs "out"))
- (fortran (assoc-ref inputs "fortran"))
- (libc (assoc-ref inputs "libc"))
- (rpaths `(,(string-append fortran "/lib64")
- ,(string-append fortran "/lib")
- ,(string-append libc "/lib")
- ,(string-append out "/lib"))))
- ;; Set RUNPATH for all libraries
- (with-directory-excursion out
- (for-each
- (lambda (lib)
- (let ((lib-rpaths (file-rpath lib)))
- (for-each
- (lambda (dir)
- (or (member dir lib-rpaths)
- (augment-rpath lib dir)))
- rpaths)))
- (find-files "lib" ".*so$")))))
- %standard-phases))))
+ %standard-phases)))
(synopsis "Library for numerical linear algebra")
(description
"LAPACK is a Fortran 90 library for solving the most commonly occurring
@@ -349,3 +330,499 @@ applications and it provides great support for visualizing results. Work may
be performed both at the interactive command-line as well as via script
files.")
(license license:gpl3+)))
+
+(define-public gmsh
+ (package
+ (name "gmsh")
+ (version "2.8.4")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "http://www.geuz.org/gmsh/src/gmsh-"
+ version "-source.tgz"))
+ (sha256
+ (base32 "0jv2yvk28w86rx5mvjkb0w12ff2jxih7axnpvznpd295lg5jg7hr"))
+ (modules '((guix build utils)))
+ (snippet
+ ;; Remove non-free METIS code
+ '(delete-file-recursively "contrib/Metis"))))
+ (build-system cmake-build-system)
+ (native-inputs `(("patchelf" ,patchelf))) ;for augment-rpath
+ (propagated-inputs
+ `(("fltk" ,fltk)
+ ("gfortran" ,gfortran-4.8)
+ ("gmp" ,gmp)
+ ("hdf5-lib" ,hdf5 "lib")
+ ("hdf5-include" ,hdf5 "include")
+ ("lapack" ,lapack)
+ ("mesa" ,mesa)
+ ("libx11" ,libx11)
+ ("libxext" ,libxext)))
+ (arguments
+ `(#:configure-flags `("-DENABLE_METIS:BOOL=OFF"
+ "-DENABLE_BUILD_SHARED:BOOL=ON"
+ "-DENABLE_BUILD_DYNAMIC:BOOL=ON")))
+ (home-page "http://www.geuz.org/gmsh/")
+ (synopsis "3D finite element grid generator")
+ (description "Gmsh is a 3D finite element grid generator with a built-in
+CAD engine and post-processor. Its design goal is to provide a fast, light
+and user-friendly meshing tool with parametric input and advanced
+visualization capabilities. Gmsh is built around four modules: geometry,
+mesh, solver and post-processing. The specification of any input to these
+modules is done either interactively using the graphical user interface or in
+ASCII text files using Gmsh's own scripting language.")
+ (license license:gpl2+)))
+
+(define-public petsc
+ (package
+ (name "petsc")
+ (version "3.4.4")
+ (source
+ (origin
+ (method url-fetch)
+ ;; The *-lite-* tarball does not contain the *large* documentation
+ (uri (string-append "http://ftp.mcs.anl.gov/pub/petsc/release-snapshots/"
+ "petsc-lite-" version ".tar.gz"))
+ (sha256
+ (base32 "0v5dg6dhdjpi5ianvd4mm6hsvxzv1bsxwnh9f9myag0a0d9xk9iv"))
+ (patches
+ (list (search-patch "petsc-fix-threadcomm.patch")))))
+ (build-system gnu-build-system)
+ (native-inputs
+ `(("python" ,python-2)
+ ("perl" ,perl)))
+ (inputs
+ `(("gfortran" ,gfortran-4.8)
+ ("lapack" ,lapack)
+ ("superlu" ,superlu)
+ ;; leaving out hdf5 and fftw, as petsc expects them to be built with mpi
+ ;; leaving out opengl, as configuration seems to only be for mac
+ ))
+ (arguments
+ `(#:test-target "test"
+ #:parallel-build? #f
+ #:configure-flags
+ `("--with-mpi=0"
+ "--with-openmp=1"
+ "--with-superlu=1"
+ ,(string-append "--with-superlu-include="
+ (assoc-ref %build-inputs "superlu") "/include")
+ ,(string-append "--with-superlu-lib="
+ (assoc-ref %build-inputs "superlu") "/lib/libsuperlu.a"))
+ #:phases
+ (alist-replace
+ 'configure
+ ;; PETSc's configure script is actually a python script, so we can't
+ ;; run it with bash.
+ (lambda* (#:key outputs (configure-flags '())
+ #:allow-other-keys)
+ (let* ((prefix (assoc-ref outputs "out"))
+ (flags `(,(string-append "--prefix=" prefix)
+ ,@configure-flags)))
+ (format #t "build directory: ~s~%" (getcwd))
+ (format #t "configure flags: ~s~%" flags)
+ (zero? (apply system* "./configure" flags))))
+ (alist-cons-after
+ 'configure 'clean-local-references
+ ;; Try to keep build directory names from leaking into compiled code
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (let ((out (assoc-ref outputs "out")))
+ (substitute* (find-files "." "^petsc(conf|machineinfo).h$")
+ (((getcwd)) out))))
+ (alist-cons-after
+ 'install 'clean-install
+ ;; Try to keep installed files from leaking build directory names.
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (let ((out (assoc-ref outputs "out"))
+ (fortran (assoc-ref inputs "gfortran")))
+ (substitute* (map (lambda (file)
+ (string-append out "/" file))
+ '("conf/petscvariables"
+ "conf/PETScConfig.cmake"))
+ (((getcwd)) out))
+ ;; Make compiler references point to the store
+ (substitute* (string-append out "/conf/petscvariables")
+ (("= g(cc|\\+\\+|fortran)" _ suffix)
+ (string-append "= " fortran "/bin/g" suffix)))
+ ;; PETSc installs some build logs, which aren't necessary.
+ (for-each (lambda (file)
+ (let ((f (string-append out "/" file)))
+ (when (file-exists? f)
+ (delete-file f))))
+ '("conf/configure.log"
+ "conf/make.log"
+ "conf/test.log"
+ "conf/error.log"
+ "conf/RDict.db"
+ ;; Once installed, should uninstall with Guix
+ "conf/uninstall.py"))))
+ %standard-phases)))))
+ (home-page "http://www.mcs.anl.gov/petsc")
+ (synopsis "Library to solve PDEs")
+ (description "PETSc, pronounced PET-see (the S is silent), is a suite of
+data structures and routines for the scalable (parallel) solution of
+scientific applications modeled by partial differential equations.")
+ (license (license:bsd-style
+ "http://www.mcs.anl.gov/petsc/documentation/copyright.html"))))
+
+(define-public petsc-complex
+ (package (inherit petsc)
+ (name "petsc-complex")
+ (arguments
+ (substitute-keyword-arguments (package-arguments petsc)
+ ((#:configure-flags cf)
+ `(cons "--with-scalar-type=complex" ,cf))))
+ (synopsis "Library to solve PDEs (with complex scalars)")))
+
+(define-public petsc-openmpi
+ (package (inherit petsc)
+ (name "petsc-openmpi")
+ (inputs
+ `(("openmpi" ,openmpi)
+ ,@(package-inputs petsc)))
+ (arguments
+ (substitute-keyword-arguments (package-arguments petsc)
+ ((#:configure-flags cf)
+ ``("--with-mpiexec=mpirun"
+ ,(string-append "--with-mpi-dir="
+ (assoc-ref %build-inputs "openmpi"))
+ ,@(delete "--with-mpi=0" ,cf)))))
+ (synopsis "Library to solve PDEs (with MPI support)")))
+
+(define-public petsc-complex-openmpi
+ (package (inherit petsc-complex)
+ (name "petsc-complex-openmpi")
+ (inputs
+ `(("openmpi" ,openmpi)
+ ,@(package-inputs petsc-complex)))
+ (arguments
+ (substitute-keyword-arguments (package-arguments petsc-complex)
+ ((#:configure-flags cf)
+ ``("--with-mpiexec=mpirun"
+ ,(string-append "--with-mpi-dir="
+ (assoc-ref %build-inputs "openmpi"))
+ ,@(delete "--with-mpi=0" ,cf)))))
+ (synopsis "Library to solve PDEs (with complex scalars and MPI support)")))
+
+(define-public superlu
+ (package
+ (name "superlu")
+ (version "4.3")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "http://crd-legacy.lbl.gov/~xiaoye/SuperLU/"
+ "superlu_" version ".tar.gz"))
+ (sha256
+ (base32 "10b785s9s4x0m9q7ihap09275pq4km3k2hk76jiwdfdr5qr2168n"))))
+ (build-system gnu-build-system)
+ (native-inputs
+ `(("tcsh" ,tcsh)))
+ (inputs
+ `(("lapack" ,lapack)
+ ("gfortran" ,gfortran-4.8)))
+ (arguments
+ `(#:parallel-build? #f
+ #:tests? #f ;tests are run as part of `make all`
+ #:phases
+ (alist-replace
+ 'configure
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (call-with-output-file "make.inc"
+ (lambda (port)
+ (format port "
+PLAT =
+SuperLUroot = ~a
+SUPERLULIB = ~a/lib/libsuperlu.a
+TMGLIB = libtmglib.a
+BLASDEF = -DUSE_VENDOR_BLAS
+BLASLIB = -L~a/lib -lblas
+LIBS = $(SUPERLULIB) $(BLASLIB)
+ARCH = ar
+ARCHFLAGS = cr
+RANLIB = ranlib
+CC = gcc
+PIC = -fPIC
+CFLAGS = -O3 -DPRNTlevel=0 $(PIC)
+NOOPTS = -O0 $(PIC)
+FORTRAN = gfortran
+FFLAGS = -O2 $(PIC)
+LOADER = $(CC)
+CDEFS = -DAdd_"
+ (getcwd)
+ (assoc-ref outputs "out")
+ (assoc-ref inputs "lapack")))))
+ (alist-cons-before
+ 'build 'create-install-directories
+ (lambda* (#:key outputs #:allow-other-keys)
+ (for-each
+ (lambda (dir)
+ (mkdir-p (string-append (assoc-ref outputs "out")
+ "/" dir)))
+ '("lib" "include")))
+ (alist-replace
+ 'install
+ (lambda* (#:key outputs #:allow-other-keys)
+ ;; Library is placed in lib during the build phase. Copy over
+ ;; headers to include.
+ (let* ((out (assoc-ref outputs "out"))
+ (incdir (string-append out "/include")))
+ (for-each (lambda (file)
+ (let ((base (basename file)))
+ (format #t "installing `~a' to `~a'~%"
+ base incdir)
+ (copy-file file
+ (string-append incdir "/" base))))
+ (find-files "SRC" ".*\\.h$"))))
+ %standard-phases)))))
+ (home-page "http://crd-legacy.lbl.gov/~xiaoye/SuperLU/")
+ (synopsis "Supernodal direct solver for sparse linear systems")
+ (description
+ "SuperLU is a general purpose library for the direct solution of large,
+sparse, nonsymmetric systems of linear equations on high performance machines.
+The library is written in C and is callable from either C or Fortran. The
+library routines perform an LU decomposition with partial pivoting and
+triangular system solves through forward and back substitution. The library
+also provides threshold-based ILU factorization preconditioners.")
+ (license license:bsd-3)))
+
+(define-public superlu-dist
+ (package
+ (name "superlu-dist")
+ (version "3.3")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "http://crd-legacy.lbl.gov/~xiaoye/SuperLU/"
+ "superlu_dist_" version ".tar.gz"))
+ (sha256
+ (base32 "1hnak09yxxp026blq8zhrl7685yip16svwngh1wysqxf8z48vzfj"))
+ (patches (list (search-patch "superlu-dist-scotchmetis.patch")))))
+ (build-system gnu-build-system)
+ (native-inputs
+ `(("tcsh" ,tcsh)))
+ (inputs
+ `(("gfortran" ,gfortran-4.8)))
+ (propagated-inputs
+ `(("openmpi" ,openmpi) ;headers include MPI heades
+ ("lapack" ,lapack) ;required to link with output library
+ ("pt-scotch" ,pt-scotch))) ;same
+ (arguments
+ `(#:parallel-build? #f ;race conditions using ar
+ #:phases
+ (alist-replace
+ 'configure
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (call-with-output-file "make.inc"
+ (lambda (port)
+ (format port "
+PLAT =
+DSuperLUroot = ~a
+DSUPERLULIB = ~a/lib/libsuperlu_dist.a
+BLASDEF = -DUSE_VENDOR_BLAS
+BLASLIB = -L~a/lib -lblas
+PARMETISLIB = -L~a/lib \
+ -lptscotchparmetis -lptscotch -lptscotcherr -lptscotcherrexit \
+ -lscotch -lscotcherr -lscotcherrexit
+METISLIB = -L~:*~a/lib \
+ -lscotchmetis -lscotch -lscotcherr -lscotcherrexit
+LIBS = $(DSUPERLULIB) $(PARMETISLIB) $(METISLIB) $(BLASLIB)
+ARCH = ar
+ARCHFLAGS = cr
+RANLIB = ranlib
+CC = mpicc
+PIC = -fPIC
+CFLAGS = -O3 -g -DPRNTlevel=0 $(PIC)
+NOOPTS = -O0 -g $(PIC)
+FORTRAN = mpifort
+FFLAGS = -O2 -g $(PIC)
+LOADER = $(CC)
+CDEFS = -DAdd_"
+ (getcwd)
+ (assoc-ref outputs "out")
+ (assoc-ref inputs "lapack")
+ (assoc-ref inputs "pt-scotch")))))
+ (alist-cons-after
+ 'unpack 'remove-broken-symlinks
+ (lambda _
+ (for-each delete-file
+ (find-files "MAKE_INC" "\\.#make\\..*")))
+ (alist-cons-before
+ 'build 'create-install-directories
+ (lambda* (#:key outputs #:allow-other-keys)
+ (for-each
+ (lambda (dir)
+ (mkdir-p (string-append (assoc-ref outputs "out")
+ "/" dir)))
+ '("lib" "include")))
+ (alist-replace
+ 'check
+ (lambda _
+ (with-directory-excursion "EXAMPLE"
+ (and
+ (zero? (system* "mpirun" "-n" "2"
+ "./pddrive" "-r" "1" "-c" "2" "g20.rua"))
+ (zero? (system* "mpirun" "-n" "2"
+ "./pzdrive" "-r" "1" "-c" "2" "cg20.cua")))))
+ (alist-replace
+ 'install
+ (lambda* (#:key outputs #:allow-other-keys)
+ ;; Library is placed in lib during the build phase. Copy over
+ ;; headers to include.
+ (let* ((out (assoc-ref outputs "out"))
+ (incdir (string-append out "/include")))
+ (for-each (lambda (file)
+ (let ((base (basename file)))
+ (format #t "installing `~a' to `~a'~%"
+ base incdir)
+ (copy-file file
+ (string-append incdir "/" base))))
+ (find-files "SRC" ".*\\.h$"))))
+ %standard-phases)))))))
+ (home-page (package-home-page superlu))
+ (synopsis "Parallel supernodal direct solver")
+ (description
+ "SuperLU_DIST is a parallel extension to the serial SuperLU library.
+It is targeted for distributed memory parallel machines. SuperLU_DIST is
+implemented in ANSI C, and MPI for communications.")
+ (license license:bsd-3)))
+
+(define-public scotch
+ (package
+ (name "scotch")
+ (version "6.0.0")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "https://gforge.inria.fr/frs/download.php/31831/"
+ "scotch_" version ".tar.gz"))
+ (sha256
+ (base32 "0yfqf9lk7chb3h42777x42x4adx0v3n0b41q0cdqrdmscp4iczp5"))
+ (patches (list (search-patch "scotch-test-threading.patch")))))
+ (build-system gnu-build-system)
+ (inputs
+ `(("zlib" ,zlib)
+ ("flex" ,flex)
+ ("bison" ,bison)))
+ (arguments
+ `(#:phases
+ (alist-cons-after
+ 'unpack 'chdir-to-src
+ (lambda _ (chdir "src"))
+ (alist-replace
+ 'configure
+ (lambda _
+ (call-with-output-file "Makefile.inc"
+ (lambda (port)
+ (format port "
+EXE =
+LIB = .a
+OBJ = .o
+MAKE = make
+AR = ar
+ARFLAGS = -ruv
+CCS = gcc
+CCP = mpicc
+CCD = gcc
+CPPFLAGS =~{ -D~a~}
+CFLAGS = -O2 -g $(CPPFLAGS)
+LDFLAGS = -lz -lm -lrt -lpthread
+CP = cp
+LEX = flex -Pscotchyy -olex.yy.c
+LN = ln
+MKDIR = mkdir
+MV = mv
+RANLIB = ranlib
+YACC = bison -pscotchyy -y -b y
+"
+ '("COMMON_FILE_COMPRESS_GZ"
+ "COMMON_PTHREAD"
+ "COMMON_RANDOM_FIXED_SEED"
+ ;; TODO: Define once our MPI supports
+ ;; MPI_THREAD_MULTIPLE
+ ;; "SCOTCH_PTHREAD"
+ ;; "SCOTCH_PTHREAD_NUMBER=2"
+ "restrict=__restrict")))))
+ (alist-replace
+ 'install
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let ((out (assoc-ref outputs "out")))
+ (mkdir out)
+ (zero? (system* "make"
+ (string-append "prefix=" out)
+ "install"))))
+ %standard-phases)))))
+ (home-page "http://www.labri.fr/perso/pelegrin/scotch/")
+ (synopsis "Programs and libraries for graph algorithms")
+ (description "SCOTCH is a set of programs and libraries which implement
+the static mapping and sparse matrix reordering algorithms developed within
+the SCOTCH project. Its purpose is to apply graph theory, with a divide and
+conquer approach, to scientific computing problems such as graph and mesh
+partitioning, static mapping, and sparse matrix ordering, in application
+domains ranging from structural mechanics to operating systems or
+bio-chemistry.")
+ ;; See LICENSE_en.txt
+ (license license:cecill-c)))
+
+(define-public pt-scotch
+ (package (inherit scotch)
+ (name "pt-scotch")
+ (propagated-inputs
+ `(("openmpi" ,openmpi))) ;Headers include MPI headers
+ (arguments
+ (substitute-keyword-arguments (package-arguments scotch)
+ ((#:phases scotch-phases)
+ `(alist-replace
+ 'build
+ ;; TODO: Would like to add parallelism here
+ (lambda _
+ (and
+ (zero? (system* "make" "ptscotch"))
+ ;; Install the serial metis compatibility library
+ (zero? (system* "make" "-C" "libscotchmetis" "install"))))
+ (alist-replace
+ 'check
+ (lambda _ (zero? (system* "make" "ptcheck")))
+ (alist-replace
+ 'install
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let ((out (assoc-ref outputs "out")))
+ (mkdir out)
+ (zero? (system* "make"
+ (string-append "prefix=" out)
+ "install"))))
+ ,scotch-phases))))))
+ (synopsis "Programs and libraries for graph algorithms (with MPI)")))
+
+(define-public gsegrafix
+ (package
+ (name "gsegrafix")
+ (version "1.0.6")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "mirror://gnu/" name "/" name "-"
+ version ".tar.gz"))
+ (sha256
+ (base32
+ "1b13hvx063zv970y750bx41wpx6hwd5ngjhbdrna8w8yy5kmxcda"))))
+ (build-system gnu-build-system)
+ (arguments
+ `(#:configure-flags '("LDFLAGS=-lm")))
+ (inputs
+ `(("libgnomecanvas" ,libgnomecanvas)
+ ("libbonoboui" ,libbonoboui)
+ ("libgnomeui" ,libgnomeui)
+ ("libgnomeprintui" ,libgnomeprintui)
+ ("popt" ,popt)))
+ (native-inputs
+ `(("pkg-config" ,pkg-config)))
+ (home-page "http://www.gnu.org/software/gsegrafix/")
+ (synopsis "GNOME application to create scientific and engineering plots")
+ (description "GSEGrafix is an application which produces high-quality graphical
+plots for science and engineering. Plots are specified via simple ASCII
+parameter files and data files and are presented in an anti-aliased GNOME
+canvas. The program supports rectangular two-dimensional plots, histograms,
+polar-axis plots and three-dimensional plots. Plots can be printed or saved
+to BMP, JPEG or PNG image formats.")
+ (license license:gpl3+)))
diff --git a/gnu/packages/mcrypt.scm b/gnu/packages/mcrypt.scm
new file mode 100644
index 0000000000..eac8c72c5e
--- /dev/null
+++ b/gnu/packages/mcrypt.scm
@@ -0,0 +1,114 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2014 Eric Bavier <bavier@member.fsf.org>
+;;;
+;;; 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 <http://www.gnu.org/licenses/>.
+
+(define-module (gnu packages mcrypt)
+ #:use-module (guix packages)
+ #:use-module ((guix licenses) #:select (gpl2+))
+ #:use-module (guix download)
+ #:use-module (guix build-system gnu)
+ #:use-module (gnu packages)
+ #:use-module (gnu packages compression)
+ #:use-module (gnu packages perl)
+ #:use-module (gnu packages file))
+
+(define-public mcrypt
+ (package
+ (name "mcrypt")
+ (version "2.6.8")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "mirror://sourceforge/mcrypt/mcrypt-"
+ version ".tar.gz"))
+ (sha256
+ (base32
+ "161031n1w9pb4yzz9i47szc12a4mwpcpvyxnvafsik2l9s2aliai"))))
+ (build-system gnu-build-system)
+ (inputs
+ `(("zlib" ,zlib)
+ ("libmcrypt" ,libmcrypt)
+ ("libmhash" ,libmhash)))
+ (home-page "http://mcrypt.sourceforge.net/")
+ (synopsis "Replacement for the popular Unix crypt command")
+ (description
+ "MCrypt is a replacement for the old crypt() package and crypt(1)
+command, with extensions. It allows developers to use a wide range of
+encryption functions, without making drastic changes to their code. It allows
+users to encrypt files or data streams without having to be cryptographers.
+The companion to MCrypt is Libmcrypt, which contains the actual encryption
+functions themselves, and provides a standardized mechanism for accessing
+them.")
+ (license gpl2+)))
+
+(define-public libmcrypt
+ (package
+ (name "libmcrypt")
+ (version "2.5.8")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "mirror://sourceforge/mcrypt/libmcrypt-"
+ version ".tar.gz"))
+ (sha256
+ (base32
+ "0gipgb939vy9m66d3k8il98rvvwczyaw2ixr8yn6icds9c3nrsz4"))))
+ (build-system gnu-build-system)
+ (native-inputs `(("file" ,file)))
+ (home-page "http://mcrypt.sourceforge.net/")
+ (synopsis "Encryption algorithm library")
+ (description
+ "Libmcrypt is a data encryption library. The library is thread safe and
+provides encryption and decryption functions. This version of the library
+supports many encryption algorithms and encryption modes. Some algorithms
+which are supported: SERPENT, RIJNDAEL, 3DES, GOST, SAFER+, CAST-256, RC2,
+XTEA, 3WAY, TWOFISH, BLOWFISH, ARCFOUR, WAKE and more.")
+ (license gpl2+)))
+
+(define-public libmhash
+ (package
+ (name "libmhash")
+ (version "0.9.9.9")
+ (source
+ (origin
+ (method url-fetch)
+
+ (uri (string-append "mirror://sourceforge/mhash/mhash-"
+ version ".tar.bz2"))
+ (sha256
+ (base32
+ "1w7yiljan8gf1ibiypi6hm3r363imm3sxl1j8hapjdq3m591qljn"))
+ (patches (list (search-patch "mhash-keygen-test-segfault.patch")))))
+ (build-system gnu-build-system)
+ (native-inputs
+ `(("file" ,file)
+ ("perl" ,perl))) ;for tests
+ (home-page "http://mhash.sourceforge.net/")
+ (synopsis "Thread-safe hash library")
+ (description
+ "mhash is a thread-safe hash library, implemented in C, and provides a
+uniform interface to a large number of hash algorithms. These algorithms can
+be used to compute checksums, message digests, and other signatures. The HMAC
+support implements the basics for message authentication, following RFC 2104.
+
+Algorithms currently supplied are:
+
+CRC-32, CRC-32B, ALDER-32, MD-2, MD-4, MD-5, RIPEMD-128, RIPEMD-160,
+RIPEMD-256, RIPEMD-320, SHA-1, SHA-224, SHA-256, SHA-384, SHA-512, HAVAL-128,
+HAVAL-160, HAVAL-192, HAVAL-256, TIGER, TIGER-128, TIGER-160, GOST, WHIRLPOOL,
+SNEFRU-128, SNEFRU-256")
+ (license gpl2+)))
diff --git a/gnu/packages/mp3.scm b/gnu/packages/mp3.scm
index 5eca6c3d35..79ae6eac94 100644
--- a/gnu/packages/mp3.scm
+++ b/gnu/packages/mp3.scm
@@ -30,6 +30,9 @@
#:use-module (gnu packages pcre)
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages xiph)
+ #:use-module (gnu packages pulseaudio)
+ #:use-module ((gnu packages linux)
+ #:select (alsa-lib))
#:use-module (guix packages)
#:use-module (guix download)
#:use-module (guix build-system gnu))
@@ -186,6 +189,30 @@ This package contains the binary.")
(license license:gpl2+)
(home-page "http://mp3splt.sourceforge.net/mp3splt_page/home.php")))
+(define-public mpg123
+ (package
+ (name "mpg123")
+ (version "1.19.0")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "mirror://sourceforge/mpg123/mpg123-"
+ version ".tar.bz2"))
+ (sha256
+ (base32
+ "06xhd68mj9yp0r6l771aq0d7xgnl402a3wm2mvhxmd3w3ph29446"))))
+ (build-system gnu-build-system)
+ (arguments '(#:configure-flags '("--with-default-audio=pulse")))
+ (native-inputs `(("pkg-config" ,pkg-config)))
+ (inputs `(("pulseaudio" ,pulseaudio)
+ ("alsa-lib" ,alsa-lib)))
+ (home-page "http://www.mpg123.org/")
+ (synopsis "Console MP3 player and decoder library")
+ (description
+ "mpg123 is a real time MPEG 1.0/2.0/2.5 audio player/decoder for layers
+1,2 and 3 (MPEG 1.0 layer 3 aka MP3 most commonly tested). It comes with a
+command-line tool as well as a C library, libmpg123.")
+ (license license:lgpl2.1)))
+
(define-public mpg321
(package
(name "mpg321")
diff --git a/gnu/packages/mpd.scm b/gnu/packages/mpd.scm
index 04b34eaf87..5841e8be7b 100644
--- a/gnu/packages/mpd.scm
+++ b/gnu/packages/mpd.scm
@@ -1,5 +1,6 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2014 David Thompson <dthompson2@worcester.edu>
+;;; Copyright © 2014 Andreas Enge <andreas@enge.fr>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -26,6 +27,7 @@
#:use-module (gnu packages avahi)
#:use-module (gnu packages compression)
#:use-module (gnu packages curl)
+ #:use-module (gnu packages doxygen)
#:use-module (gnu packages glib)
#:use-module (gnu packages linux)
#:use-module (gnu packages mp3)
@@ -53,9 +55,7 @@
(base32
"0csb9r3nlmbwpiryixjr5k33x3zqd61xjhwmlps3a6prck1n1xw2"))))
(build-system gnu-build-system)
- (arguments
- ;; FIXME: Needs doxygen.
- '(#:configure-flags '("--disable-documentation")))
+ (native-inputs `(("doxygen" ,doxygen)))
(synopsis "Music Player Daemon client library")
(description "A stable, documented, asynchronous API library for
interfacing MPD in the C, C++ & Objective C languages.")
diff --git a/gnu/packages/mpi.scm b/gnu/packages/mpi.scm
new file mode 100644
index 0000000000..e7919bc436
--- /dev/null
+++ b/gnu/packages/mpi.scm
@@ -0,0 +1,130 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2014 Eric Bavier <bavier@member.fsf.org>
+;;; Copyright © 2014 Ludovic Courtès <ludo@gnu.org>
+;;;
+;;; 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 <http://www.gnu.org/licenses/>.
+
+(define-module (gnu packages mpi)
+ #:use-module (guix packages)
+ #:use-module ((guix licenses)
+ #:hide (expat))
+ #:use-module (guix download)
+ #:use-module (guix build-system gnu)
+ #:use-module (gnu packages)
+ #:use-module (gnu packages gcc)
+ #:use-module (gnu packages linux)
+ #:use-module (gnu packages pciutils)
+ #:use-module (gnu packages xorg)
+ #:use-module (gnu packages gtk)
+ #:use-module (gnu packages xml)
+ #:use-module (gnu packages ncurses)
+ #:use-module (gnu packages pkg-config)
+ #:use-module (gnu packages valgrind)
+ #:use-module (srfi srfi-1))
+
+(define-public hwloc
+ (package
+ (name "hwloc")
+ (version "1.9")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "http://www.open-mpi.org/software/hwloc/v"
+ version "/downloads/hwloc-"
+ version ".tar.bz2"))
+ (sha256
+ (base32
+ "0zjgiili2a8v63s8ly3a8qp8ibxv1jw3zbgm7diic3w1qgqiza14"))))
+ (build-system gnu-build-system)
+ (arguments
+ ;; Enable libpci support, which effectively makes hwloc GPLv2+.
+ '(#:configure-flags '("--enable-libpci")))
+ (inputs
+ `(("libx11" ,libx11)
+ ("cairo" ,cairo)
+ ("ncurses" ,ncurses)
+ ("expat" ,expat)))
+ (native-inputs
+ `(("pkg-config" ,pkg-config)))
+ (propagated-inputs
+ ;; 'hwloc.pc' refers to libpci and libnuma, hence the propagation.
+ `(("numactl" ,numactl)
+ ("pciutils" ,pciutils)))
+ (home-page "http://www.open-mpi.org/projects/hwloc/")
+ (synopsis "Abstraction of hardware architectures")
+ (description
+ "hwloc provides a portable abstraction (across OS,
+versions, architectures, ...) of the hierarchical topology of modern
+architectures, including NUMA memory nodes, sockets, shared caches, cores and
+simultaneous multithreading. It also gathers various attributes such as cache
+and memory information. It primarily aims at helping high-performance
+computing applications with gathering information about the hardware so as to
+exploit it accordingly and efficiently.
+
+hwloc may display the topology in multiple convenient formats. It also offers
+a powerful programming interface to gather information about the hardware,
+bind processes, and much more.")
+
+ ;; But see above about linking against libpci.
+ (license bsd-3)))
+
+(define-public openmpi
+ (package
+ (name "openmpi")
+ (version "1.8.1")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "http://www.open-mpi.org/software/ompi/v"
+ (string-join (take (string-split version #\.) 2)
+ ".")
+ "/downloads/openmpi-" version ".tar.bz2"))
+ (sha256
+ (base32
+ "13z1q69f3qwmmhpglarfjminfy2yw4rfqr9jydjk5507q3mjf50p"))))
+ (build-system gnu-build-system)
+ (inputs
+ `(("hwloc" ,hwloc)
+ ("gfortran" ,gfortran-4.8)
+ ("valgrind" ,valgrind)))
+ (native-inputs
+ `(("pkg-config" ,pkg-config)))
+ (arguments
+ `(#:configure-flags `("--enable-static"
+ "--enable-oshmem"
+ ;; Thread support causes some applications to hang
+ ;; "--enable-event-thread-support"
+ ;; "--enable-opal-multi-threads"
+ ;; "--enable-orte-progress-threads"
+ ;; "--enable-mpi-thread-multiple"
+ "--enable-mpi-ext=all"
+ "--with-devel-headers"
+ "--enable-debug"
+ "--enable-memchecker"
+ ,(string-append "--with-valgrind="
+ (assoc-ref %build-inputs "valgrind"))
+ ,(string-append "--with-hwloc="
+ (assoc-ref %build-inputs "hwloc")))))
+ (home-page "http://www.open-mpi.org")
+ (synopsis "MPI-2 implementation")
+ (description
+ "The Open MPI Project is an MPI-2 implementation that is developed and
+maintained by a consortium of academic, research, and industry partners. Open
+MPI is therefore able to combine the expertise, technologies, and resources
+from all across the High Performance Computing community in order to build the
+best MPI library available. Open MPI offers advantages for system and
+software vendors, application developers and computer science researchers.")
+ ;; See file://LICENSE
+ (license bsd-2)))
diff --git a/gnu/packages/openssl.scm b/gnu/packages/openssl.scm
index 8c12ff9355..eb03bb99c3 100644
--- a/gnu/packages/openssl.scm
+++ b/gnu/packages/openssl.scm
@@ -1,5 +1,6 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2013 Andreas Enge <andreas@enge.fr>
+;;; Copyright © 2014 Mark H Weaver <mhw@netris.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -34,7 +35,10 @@
".tar.gz"))
(sha256
(base32
- "0a70qdqccg16nw4bbawa6pjvzn05vfp5wkwg6jl0grch7f683jsk"))))
+ "0a70qdqccg16nw4bbawa6pjvzn05vfp5wkwg6jl0grch7f683jsk"))
+ (patches
+ (list (search-patch "openssl-CVE-2010-5298.patch")
+ (search-patch "openssl-extension-checking-fixes.patch")))))
(build-system gnu-build-system)
(native-inputs `(("perl" ,perl)))
(arguments
diff --git a/gnu/packages/patches/ccache-stdc-predef-test.patch b/gnu/packages/patches/ccache-stdc-predef-test.patch
new file mode 100644
index 0000000000..bd9444c2df
--- /dev/null
+++ b/gnu/packages/patches/ccache-stdc-predef-test.patch
@@ -0,0 +1,157 @@
+This patch is a combination of the following commits::
+
+ https://git.samba.org/?p=ccache.git;a=commit;h=b5d63f81c1a83fd4c50b769a96a04f581b7db70c
+ https://git.samba.org/?p=ccache.git;a=commit;h=a11f5688748ecb49f590b3f4bc0e9b3458f9a56f
+ https://git.samba.org/?p=ccache.git;a=commit;h=5a9322c56ed0cd16255966e99077843aae57ab3e
+
+from the general discussion at
+http://comments.gmane.org/gmane.comp.compilers.ccache/1089
+
+--- a/test.sh
++++ b/test.sh
+@@ -562,6 +562,12 @@
+ EOF
+ backdate test1.h test2.h test3.h
+
++ $COMPILER -c -Wp,-MD,expected.d test.c
++ expected_d_content=`cat expected.d`
++
++ $COMPILER -c -Wp,-MMD,expected_mmd.d test.c
++ expected_mmd_d_content=`cat expected_mmd.d`
++
+ ##################################################################
+ # First compilation is a miss.
+ testname="first compilation"
+@@ -677,7 +683,7 @@
+ checkstat 'cache hit (direct)' 0
+ checkstat 'cache hit (preprocessed)' 0
+ checkstat 'cache miss' 1
+- checkfile other.d "test.o: test.c test1.h test3.h test2.h"
++ checkfile other.d "$expected_d_content"
+
+ rm -f other.d
+
+@@ -685,7 +691,7 @@
+ checkstat 'cache hit (direct)' 1
+ checkstat 'cache hit (preprocessed)' 0
+ checkstat 'cache miss' 1
+- checkfile other.d "test.o: test.c test1.h test3.h test2.h"
++ checkfile other.d "$expected_d_content"
+
+ rm -f other.d
+
+@@ -698,7 +704,7 @@
+ checkstat 'cache hit (direct)' 0
+ checkstat 'cache hit (preprocessed)' 0
+ checkstat 'cache miss' 1
+- checkfile other.d "test.o: test.c test1.h test3.h test2.h"
++ checkfile other.d "$expected_mmd_d_content"
+
+ rm -f other.d
+
+@@ -706,7 +712,7 @@
+ checkstat 'cache hit (direct)' 1
+ checkstat 'cache hit (preprocessed)' 0
+ checkstat 'cache miss' 1
+- checkfile other.d "test.o: test.c test1.h test3.h test2.h"
++ checkfile other.d "$expected_mmd_d_content"
+
+ rm -f other.d
+
+@@ -760,7 +766,7 @@
+ checkstat 'cache hit (direct)' 0
+ checkstat 'cache hit (preprocessed)' 0
+ checkstat 'cache miss' 1
+- checkfile test.d "test.o: test.c test1.h test3.h test2.h"
++ checkfile test.d "$expected_d_content"
+
+ rm -f test.d
+
+@@ -768,7 +774,7 @@
+ checkstat 'cache hit (direct)' 1
+ checkstat 'cache hit (preprocessed)' 0
+ checkstat 'cache miss' 1
+- checkfile test.d "test.o: test.c test1.h test3.h test2.h"
++ checkfile test.d "$expected_d_content"
+
+ ##################################################################
+ # Check the scenario of running a ccache with direct mode on a cache
+@@ -780,7 +786,7 @@
+ checkstat 'cache hit (direct)' 0
+ checkstat 'cache hit (preprocessed)' 0
+ checkstat 'cache miss' 1
+- checkfile test.d "test.o: test.c test1.h test3.h test2.h"
++ checkfile test.d "$expected_d_content"
+
+ rm -f test.d
+
+@@ -788,7 +794,7 @@
+ checkstat 'cache hit (direct)' 0
+ checkstat 'cache hit (preprocessed)' 1
+ checkstat 'cache miss' 1
+- checkfile test.d "test.o: test.c test1.h test3.h test2.h"
++ checkfile test.d "$expected_d_content"
+
+ rm -f test.d
+
+@@ -796,7 +802,7 @@
+ checkstat 'cache hit (direct)' 0
+ checkstat 'cache hit (preprocessed)' 2
+ checkstat 'cache miss' 1
+- checkfile test.d "test.o: test.c test1.h test3.h test2.h"
++ checkfile test.d "$expected_d_content"
+
+ rm -f test.d
+
+@@ -804,7 +810,7 @@
+ checkstat 'cache hit (direct)' 1
+ checkstat 'cache hit (preprocessed)' 2
+ checkstat 'cache miss' 1
+- checkfile test.d "test.o: test.c test1.h test3.h test2.h"
++ checkfile test.d "$expected_d_content"
+
+ ##################################################################
+ # Check that -MF works.
+@@ -815,7 +821,7 @@
+ checkstat 'cache hit (direct)' 0
+ checkstat 'cache hit (preprocessed)' 0
+ checkstat 'cache miss' 1
+- checkfile other.d "test.o: test.c test1.h test3.h test2.h"
++ checkfile other.d "$expected_d_content"
+
+ rm -f other.d
+
+@@ -823,7 +829,7 @@
+ checkstat 'cache hit (direct)' 1
+ checkstat 'cache hit (preprocessed)' 0
+ checkstat 'cache miss' 1
+- checkfile other.d "test.o: test.c test1.h test3.h test2.h"
++ checkfile other.d "$expected_d_content"
+
+ ##################################################################
+ # Check that a missing .d file in the cache is handled correctly.
+@@ -835,13 +841,13 @@
+ checkstat 'cache hit (direct)' 0
+ checkstat 'cache hit (preprocessed)' 0
+ checkstat 'cache miss' 1
+- checkfile other.d "test.o: test.c test1.h test3.h test2.h"
++ checkfile other.d "$expected_d_content"
+
+ $CCACHE $COMPILER -c -MD test.c
+ checkstat 'cache hit (direct)' 1
+ checkstat 'cache hit (preprocessed)' 0
+ checkstat 'cache miss' 1
+- checkfile other.d "test.o: test.c test1.h test3.h test2.h"
++ checkfile other.d "$expected_d_content"
+
+ find $CCACHE_DIR -name '*.d' -exec rm -f '{}' \;
+
+@@ -849,7 +855,7 @@
+ checkstat 'cache hit (direct)' 1
+ checkstat 'cache hit (preprocessed)' 1
+ checkstat 'cache miss' 1
+- checkfile other.d "test.o: test.c test1.h test3.h test2.h"
++ checkfile other.d "$expected_d_content"
+
+ ##################################################################
+ # Check that stderr from both the preprocessor and the compiler is emitted
diff --git a/gnu/packages/patches/clucene-pkgconfig.patch b/gnu/packages/patches/clucene-pkgconfig.patch
new file mode 100644
index 0000000000..5e4825cd3f
--- /dev/null
+++ b/gnu/packages/patches/clucene-pkgconfig.patch
@@ -0,0 +1,21 @@
+Taken from the Debian package.
+
+From 7be4a19b76d98260cf95040a47935f854a4ba7a4 Mon Sep 17 00:00:00 2001
+From: Valentin Rusu <kde@rusu.info>
+Date: Sat, 17 Dec 2011 13:47:58 +0100
+Subject: [PATCH] Fix .pc file by adding clucene-shared library
+
+---
+ src/core/libclucene-core.pc.cmake | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/src/core/libclucene-core.pc.cmake
++++ b/src/core/libclucene-core.pc.cmake
+@@ -6,6 +6,6 @@ includedir=${prefix}/include:${prefix}/i
+ Name: libclucene
+ Description: CLucene - a C++ search engine, ported from the popular Apache Lucene
+ Version: @CLUCENE_VERSION_MAJOR@.@CLUCENE_VERSION_MINOR@.@CLUCENE_VERSION_REVISION@.@CLUCENE_VERSION_PATCH@
+-Libs: -L${prefix}/@LIB_DESTINATION@/ -lclucene-core
++Libs: -L${prefix}/@LIB_DESTINATION@/ -lclucene-core -lclucene-shared
+ Cflags: -I${prefix}/include -I${prefix}/include/CLucene/ext
+ ~
diff --git a/gnu/packages/patches/doxygen-test.patch b/gnu/packages/patches/doxygen-test.patch
new file mode 100644
index 0000000000..7a7f4e963f
--- /dev/null
+++ b/gnu/packages/patches/doxygen-test.patch
@@ -0,0 +1,38 @@
+Modify the expected outcome of test 012 so that it passes when bibtex is
+not in the path, as we do not wish to add texlive as an input just for this
+test.
+
+diff -u -r doxygen-1.8.7.orig/testing/012/citelist.xml doxygen-1.8.7/testing/012/citelist.xml
+--- doxygen-1.8.7.orig/testing/012/citelist.xml 2014-04-24 23:43:34.000000000 +0200
++++ doxygen-1.8.7/testing/012/citelist.xml 2014-04-24 23:49:43.000000000 +0200
+@@ -4,17 +4,6 @@
+ <compoundname>citelist</compoundname>
+ <title>Bibliography</title>
+ <detaileddescription>
+- <para>
+- <variablelist>
+- <varlistentry>
+- <term><anchor id="_1CITEREF_knuth79"/>[1]</term>
+- </varlistentry>
+- <listitem>
+- <para>Donald<nonbreakablespace/>E. Knuth. <emphasis>Tex and Metafont, New Directions in Typesetting</emphasis>. American Mathematical Society and Digital Press, Stanford, 1979.</para>
+- <para/>
+- </listitem>
+- </variablelist>
+- </para>
+ </detaileddescription>
+ </compounddef>
+ </doxygen>
+diff -u -r doxygen-1.8.7.orig/testing/012/indexpage.xml doxygen-1.8.7/testing/012/indexpage.xml
+--- doxygen-1.8.7.orig/testing/012/indexpage.xml 2014-04-24 23:43:34.000000000 +0200
++++ doxygen-1.8.7/testing/012/indexpage.xml 2014-04-24 23:44:05.000000000 +0200
+@@ -4,7 +4,7 @@
+ <compoundname>index</compoundname>
+ <title>My Project</title>
+ <detaileddescription>
+- <para>See <ref refid="citelist_1CITEREF_knuth79" kindref="member">[1]</ref> for more info. </para>
++ <para>See <ref refid="citelist_1CITEREF_knuth79" kindref="member">knuth79</ref> for more info. </para>
+ </detaileddescription>
+ </compounddef>
+ </doxygen>
+Nur in doxygen-1.8.7/testing: test_output_012.
diff --git a/gnu/packages/patches/doxygen-tmake.patch b/gnu/packages/patches/doxygen-tmake.patch
new file mode 100644
index 0000000000..3579243702
--- /dev/null
+++ b/gnu/packages/patches/doxygen-tmake.patch
@@ -0,0 +1,24 @@
+Fix the `check_unix' function, which looks for `/bin/uname' to determine
+whether we're on a Unix-like system.
+Taken from nixpkgs.
+
+--- doxygen-1.5.8/tmake/bin/tmake 2008-12-06 14:16:20.000000000 +0100
++++ doxygen-1.5.8/tmake/bin/tmake 2009-03-05 11:29:55.000000000 +0100
+@@ -234,17 +234,7 @@ sub tmake_verb {
+ #
+
+ sub check_unix {
+- my($r);
+- $r = 0;
+- if ( -f "/bin/uname" ) {
+- $r = 1;
+- (-f "\\bin\\uname") && ($r = 0);
+- }
+- if ( -f "/usr/bin/uname" ) {
+- $r = 1;
+- (-f "\\usr\\bin\\uname") && ($r = 0);
+- }
+- return $r;
++ return 1;
+ }
+
diff --git a/gnu/packages/patches/mhash-keygen-test-segfault.patch b/gnu/packages/patches/mhash-keygen-test-segfault.patch
new file mode 100644
index 0000000000..3bd9f43418
--- /dev/null
+++ b/gnu/packages/patches/mhash-keygen-test-segfault.patch
@@ -0,0 +1,13 @@
+This patch from resolution of https://sourceforge.net/p/mhash/bugs/37/
+
+--- a/src/keygen_test.c
++++ b/src/keygen_test.c
+@@ -121,8 +121,6 @@
+
+ mhash_keygen_ext(KEYGEN_S2K_SALTED, data, key, keysize, password, passlen);
+
+- mutils_memset(tmp, 0, keysize * 2);
+-
+ tmp = mutils_asciify(key, keysize);
+
+ result = mutils_strcmp((mutils_word8 *) KEY2, tmp);
diff --git a/gnu/packages/patches/openssl-CVE-2010-5298.patch b/gnu/packages/patches/openssl-CVE-2010-5298.patch
new file mode 100644
index 0000000000..707a24dff0
--- /dev/null
+++ b/gnu/packages/patches/openssl-CVE-2010-5298.patch
@@ -0,0 +1,27 @@
+From db978be7388852059cf54e42539a363d549c5bfd Mon Sep 17 00:00:00 2001
+From: Kurt Roeckx <kurt@roeckx.be>
+Date: Sun, 13 Apr 2014 15:05:30 +0200
+Subject: [PATCH] Don't release the buffer when there still is data in it
+
+RT: 2167, 3265
+---
+ ssl/s3_pkt.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/ssl/s3_pkt.c b/ssl/s3_pkt.c
+index b9e45c7..32e9207 100644
+--- a/ssl/s3_pkt.c
++++ b/ssl/s3_pkt.c
+@@ -1055,7 +1055,8 @@ int ssl3_read_bytes(SSL *s, int type, unsigned char *buf, int len, int peek)
+ {
+ s->rstate=SSL_ST_READ_HEADER;
+ rr->off=0;
+- if (s->mode & SSL_MODE_RELEASE_BUFFERS)
++ if (s->mode & SSL_MODE_RELEASE_BUFFERS &&
++ s->s3->rbuf.left == 0)
+ ssl3_release_read_buffer(s);
+ }
+ }
+--
+1.9.1
+
diff --git a/gnu/packages/patches/openssl-extension-checking-fixes.patch b/gnu/packages/patches/openssl-extension-checking-fixes.patch
new file mode 100644
index 0000000000..3fdd893563
--- /dev/null
+++ b/gnu/packages/patches/openssl-extension-checking-fixes.patch
@@ -0,0 +1,40 @@
+From 300b9f0b704048f60776881f1d378c74d9c32fbd Mon Sep 17 00:00:00 2001
+From: "Dr. Stephen Henson" <steve@openssl.org>
+Date: Tue, 15 Apr 2014 18:48:54 +0100
+Subject: [PATCH] Extension checking fixes.
+
+When looking for an extension we need to set the last found
+position to -1 to properly search all extensions.
+
+PR#3309.
+---
+ crypto/x509v3/v3_purp.c | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/crypto/x509v3/v3_purp.c b/crypto/x509v3/v3_purp.c
+index 6c40c7d..5f931db 100644
+--- a/crypto/x509v3/v3_purp.c
++++ b/crypto/x509v3/v3_purp.c
+@@ -389,8 +389,8 @@ static void x509v3_cache_extensions(X509 *x)
+ /* Handle proxy certificates */
+ if((pci=X509_get_ext_d2i(x, NID_proxyCertInfo, NULL, NULL))) {
+ if (x->ex_flags & EXFLAG_CA
+- || X509_get_ext_by_NID(x, NID_subject_alt_name, 0) >= 0
+- || X509_get_ext_by_NID(x, NID_issuer_alt_name, 0) >= 0) {
++ || X509_get_ext_by_NID(x, NID_subject_alt_name, -1) >= 0
++ || X509_get_ext_by_NID(x, NID_issuer_alt_name, -1) >= 0) {
+ x->ex_flags |= EXFLAG_INVALID;
+ }
+ if (pci->pcPathLengthConstraint) {
+@@ -670,7 +670,7 @@ static int check_purpose_timestamp_sign(const X509_PURPOSE *xp, const X509 *x,
+ return 0;
+
+ /* Extended Key Usage MUST be critical */
+- i_ext = X509_get_ext_by_NID((X509 *) x, NID_ext_key_usage, 0);
++ i_ext = X509_get_ext_by_NID((X509 *) x, NID_ext_key_usage, -1);
+ if (i_ext >= 0)
+ {
+ X509_EXTENSION *ext = X509_get_ext((X509 *) x, i_ext);
+--
+1.9.1
+
diff --git a/gnu/packages/patches/perl-tk-x11-discover.patch b/gnu/packages/patches/perl-tk-x11-discover.patch
new file mode 100644
index 0000000000..f4365e6882
--- /dev/null
+++ b/gnu/packages/patches/perl-tk-x11-discover.patch
@@ -0,0 +1,14 @@
+On non-x86_64 systems, this conditional can cause a specified X11 build value
+to be overwritten to null, causing x11 discovery to fail.
+
+--- a/myConfig 2014-05-12 11:16:48.152719722 -0500
++++ b/myConfig 2014-05-12 11:16:24.704719113 -0500
+@@ -350,7 +350,7 @@
+ #
+ # Prefer 64bit libraries on certain architectures
+ #
+- unless (defined $xlib and $Config{'archname'} =~ m/x86_64/)
++ unless (defined $xlib or not $Config{'archname'} =~ m/x86_64/)
+ {
+ $xlib64 = &lX11(0, chooseX11(</usr/X11*/lib64>));
+ }
diff --git a/gnu/packages/patches/petsc-fix-threadcomm.patch b/gnu/packages/patches/petsc-fix-threadcomm.patch
new file mode 100644
index 0000000000..3ef4f2d83d
--- /dev/null
+++ b/gnu/packages/patches/petsc-fix-threadcomm.patch
@@ -0,0 +1,15 @@
+Fix "error: unknown type name 'cpu_set_t'". Patch submitted upstream
+http://lists.mcs.anl.gov/pipermail/petsc-dev/2014-May/015345.html
+
+--- a/src/sys/threadcomm/impls/openmp/tcopenmp.c 2014-03-13 21:47:22.000000000 -0500
++++ b/src/sys/threadcomm/impls/openmp/tcopenmp.c 2014-04-02 14:44:57.185170151 -0500
+@@ -1,6 +1,9 @@
+ #define PETSC_DESIRE_FEATURE_TEST_MACROS
+ #include <../src/sys/threadcomm/impls/openmp/tcopenmpimpl.h>
+ #include <omp.h>
++#if defined(PETSC_HAVE_SCHED_CPU_SET_T)
++#include <sched.h>
++#endif
+
+ PetscErrorCode PetscThreadCommGetRank_OpenMP(PetscInt *trank)
+ {
diff --git a/gnu/packages/patches/pybugz-encode-error.patch b/gnu/packages/patches/pybugz-encode-error.patch
new file mode 100644
index 0000000000..ab78bf84b3
--- /dev/null
+++ b/gnu/packages/patches/pybugz-encode-error.patch
@@ -0,0 +1,17 @@
+In case of 'AttributeError', 'value' is None, so do not try to
+access it.
+Submitted upstream.
+
+--- pybugz-0.6.11/bugz.py 2006-09-02 14:35:37.000000000 +0200
++++ pybugz-0.6.11/bugz.py 2014-05-05 16:02:20.000000000 +0200
+@@ -1249,9 +1254,9 @@ class PrettyBugz(Bugz):
+ for field, name in FIELDS + MORE_FIELDS:
+ try:
+ value = result.find('//%s' % field).text
++ print '%-12s: %s' % (name, value.encode(self.enc))
+ except AttributeError:
+ continue
+- print '%-12s: %s' % (name, value.encode(self.enc))
+
+ # Print out the cc'ed people
+ cced = result.findall('.//cc')
diff --git a/gnu/packages/patches/pybugz-stty.patch b/gnu/packages/patches/pybugz-stty.patch
new file mode 100644
index 0000000000..4453e9d027
--- /dev/null
+++ b/gnu/packages/patches/pybugz-stty.patch
@@ -0,0 +1,19 @@
+Gracefully deal with 'stty size' failures.
+Submitted upstream.
+
+--- pybugz-0.6.11/bugz.py 2006-09-02 14:35:37.000000000 +0200
++++ pybugz-0.6.11/bugz.py 2014-05-05 15:17:03.000000000 +0200
+@@ -288,7 +288,12 @@ def get_cols():
+ stty = which('stty')
+ if stty:
+ row_cols = commands.getoutput("%s size" % stty)
+- rows, cols = map(int, row_cols.split())
++ try:
++ rows, cols = map(int, row_cols.split())
++ except:
++ # In some cases 'stty size' will just fail with
++ # "Inappropriate ioctl for device".
++ cols = DEFAULT_NUM_COLS
+ return cols
+ else:
+ return DEFAULT_NUM_COLS
diff --git a/gnu/packages/patches/scotch-test-threading.patch b/gnu/packages/patches/scotch-test-threading.patch
new file mode 100644
index 0000000000..2527a6e6dd
--- /dev/null
+++ b/gnu/packages/patches/scotch-test-threading.patch
@@ -0,0 +1,139 @@
+* These tests assume threading support, even when the library is compiled
+ without it. Protect these checks.
+
+* Tests should not require keyboard interaction.
+
+--- a/src/check/test_scotch_dgraph_band.c 2012-09-27 10:46:42.000000000 -0500
++++ b/src/check/test_scotch_dgraph_band.c 2014-05-13 14:36:07.479270243 -0500
+@@ -99,10 +99,12 @@
+ errorPrint ("main: Cannot initialize (1)");
+ exit (1);
+ }
++#ifdef SCOTCH_PTHREAD
+ if (thrdlvlreqval > thrdlvlproval) {
+ errorPrint ("main: Cannot initialize (2)");
+ exit (1);
+ }
++#endif
+
+ if (argc != 2) {
+ errorPrint ("main: invalid number of parameters");
+@@ -115,12 +117,14 @@
+
+ fprintf (stderr, "Proc %2d of %2d, pid %d\n", proclocnum, procglbnbr, getpid ());
+
++#ifdef SCOTCH_DEBUG_CHECK2
+ if (proclocnum == 0) { /* Synchronize on keybord input */
+ char c;
+
+ printf ("Waiting for key press...\n");
+ scanf ("%c", &c);
+ }
++#endif /* SCOTCH_DEBUG_CHECK2 */
+
+ if (MPI_Barrier (proccomm) != MPI_SUCCESS) { /* Synchronize for debug */
+ errorPrint ("main: cannot communicate");
+--- a/src/check/test_scotch_dgraph_grow.c 2012-11-30 12:19:33.000000000 -0600
++++ b/src/check/test_scotch_dgraph_grow.c 2014-05-13 14:35:31.307269303 -0500
+@@ -103,10 +103,12 @@
+ errorPrint ("main: Cannot initialize (1)");
+ exit (1);
+ }
++#ifdef SCOTCH_PTHREAD
+ if (thrdlvlreqval > thrdlvlproval) {
+ errorPrint ("main: Cannot initialize (2)");
+ exit (1);
+ }
++#endif
+
+ if (argc != 2) {
+ errorPrint ("main: invalid number of parameters");
+@@ -119,12 +121,14 @@
+
+ fprintf (stderr, "Proc %2d of %2d, pid %d\n", proclocnum, procglbnbr, getpid ());
+
++#ifdef SCOTCH_DEBUG_CHECK2
+ if (proclocnum == 0) { /* Synchronize on keybord input */
+ char c;
+
+ printf ("Waiting for key press...\n");
+ scanf ("%c", &c);
+ }
++#endif /* SCOTCH_DEBUG_CHECK2 */
+
+ if (MPI_Barrier (proccomm) != MPI_SUCCESS) { /* Synchronize for debug */
+ errorPrint ("main: cannot communicate");
+--- a/src/check/test_scotch_dgraph_redist.c 2012-09-26 11:42:27.000000000 -0500
++++ b/src/check/test_scotch_dgraph_redist.c 2014-05-13 14:34:30.323267722 -0500
+@@ -98,10 +98,12 @@
+ errorPrint ("main: Cannot initialize (1)");
+ exit (1);
+ }
++#ifdef SCOTCH_PTHREAD
+ if (thrdlvlreqval > thrdlvlproval) {
+ errorPrint ("main: Cannot initialize (2)");
+ exit (1);
+ }
++#endif
+
+ if (argc != 2) {
+ errorPrint ("main: invalid number of parameters");
+@@ -114,7 +116,6 @@
+
+ fprintf (stderr, "Proc %2d of %2d, pid %d\n", proclocnum, procglbnbr, getpid ());
+
+-#define SCOTCH_DEBUG_CHECK2
+ #ifdef SCOTCH_DEBUG_CHECK2
+ if (proclocnum == 0) { /* Synchronize on keybord input */
+ char c;
+--- /tmp/nix-build-scotch-6.0.0.drv-9/scotch_6.0.0/src/check/test_common_thread.c 2012-11-30 11:05:23.000000000 -0600
++++ scotch_6.0.0/src/check/test_common_thread.c 2014-05-13 17:26:27.159535244 -0500
+@@ -90,7 +90,7 @@
+ /* */
+ /*************************/
+
+-#if ((defined COMMON_PTHREAD) || (defined SCOTCH_PTHREAD))
++#ifdef SCOTCH_PTHREAD
+
+ static
+ void
+@@ -161,7 +161,7 @@
+ return (o);
+ }
+
+-#endif /* ((defined COMMON_PTHREAD) || (defined SCOTCH_PTHREAD)) */
++#endif /* SCOTCH_PTHREAD */
+
+ /*********************/
+ /* */
+@@ -175,14 +175,14 @@
+ char * argv[])
+ {
+ TestThreadGroup groudat;
+-#if ((defined COMMON_PTHREAD) || (defined SCOTCH_PTHREAD))
++#ifdef SCOTCH_PTHREAD
+ TestThread * restrict thrdtab;
+ int thrdnbr;
+-#endif /* ((defined COMMON_PTHREAD) || (defined SCOTCH_PTHREAD)) */
++#endif /* SCOTCH_PTHREAD */
+
+ SCOTCH_errorProg (argv[0]);
+
+-#if ((defined COMMON_PTHREAD) || (defined SCOTCH_PTHREAD))
++#ifdef SCOTCH_PTHREAD
+ thrdnbr = SCOTCH_PTHREAD_NUMBER;
+
+ groudat.redusum = COMPVAL (thrdnbr);
+@@ -197,9 +197,9 @@
+ errorPrint ("main: cannot launch or run threads");
+ return (1);
+ }
+-#else /* ((defined COMMON_PTHREAD) || (defined SCOTCH_PTHREAD)) */
+- printf ("Scotch not compiled with either COMMON_PTHREAD or SCOTCH_PTHREAD\n");
+-#endif /* ((defined COMMON_PTHREAD) || (defined SCOTCH_PTHREAD)) */
++#else /* not SCOTCH_PTHREAD */
++ printf ("Scotch not compiled with SCOTCH_PTHREAD\n");
++#endif /* not SCOTCH_PTHREAD */
+
+ return (0);
+ }
diff --git a/gnu/packages/patches/soprano-find-clucene.patch b/gnu/packages/patches/soprano-find-clucene.patch
new file mode 100644
index 0000000000..cc2707853a
--- /dev/null
+++ b/gnu/packages/patches/soprano-find-clucene.patch
@@ -0,0 +1,15 @@
+Search for clucene include file in the clucene include directory.
+
+diff -u -r soprano-2.9.4.orig/cmake/modules/FindCLucene.cmake soprano-2.9.4/cmake/modules/FindCLucene.cmake
+--- soprano-2.9.4.orig/cmake/modules/FindCLucene.cmake 2013-10-09 19:22:28.000000000 +0200
++++ soprano-2.9.4/cmake/modules/FindCLucene.cmake 2014-04-28 20:08:11.000000000 +0200
+@@ -77,7 +77,8 @@
+
+ get_filename_component(TRIAL_LIBRARY_DIR ${CLUCENE_LIBRARY} PATH)
+ find_path(CLUCENE_LIBRARY_DIR
+- NAMES CLucene/clucene-config.h PATHS ${TRIAL_LIBRARY_DIR} ${TRIAL_LIBRARY_PATHS} ${TRIAL_INCLUDE_PATHS} NO_DEFAULT_PATH)
++ NAMES CLucene/clucene-config.h PATHS ${TRIAL_LIBRARY_DIR} ${TRIAL_LIBRARY_PATHS} ${TRIAL_INCLUDE_PATHS} ${CLUCENE_INCLUDE_DIR} NO_DEFAULT_PATH)
++message (STATUS "XXX ${CLUCENE_LIBRARY_DIR}")
+ if(CLUCENE_LIBRARY_DIR)
+ message(STATUS "Found CLucene library dir: ${CLUCENE_LIBRARY_DIR}")
+ file(READ ${CLUCENE_LIBRARY_DIR}/CLucene/clucene-config.h CLCONTENT)
diff --git a/gnu/packages/patches/superlu-dist-scotchmetis.patch b/gnu/packages/patches/superlu-dist-scotchmetis.patch
new file mode 100644
index 0000000000..3d78380551
--- /dev/null
+++ b/gnu/packages/patches/superlu-dist-scotchmetis.patch
@@ -0,0 +1,21 @@
+The METIS interface from Scotch may segfault if passed NULL to indicate a
+default parameter, so use the older calling style.
+
+--- a/SRC/get_perm_c.c 2014-05-16 23:38:30.070835316 -0500
++++ b/SRC/get_perm_c.c 2014-05-16 23:39:04.582836211 -0500
+@@ -70,11 +70,13 @@
+ #else
+
+ /* Earlier version 3.x.x */
+- /* METIS_NodeND(&nm, b_colptr, b_rowind, &numflag, metis_options,
+- perm, iperm);*/
++ METIS_NodeND(&nm, b_colptr, b_rowind, &numflag, metis_options,
++ perm, iperm);
+
+ /* Latest version 4.x.x */
++#if 0
+ METIS_NodeND(&nm, b_colptr, b_rowind, NULL, NULL, perm, iperm);
++#endif
+
+ /*check_perm_dist("metis perm", n, perm);*/
+ #endif
diff --git a/gnu/packages/pciutils.scm b/gnu/packages/pciutils.scm
new file mode 100644
index 0000000000..2b887f16d8
--- /dev/null
+++ b/gnu/packages/pciutils.scm
@@ -0,0 +1,91 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2014 Ludovic Courtès <ludo@gnu.org>
+;;;
+;;; 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 <http://www.gnu.org/licenses/>.
+
+(define-module (gnu packages pciutils)
+ #:use-module (guix packages)
+ #:use-module (guix download)
+ #:use-module ((guix licenses)
+ #:renamer (symbol-prefix-proc 'license:))
+ #:use-module (guix build-system gnu)
+ #:use-module (gnu packages compression)
+ #:use-module (gnu packages pkg-config)
+ #:use-module (gnu packages which))
+
+(define-public pciutils
+ (package
+ (name "pciutils")
+ (version "3.2.0")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append
+ "mirror://kernel.org/software/utils/pciutils/pciutils-"
+ version
+ ".tar.bz2"))
+ (sha256
+ (base32
+ "0d9as9jzjjg5c1nwf58z1y1i7rf9fqxmww1civckhcvcn0xr85mq"))))
+ (build-system gnu-build-system)
+ (arguments
+ '(#:phases (alist-replace
+ 'configure
+ (lambda* (#:key outputs #:allow-other-keys)
+ ;; There's no 'configure' script, just a raw makefile.
+ (substitute* "Makefile"
+ (("^PREFIX=.*$")
+ (string-append "PREFIX := " (assoc-ref outputs "out")
+ "\n"))
+ (("^MANDIR:=.*$")
+ ;; By default the thing tries to automatically
+ ;; determine whether to use $prefix/man or
+ ;; $prefix/share/man, and wrongly so.
+ (string-append "MANDIR := " (assoc-ref outputs "out")
+ "/share/man\n"))
+ (("^SHARED=.*$")
+ ;; Build libpciutils.so.
+ "SHARED := yes\n")
+ (("^ZLIB=.*$")
+ ;; Ask for zlib support.
+ "ZLIB := yes\n")))
+
+ (alist-replace
+ 'install
+ (lambda* (#:key outputs #:allow-other-keys)
+ ;; Install the commands, library, and .pc files.
+ (zero? (system* "make" "install" "install-lib")))
+ %standard-phases))
+
+ ;; Make sure programs have an RPATH so they can find libpciutils.so.
+ #:make-flags (list (string-append "LDFLAGS=-Wl,-rpath="
+ (assoc-ref %outputs "out") "/lib"))
+
+ ;; No test suite.
+ #:tests? #f))
+ (native-inputs
+ `(("which" ,which)
+ ("pkg-config" ,pkg-config)))
+ (inputs
+ ;; TODO: Add dependency on Linux libkmod.
+ `(("zlib" ,zlib)))
+ (home-page "http://mj.ucw.cz/sw/pciutils/")
+ (synopsis "Programs for inspecting and manipulating PCI devices")
+ (description
+ "The PCI Utilities are a collection of programs for inspecting and
+manipulating configuration of PCI devices, all based on a common portable
+library libpci which offers access to the PCI configuration space on a variety
+of operating systems. This includes the 'lspci' and 'setpci' commands.")
+ (license license:gpl2+)))
diff --git a/gnu/packages/perl.scm b/gnu/packages/perl.scm
index 6279120107..48b543436e 100644
--- a/gnu/packages/perl.scm
+++ b/gnu/packages/perl.scm
@@ -106,14 +106,14 @@ matching a regular expression.")
(define-public perl-io-tty
(package
(name "perl-io-tty")
- (version "1.10")
+ (version "1.11")
(source (origin
(method url-fetch)
(uri (string-append "mirror://cpan/authors/id/T/TO/TODDR/IO-Tty-"
version ".tar.gz"))
(sha256
(base32
- "1cgqyv1zg8857inlnfczrrgpqr0r6mmqv29b7jlmxv47s4df59ii"))))
+ "0lgd9xcbi4gf4gw1ka6fj94my3w1f3k1zamb4pfln0qxz45zlxx4"))))
(build-system perl-build-system)
(home-page "http://search.cpan.org/~toddr/IO-Tty/")
(synopsis "Perl interface to pseudo ttys")
diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index 372f763ee5..b15e5b66d2 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -21,7 +21,7 @@
(define-module (gnu packages python)
#:use-module ((guix licenses)
- #:select (bsd-3 bsd-style psfl x11 x11-style
+ #:select (bsd-3 bsd-style expat psfl x11 x11-style
gpl2 gpl2+ lgpl2.1+))
#:use-module ((guix licenses) #:select (zlib)
#:renamer (symbol-prefix-proc 'license:))
@@ -293,6 +293,55 @@ etc. ")
(define-public python2-babel
(package-with-python2 python-babel))
+(define-public python-lockfile
+ (package
+ (name "python-lockfile")
+ (version "0.9.1")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "https://pypi.python.org/packages/source/l/lockfile/"
+ "lockfile-" version ".tar.gz"))
+ (sha256
+ (base32
+ "0iwif7i84gwpvrnpv4brshdk8j6l77smvknm8k3bg77mj6f5ini3"))))
+ (build-system python-build-system)
+ (arguments '(#:test-target "check"))
+ (home-page "http://code.google.com/p/pylockfile/")
+ (synopsis "Platform-independent file locking module")
+ (description
+ "The lockfile package exports a LockFile class which provides a simple
+API for locking files.")
+ (license expat)))
+
+(define-public python2-lockfile
+ (package-with-python2 python-lockfile))
+
+(define-public python-mock
+ (package
+ (name "python-mock")
+ (version "1.0.1")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "https://pypi.python.org/packages/source/m/mock/"
+ "mock-" version ".tar.gz"))
+ (sha256
+ (base32
+ "0kzlsbki6q0awf89rc287f3aj8x431lrajf160a70z0ikhnxsfdq"))))
+ (build-system python-build-system)
+ (arguments '(#:test-target "check"))
+ (home-page "http://code.google.com/m/mock/")
+ (synopsis "A Python Mocking and Patching Library for Testing")
+ (description
+ "Mock is a library for testing in Python. It allows you to replace parts
+of your system under test with mock objects and make assertions about how they
+have been used.")
+ (license expat)))
+
+(define-public python2-mock
+ (package-with-python2 python-mock))
+
(define-public python-setuptools
(package
@@ -578,7 +627,10 @@ commands.")
version ".tar.gz"))
(sha256
(base32
- "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))))
+ "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
+ (patches (map search-patch
+ (list "pybugz-stty.patch"
+ "pybugz-encode-error.patch")))))
(build-system python-build-system)
(arguments
`(#:python ,python-2 ; SyntaxError with Python 3
diff --git a/gnu/packages/qemu.scm b/gnu/packages/qemu.scm
index b02998392e..b4a962e888 100644
--- a/gnu/packages/qemu.scm
+++ b/gnu/packages/qemu.scm
@@ -44,14 +44,14 @@
;; This is QEMU without GUI support.
(package
(name "qemu-headless")
- (version "1.7.1")
+ (version "2.0.0")
(source (origin
(method url-fetch)
(uri (string-append "http://wiki.qemu-project.org/download/qemu-"
version ".tar.bz2"))
(sha256
(base32
- "1x5y06zhp0gc97g1sb98vf7dkawg63xywv0mbnpfnbi20jh452fn"))))
+ "0frsahiw56jr4cqr9m6s383lyj4ar9hfs2wp3y4yr76krah1mk30"))))
(build-system gnu-build-system)
(arguments
'(#:phases (alist-replace
diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm
index a47dcac50f..de8dbdea48 100644
--- a/gnu/packages/qt.scm
+++ b/gnu/packages/qt.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2013 Andreas Enge <andreas@enge.fr>
+;;; Copyright © 2013, 2014 Andreas Enge <andreas@enge.fr>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -150,7 +150,7 @@ developers using C++ or QML, a CSS & JavaScript like language.")
(define-public qt-4
(package (inherit qt)
- (version "4.8.5")
+ (version "4.8.6")
(source (origin
(method url-fetch)
(uri (string-append "http://download.qt-project.org/official_releases/qt/"
@@ -160,10 +160,11 @@ developers using C++ or QML, a CSS & JavaScript like language.")
version ".tar.gz"))
(sha256
(base32
- "0f51dbgn1dcck8pqimls2qyf1pfmsmyknh767cvw87c3d218ywpb"))
+ "0b036iqgmbbv37dgwwfihw3mihjbnw3kb5kaisdy0qi8nn8xs54b"))
(patches (list (search-patch "qt4-tests.patch")))))
(inputs `(,@(alist-delete "libjpeg" (package-inputs qt))
- ("libjepg" ,libjpeg-8)))
+ ("libjepg" ,libjpeg-8)
+ ("libsm" ,libsm)))
(arguments
`(#:phases
(alist-replace
diff --git a/gnu/packages/rdf.scm b/gnu/packages/rdf.scm
index 22cfc2e257..7634e48018 100644
--- a/gnu/packages/rdf.scm
+++ b/gnu/packages/rdf.scm
@@ -17,13 +17,22 @@
;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
(define-module (gnu packages rdf)
- #:use-module ((guix licenses) #:select (lgpl2.0+ lgpl2.1+))
+ #:use-module ((guix licenses) #:select (lgpl2.0+ lgpl2.1 lgpl2.1+))
#:use-module (guix packages)
#:use-module (guix download)
#:use-module (guix build-system cmake)
#:use-module (guix build-system gnu)
+ #:use-module (gnu packages)
+ #:use-module (gnu packages bdb)
+ #:use-module (gnu packages boost)
#:use-module (gnu packages compression)
#:use-module (gnu packages curl)
+ #:use-module (gnu packages doxygen)
+ #:use-module (gnu packages gnupg)
+ #:use-module (gnu packages linux)
+ #:use-module (gnu packages multiprecision)
+ #:use-module (gnu packages pcre)
+ #:use-module (gnu packages perl)
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages qt)
#:use-module (gnu packages xml))
@@ -60,15 +69,107 @@ Turtle 2013, N-Quads, N-Triples 1.1, Atom 1.0, RSS 1.0, GraphViz DOT,
HTML and JSON.")
(license lgpl2.1+))) ; or any choice of gpl2+ or asl2.0
+(define-public clucene
+ (package
+ (name "clucene")
+ (version "2.3.3.4")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "mirror://sourceforge/clucene/"
+ "clucene-core-unstable/2.3/clucene-core-"
+ version ".tar.gz"))
+ (sha256
+ (base32
+ "1arffdwivig88kkx685pldr784njm0249k0rb1f1plwavlrw9zfx"))
+ (patches (list (search-patch "clucene-pkgconfig.patch")))))
+ (build-system cmake-build-system)
+ (inputs
+ `(("boost" ,boost) ; could also use bundled copy
+ ("zlib" ,zlib)))
+ (arguments
+ `(#:test-target "cl_test"
+ #:tests? #f)) ; Tests do not compile, as TestIndexSearcher.cpp uses
+ ; undeclared usleep. After fixing this, one needs to run
+ ; "make test" in addition to "make cl_test", then
+ ; SimpleTest fails.
+ ; Notice that the library appears to be unmaintained
+ ; with no reaction to bug reports.
+ (home-page "http://clucene.sourceforge.net/")
+ (synopsis "C text indexing and searching library")
+ (description "CLucene is a high-performance, scalable, cross platform,
+full-featured indexing and searching API. It is a port of the very popular
+Java Lucene text search engine API to C++.")
+ (license lgpl2.1)))
+
+(define-public rasqal
+ (package
+ (name "rasqal")
+ (version "0.9.32")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "http://download.librdf.org/source/" name
+ "-" version ".tar.gz"))
+ (sha256
+ (base32
+ "13rfprkk7d74065c7bafyshajwa6lshj7m9l741zlz9viqhh7fpf"))))
+ (build-system gnu-build-system)
+ (native-inputs
+ `(("perl" ,perl)
+ ("perl-xml-dom" ,perl-xml-dom) ; for the tests
+ ("pkg-config" ,pkg-config)))
+ (inputs
+ `(("libgcrypt" ,libgcrypt)
+ ("libxml2" ,libxml2)
+ ("mpfr" ,mpfr)
+ ("pcre" ,pcre)
+ ("util-linux" ,util-linux)))
+ (propagated-inputs
+ `(("raptor2" ,raptor2))) ; stipulated by rasqal.pc
+ (arguments
+ `(#:parallel-tests? #f
+ ; test failure reported upstream, see
+ ; http://bugs.librdf.org/mantis/view.php?id=571
+ #:tests? #f))
+ (home-page "http://librdf.org/rasqal/")
+ (synopsis "RDF query library")
+ (description "Rasqal is a C library that handles Resource Description
+Framework (RDF) query language syntaxes, query construction and execution
+of queries returning results as bindings, boolean, RDF graphs/triples or
+syntaxes. The supported query languages are SPARQL Query 1.0,
+SPARQL Query 1.1, SPARQL Update 1.1 (no executing) and the Experimental
+SPARQL extensions (LAQRS). Rasqal can write binding query results in the
+SPARQL XML, SPARQL JSON, CSV, TSV, HTML, ASCII tables, RDF/XML and
+Turtle/N3 and read them in SPARQL XML, RDF/XML and Turtle/N3.")
+ (license lgpl2.1+))) ; or any choice of gpl2+ or asl2.0
+
+(define-public redland
+ (package
+ (name "redland")
+ (version "1.0.17")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "http://download.librdf.org/source/" name
+ "-" version ".tar.gz"))
+ (sha256
+ (base32
+ "109n0kp39p966dpiasad2bb7q66rwbcb9avjvimw28chnpvlf66y"))))
+ (build-system gnu-build-system)
+ (native-inputs
+ `(("perl" ,perl) ; needed for installation
+ ("pkg-config" ,pkg-config)))
+ (inputs
+ `(("bdb" ,bdb)
+ ("rasqal" ,rasqal)))
+ (home-page "http://librdf.org/")
+ (synopsis "RDF library")
+ (description "The Redland RDF Library (librdf) provides the RDF API
+and triple stores.")
+ (license lgpl2.1+))) ; or any choice of gpl2+ or asl2.0
+
(define-public soprano
(package
(name "soprano")
- (version "2.9.3")
- ;; 2.9.4 requires clucene, see
- ;; http://www.mailinglistarchive.com/html/lfs-book@linuxfromscratch.org/2013-10/msg00285.html
- ;; The stable clucene-0.9.21b fails one of its tests;
- ;; in the unstable clucene-2.3.3.4 the binary cl_test is not found.
- ;; In any case, the library seems to be unmaintained.
+ (version "2.9.4")
(source (origin
(method url-fetch)
(uri (string-append "mirror://sourceforge/soprano/Soprano/"
@@ -76,14 +177,17 @@ HTML and JSON.")
"soprano-" version ".tar.bz2"))
(sha256
(base32
- "08gb5d8bgy7vc6qd6r1kkmmc5rli67dlglpjqjlahpnvs26r1cwl"))))
+ "1rg0x7yg0a1cbnxz7kqk52580wla8jbnj4d4r3j7l7g7ajyny1k4"))
+ (patches (list (search-patch "soprano-find-clucene.patch")))))
(build-system cmake-build-system)
- ;; FIXME: Add optional dependencies: Redland, odbci, clucene; doxygen
(native-inputs
- `(("pkg-config" ,pkg-config)))
+ `(("doxygen" ,doxygen)
+ ("pkg-config" ,pkg-config)))
(inputs
- `(("qt" ,qt-4)
- ("raptor2" ,raptor2)))
+ `(("clucene" ,clucene)
+ ("qt" ,qt-4)
+ ("rasqal" ,rasqal)
+ ("redland" ,redland)))
(home-page "http://soprano.sourceforge.net/")
(synopsis "RDF data library for Qt")
(description "Soprano (formerly known as QRDF) is a library which
diff --git a/gnu/packages/rsync.scm b/gnu/packages/rsync.scm
index c51d65c33e..9c1a7a3b34 100644
--- a/gnu/packages/rsync.scm
+++ b/gnu/packages/rsync.scm
@@ -20,6 +20,7 @@
#:use-module (gnu packages)
#:use-module (gnu packages perl)
#:use-module (gnu packages acl)
+ #:use-module (gnu packages which)
#:use-module (guix licenses)
#:use-module (guix packages)
#:use-module (guix download)
@@ -49,3 +50,29 @@ by sending only the differences between the source files and the existing
files in the destination.")
(license gpl3+)
(home-page "http://rsync.samba.org/")))
+
+(define-public librsync
+ (package
+ (name "librsync")
+ (version "0.9.7")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "mirror://sourceforge/librsync/librsync/"
+ version "/librsync-" version ".tar.gz"))
+ (sha256
+ (base32
+ "1mj1pj99mgf1a59q9f2mxjli2fzxpnf55233pc1klxk2arhf8cv6"))))
+ (build-system gnu-build-system)
+ (native-inputs
+ `(("which" ,which)
+ ("perl" ,perl)))
+ (arguments '(#:configure-flags '("--enable-shared")))
+ (home-page "http://librsync.sourceforge.net/")
+ (synopsis "Implementation of the rsync remote-delta algorithm")
+ (description
+ "Librsync is a free software library that implements the rsync
+remote-delta algorithm. This algorithm allows efficient remote updates of a
+file, without requiring the old and new versions to both be present at the
+sending end. The library uses a \"streaming\" design similar to that of zlib
+with the aim of allowing it to be embedded into many different applications.")
+ (license lgpl2.1+)))
diff --git a/gnu/packages/screen.scm b/gnu/packages/screen.scm
index 58ee42a2a2..ae03220cc3 100644
--- a/gnu/packages/screen.scm
+++ b/gnu/packages/screen.scm
@@ -29,13 +29,13 @@
(define-public screen
(package
(name "screen")
- (version "4.0.3")
+ (version "4.2.1")
(source (origin
(method url-fetch)
(uri (string-append "mirror://gnu/screen/screen-"
version ".tar.gz"))
(sha256
- (base32 "0xvckv1ia5pjxk7fs4za6gz2njwmfd54sc464n8ab13096qxbw3q"))))
+ (base32 "105hp6qdd8rl71p81klmxiz4mlb60kh9r7czayrx40g38x858s2l"))))
(build-system gnu-build-system)
(inputs
`(("ncurses", ncurses)
diff --git a/gnu/packages/sdl.scm b/gnu/packages/sdl.scm
index d86ecde38e..bbf8597c7a 100644
--- a/gnu/packages/sdl.scm
+++ b/gnu/packages/sdl.scm
@@ -147,12 +147,17 @@ other supporting functions for SDL.")
(base32
"16an9slbb8ci7d89wakkmyfvp7c0cval8xw4hkg0842nhhlp540b"))))
(build-system gnu-build-system)
+ (native-inputs `(("pkg-config" ,pkg-config)))
;; FIXME: Add webp
- (inputs `(("libpng" ,libpng)
- ("libjpeg" ,libjpeg)
- ("libtiff" ,libtiff)
- ("pkg-config" ,pkg-config)))
- (propagated-inputs `(("sdl" ,sdl)))
+ ;;
+ ;; libjpeg, libpng, and libtiff are propagated inputs because the
+ ;; SDL_image headers include the headers of these libraries. SDL is a
+ ;; propagated input because the pkg-config file refers to SDL's pkg-config
+ ;; file.
+ (propagated-inputs `(("sdl" ,sdl)
+ ("libjpeg" ,libjpeg)
+ ("libpng" ,libpng)
+ ("libtiff" ,libtiff)))
(synopsis "SDL image loading library")
(description "SDL_image is an image file loading library for SDL that
supports the following formats: BMP, GIF, JPEG, LBM, PCX, PNG, PNM, TGA, TIFF,
diff --git a/gnu/packages/slim.scm b/gnu/packages/slim.scm
index f25b070f3c..cea3748985 100644
--- a/gnu/packages/slim.scm
+++ b/gnu/packages/slim.scm
@@ -1,6 +1,7 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2013 Guy Grant <gzg@riseup.net>
;;; Copyright © 2014 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2014 Andreas Enge <andreas@enge.fr>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -75,15 +76,8 @@
;; "systemd". Strip that.
"")))
%standard-phases)
- #:configure-flags '("-DUSE_PAM=yes" "-DUSE_CONSOLEKIT=no"
-
- ;; Don't build libslim.so, because then the build
- ;; system is unable to set the right RUNPATH on the
- ;; 'slim' binary.
- "-DBUILD_SHARED_LIBS=OFF"
-
- ;; Leave a valid RUNPATH upon install.
- "-DCMAKE_SKIP_BUILD_RPATH=ON")
+ #:configure-flags '("-DUSE_PAM=yes"
+ "-DUSE_CONSOLEKIT=no")
#:tests? #f))
(home-page "http://slim.berlios.de/")
(synopsis "Desktop-independent graphcal login manager for X11")
diff --git a/gnu/packages/ssh.scm b/gnu/packages/ssh.scm
index 51e1990168..c8ed3be4a7 100644
--- a/gnu/packages/ssh.scm
+++ b/gnu/packages/ssh.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2013 Andreas Enge <andreas@enge.fr>
+;;; Copyright © 2013, 2014 Andreas Enge <andreas@enge.fr>
;;; Copyright © 2014 Mark H Weaver <mhw@netris.org>
;;;
;;; This file is part of GNU Guix.
@@ -53,39 +53,10 @@
"1jyaj9h1iglvn02hrvcchbx8ycjpj8b91h8mi459k7q5jp2xgd9b"))))
(build-system cmake-build-system)
(arguments
- '(#:configure-flags '("-DWITH_GCRYPT=ON"
-
- ;; Leave a valid RUNPATH upon install.
- "-DCMAKE_SKIP_BUILD_RPATH=ON")
+ '(#:configure-flags '("-DWITH_GCRYPT=ON")
;; TODO: Add 'CMockery' and '-DWITH_TESTING=ON' for the test suite.
- #:tests? #f
-
- #:modules ((guix build cmake-build-system)
- (guix build utils)
- (guix build rpath))
- #:imported-modules ((guix build gnu-build-system)
- (guix build cmake-build-system)
- (guix build utils)
- (guix build rpath))
-
- #:phases (alist-cons-after
- 'install 'augment-runpath
- (lambda* (#:key outputs #:allow-other-keys)
- ;; libssh_threads.so NEEDs libssh.so, so add $libdir to its
- ;; RUNPATH.
- (define (dereference file)
- (let ((target (false-if-exception (readlink file))))
- (if target
- (dereference target)
- file)))
-
- (let* ((out (assoc-ref outputs "out"))
- (lib (string-append out "/lib")))
- (with-directory-excursion lib
- (augment-rpath (dereference "libssh_threads.so")
- lib))))
- %standard-phases)))
+ #:tests? #f))
(inputs `(("zlib" ,zlib)
;; Link against an older gcrypt, because libssh tries to access
;; fields of 'gcry_thread_cbs' that are now private:
diff --git a/gnu/packages/tcl.scm b/gnu/packages/tcl.scm
index eb4c227049..4859c2be72 100644
--- a/gnu/packages/tcl.scm
+++ b/gnu/packages/tcl.scm
@@ -23,6 +23,7 @@
#:use-module (guix download)
#:use-module (guix build-system gnu)
#:use-module (guix build-system perl)
+ #:use-module (gnu packages)
#:use-module (gnu packages libpng)
#:use-module (gnu packages libjpeg)
#:use-module (gnu packages perl)
@@ -177,7 +178,8 @@ X11 GUIs.")
version ".tar.gz"))
(sha256
(base32
- "0jarvplhfvnm0shhdm2a5zczlnk9mkf8jvfjiwyhjrr3cy1gl0w0"))))
+ "0jarvplhfvnm0shhdm2a5zczlnk9mkf8jvfjiwyhjrr3cy1gl0w0"))
+ (patches (list (search-patch "perl-tk-x11-discover.patch")))))
(build-system perl-build-system)
(native-inputs `(("pkg-config" ,pkg-config)))
(inputs `(("libx11" ,libx11)
diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm
index f63df4a2ff..ed7d6f61ad 100644
--- a/gnu/packages/version-control.scm
+++ b/gnu/packages/version-control.scm
@@ -21,7 +21,8 @@
;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
(define-module (gnu packages version-control)
- #:use-module ((guix licenses) #:select (asl2.0 gpl1+ gpl2 gpl2+ gpl3+))
+ #:use-module ((guix licenses)
+ #:select (asl2.0 gpl1+ gpl2 gpl2+ gpl3+ x11-style))
#:use-module (guix packages)
#:use-module (guix download)
#:use-module (guix build-system gnu)
@@ -413,3 +414,24 @@ when a file change has been described in the ChangeLog but the file has not
been added to the VC. vc-chlog scans changed files and generates
standards-compliant ChangeLog entries based on the changes that it detects.")
(license gpl3+)))
+
+(define-public diffstat
+ (package
+ (name "diffstat")
+ (version "1.58")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append
+ "ftp://invisible-island.net/diffstat/diffstat-"
+ version ".tgz"))
+ (sha256
+ (base32
+ "14rpf5c05ff30f6vn6pn6pzy0k4g4is5im656ahsxff3k58i7mgs"))))
+ (build-system gnu-build-system)
+ (home-page "http://invisible-island.net/diffstat/")
+ (synopsis "Make histograms from the output of 'diff'")
+ (description
+ "diffstat reads the output of 'diff' and displays a histogram of the
+insertions, deletions, and modifications per-file. It is useful for reviewing
+large, complex patch files.")
+ (license (x11-style "file://COPYING"))))
diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm
index 7c3bf6b777..a824d5c5f7 100644
--- a/gnu/packages/video.scm
+++ b/gnu/packages/video.scm
@@ -17,19 +17,37 @@
;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
(define-module (gnu packages video)
- #:use-module ((guix licenses) #:select (gpl2+))
+ #:use-module ((guix licenses) #:select (gpl2 gpl2+))
#:use-module (guix packages)
#:use-module (guix download)
#:use-module (guix build-system gnu)
#:use-module (gnu packages algebra)
+ #:use-module (gnu packages avahi)
+ #:use-module (gnu packages cdrom)
#:use-module (gnu packages compression)
#:use-module (gnu packages elf)
#:use-module (gnu packages fontutils)
+ #:use-module (gnu packages gl)
+ #:use-module (gnu packages glib)
+ #:use-module (gnu packages gnupg)
+ #:use-module (gnu packages gnutls)
+ #:use-module (gnu packages libjpeg)
+ #:use-module (gnu packages libpng)
+ #:use-module (gnu packages linux)
+ #:use-module (gnu packages lua)
+ #:use-module (gnu packages mp3)
#:use-module (gnu packages openssl)
#:use-module (gnu packages perl)
#:use-module (gnu packages pkg-config)
+ #:use-module (gnu packages pulseaudio)
#:use-module (gnu packages python)
+ #:use-module (gnu packages qt)
+ #:use-module (gnu packages sdl)
+ #:use-module (gnu packages ssh)
+ #:use-module (gnu packages version-control)
#:use-module (gnu packages xiph)
+ #:use-module (gnu packages xml)
+ #:use-module (gnu packages xorg)
#:use-module (gnu packages yasm))
(define-public ffmpeg
@@ -192,3 +210,161 @@
convert and stream audio and video. It includes the libavcodec
audio/video codec library.")
(license gpl2+)))
+
+(define-public vlc
+ (package
+ (name "vlc")
+ (version "2.1.4")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append
+ "http://download.videolan.org/pub/videolan/vlc/"
+ version "/vlc-" version ".tar.xz"))
+ (sha256
+ (base32
+ "1lymhbb2bns73qivdaqanhggjjhyc9fwfgf5ikhng0a74msnqmiy"))))
+ (build-system gnu-build-system)
+ (native-inputs
+ `(("git" ,git) ; needed for a test
+ ("pkg-config" ,pkg-config)))
+ ;; FIXME: Add optional inputs once available.
+ (inputs
+ `(("alsa-lib" ,alsa-lib)
+ ("avahi" ,avahi)
+ ("dbus" ,dbus)
+ ("flac" ,flac)
+ ("ffmpeg" ,ffmpeg)
+ ("fontconfig" ,fontconfig)
+ ("freetype" ,freetype)
+ ("gnutls" ,gnutls)
+ ("libcddb" ,libcddb)
+ ("libgcrypt" ,libgcrypt)
+ ("libkate" ,libkate)
+ ("libmad" ,libmad)
+ ("libogg" ,libogg)
+ ("libpng" ,libpng)
+ ("libsamplerate" ,libsamplerate)
+ ("libssh2" ,libssh2)
+ ("libvorbis" ,libvorbis)
+ ("libtheora" ,libtheora)
+ ("libxext" ,libxext)
+ ("libxinerama" ,libxinerama)
+ ("libxml2" ,libxml2)
+ ("libxpm" ,libxpm)
+ ("lua" ,lua-5.1)
+ ("mesa" ,mesa)
+ ("opus" ,opus)
+ ("perl" ,perl)
+ ("pulseaudio" ,pulseaudio)
+ ("python" ,python-wrapper)
+ ("qt" ,qt-4)
+ ("sdl" ,sdl)
+ ("sdl-image" ,sdl-image)
+ ("speex" ,speex)
+ ("xcb-util-keysyms" ,xcb-util-keysyms)))
+ (arguments
+ `(#:configure-flags
+ `("--disable-a52" ; FIXME: reenable once available
+ "--disable-mmx" ; FIXME: may be enabled on x86_64
+ "--disable-sse" ; 1-4, no separate options available
+ "--disable-neon"
+ "--disable-altivec"
+ ,(string-append "LDFLAGS=-Wl,-rpath -Wl,"
+ (assoc-ref %build-inputs "ffmpeg")
+ "/lib")))) ; needed for the tests
+ (home-page "https://www.videolan.org/")
+ (synopsis "Audio and video framework")
+ (description "VLC is a cross-platform multimedia player and framework
+that plays most multimedia files as well as DVD, Audio CD, VCD, and various
+treaming protocols.")
+ (license gpl2+)))
+
+(define-public mplayer
+ (package
+ (name "mplayer")
+ (version "1.1.1")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append
+ "http://www.mplayerhq.hu/MPlayer/releases/MPlayer-"
+ version ".tar.xz"))
+ (sha256
+ (base32
+ "0xlcg7rszrwmw29wqr0plsw5d1rq0hb7vjsq7bmmfsly2z1wg3yf"))))
+ (build-system gnu-build-system)
+ ;; FIXME: Add additional inputs once available.
+ (native-inputs
+ `(("pkg-config" ,pkg-config)))
+ (inputs
+ `(("alsa-lib" ,alsa-lib)
+ ("cdparanoia" ,cdparanoia)
+ ("fontconfig" ,fontconfig)
+ ("freetype" ,freetype)
+ ("lame" ,lame)
+ ("libmpg123" ,mpg123) ; audio codec for MP3
+;; ("giflib" ,giflib) ; uses QuantizeBuffer, requires version >= 5
+ ("libjpeg" ,libjpeg)
+ ("libpng" ,libpng)
+ ("libtheora" ,libtheora)
+ ("libvorbis" ,libvorbis)
+ ("libx11" ,libx11)
+ ("libxxf86dga" ,libxxf86dga)
+ ("libxinerama" ,libxinerama)
+ ("libxv" ,libxv)
+ ("mesa" ,mesa)
+ ("perl" ,perl)
+ ("pulseaudio" ,pulseaudio)
+ ("python" ,python-wrapper)
+ ("sdl" ,sdl)
+ ("speex" ,speex)
+ ("yasm" ,yasm)
+ ("zlib" ,zlib)))
+ (arguments
+ `(#:tests? #f ; no test target
+ #:phases
+ (alist-replace
+ 'configure
+ ;; configure does not work followed by "SHELL=..." and
+ ;; "CONFIG_SHELL=..."; set environment variables instead
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (let ((out (assoc-ref outputs "out"))
+ (libx11 (assoc-ref inputs "libx11")))
+ (substitute* "configure"
+ (("#! /bin/sh") (string-append "#!" (which "bash"))))
+ (setenv "SHELL" (which "bash"))
+ (setenv "CONFIG_SHELL" (which "bash"))
+ (zero? (system*
+ "./configure"
+ (string-append "--extra-cflags=-I"
+ libx11 "/include") ; to detect libx11
+ "--disable-tremor-internal" ; forces external libvorbis
+ (string-append "--prefix=" out)
+ ;; drop special machine instructions not supported
+ ;; on all instances of the target
+ ,@(if (string-prefix? "x86_64"
+ (or (%current-target-system)
+ (%current-system)))
+ '()
+ '("--disable-3dnow"
+ "--disable-3dnowext"
+ "--disable-mmx"
+ "--disable-mmxext"
+ "--disable-sse"
+ "--disable-sse2"))
+ "--disable-ssse3"
+ "--disable-altivec"
+ "--disable-armv5te"
+ "--disable-armv6"
+ "--disable-armv6t2"
+ "--disable-armvfp"
+ "--disable-neon"
+ "--disable-thumb"
+ "--disable-iwmmxt"))))
+ %standard-phases)))
+ (home-page "http://www.mplayerhq.hu/design7/news.html")
+ (synopsis "Audio and video player")
+ (description "MPlayer is a movie player. It plays most MPEG/VOB, AVI,
+Ogg/OGM, VIVO, ASF/WMA/WMV, QT/MOV/MP4, RealMedia, Matroska, NUT,
+NuppelVideo, FLI, YUV4MPEG, FILM, RoQ, PVA files. One can watch VideoCD,
+SVCD, DVD, 3ivx, DivX 3/4/5, WMV and H.264 movies.")
+ (license gpl2)))
diff --git a/gnu/packages/wdiff.scm b/gnu/packages/wdiff.scm
index 774015ef90..06a44a9f40 100644
--- a/gnu/packages/wdiff.scm
+++ b/gnu/packages/wdiff.scm
@@ -28,7 +28,7 @@
(define-public wdiff
(package
(name "wdiff")
- (version "1.2.1")
+ (version "1.2.2")
(source
(origin
(method url-fetch)
@@ -36,7 +36,7 @@
version ".tar.gz"))
(sha256
(base32
- "1gb5hpiyikada9bwz63q3g96zs383iskiir0xsqynqnvq1vd4n41"))))
+ "0sxgg0ms5lhi4aqqvz1rj4s77yi9wymfm3l3gbjfd1qchy66kzrl"))))
(build-system gnu-build-system)
(arguments
`(#:phases (alist-cons-before
diff --git a/gnu/packages/xiph.scm b/gnu/packages/xiph.scm
index 2de9074f28..66c6c1373d 100644
--- a/gnu/packages/xiph.scm
+++ b/gnu/packages/xiph.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2013 Andreas Enge <andreas@enge.fr>
+;;; Copyright © 2013, 2014 Andreas Enge <andreas@enge.fr>
;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org>
;;; Copyright © 2013 David Thompson <dthompson2@worcester.edu>
;;; Copyright © 2014 Sree Harsha Totakura <sreeharsha@totakura.in>
@@ -25,6 +25,7 @@
#:use-module (gnu packages bison)
#:use-module (gnu packages compression)
#:use-module (gnu packages curl)
+ #:use-module (gnu packages doxygen)
#:use-module (gnu packages libpng)
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages python)
@@ -231,12 +232,13 @@ meaning that audio is compressed in FLAC without any loss in quality.")
(base32
"0s3vr2nxfxlf1k75iqpp4l78yf4gil3f0v778kvlngbchvaq23n4"))))
(build-system gnu-build-system)
- ;; FIXME: Add optional inputs doxygen (for documentation) and liboggz
+ (native-inputs `(("doxygen" ,doxygen)
+ ("pkg-config" ,pkg-config)))
+ ;; FIXME: Add optional input liboggz
(inputs `(("bison" ,bison)
("libogg" ,libogg)
("libpng" ,libpng)
- ("pkg-config" ,pkg-config)
- ("python" ,python-wrapper)
+("python" ,python-wrapper)
("zlib" ,zlib)))
(synopsis "kate, a karaoke and text codec for embedding in ogg")
(description
diff --git a/gnu/packages/xorg.scm b/gnu/packages/xorg.scm
index d72054a855..a480896083 100644
--- a/gnu/packages/xorg.scm
+++ b/gnu/packages/xorg.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2013 Andreas Enge <andreas@enge.fr>
+;;; Copyright © 2013, 2014 Andreas Enge <andreas@enge.fr>
;;; Copyright © 2014 Mark H Weaver <mhw@netris.org>
;;; Copyright © 2014 Eric Bavier <bavier@member.fsf.org>
;;;
@@ -1153,10 +1153,11 @@ tracking.")
(base32
"07bzi6xwlhq36f60qfspjbz0qjj7zcgayi1vp4ihgx34kib1vhck"))))
(build-system gnu-build-system)
+ (propagated-inputs
+ `(("libice" ,libice))) ; SMlib.h includes ICElib.h
(inputs
`(("xtrans" ,xtrans)
- ("util-linux" ,util-linux)
- ("libice" ,libice)))
+ ("util-linux" ,util-linux)))
(native-inputs
`(("pkg-config" ,pkg-config)))
(home-page "http://www.x.org/wiki/")
@@ -1427,10 +1428,11 @@ tracking.")
(base32
"15291ddhyr54sribwbg8hxx2psgzm5gh0pgkw5yrf3zgvdsa67sm"))))
(build-system gnu-build-system)
+ (propagated-inputs
+ `(("xf86dgaproto" ,xf86dgaproto)))
(inputs
`(("libx11" ,libx11)
- ("libxext" ,libxext)
- ("xf86dgaproto" ,xf86dgaproto)))
+ ("libxext" ,libxext)))
(native-inputs
`(("pkg-config" ,pkg-config)))
(home-page "http://www.x.org/wiki/")
@@ -4733,14 +4735,14 @@ icccm: Both client and window-manager helpers for ICCCM.")
(define-public xterm
(package
(name "xterm")
- (version "303")
+ (version "304")
(source (origin
(method url-fetch)
- (uri ; XXX: constant URL!
- "http://invisible-island.net/datafiles/release/xterm.tar.gz")
+ (uri (string-append "ftp://ftp.invisible-island.net/xterm/"
+ "xterm-" version ".tgz"))
(sha256
(base32
- "0n7hay16aam9kfn642ri0wj5yzilbjm3l8znxc2p5dx9pn3rkwla"))))
+ "19yp5phfzzgydc2yqka4p69ygvfzsd2aa98hbw086xyjlws3kbyk"))))
(build-system gnu-build-system)
(arguments
'(#:configure-flags '("--enable-wide-chars" "--enable-256-color"
diff --git a/gnu/services.scm b/gnu/services.scm
index eccde4e9a3..6bb21722b6 100644
--- a/gnu/services.scm
+++ b/gnu/services.scm
@@ -26,7 +26,7 @@
service-respawn?
service-start
service-stop
- service-inputs
+ service-activate
service-user-accounts
service-user-groups
service-pam-services))
@@ -47,16 +47,16 @@
(default '()))
(respawn? service-respawn? ; Boolean
(default #t))
- (start service-start) ; expression
- (stop service-stop ; expression
+ (start service-start) ; g-expression
+ (stop service-stop ; g-expression
(default #f))
- (inputs service-inputs ; list of inputs
- (default '()))
(user-accounts service-user-accounts ; list of <user-account>
(default '()))
(user-groups service-user-groups ; list of <user-groups>
(default '()))
(pam-services service-pam-services ; list of <pam-service>
- (default '())))
+ (default '()))
+ (activate service-activate ; gexp
+ (default #f)))
;;; services.scm ends here.
diff --git a/gnu/services/avahi.scm b/gnu/services/avahi.scm
new file mode 100644
index 0000000000..4b52fd7840
--- /dev/null
+++ b/gnu/services/avahi.scm
@@ -0,0 +1,108 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2014 Ludovic Courtès <ludo@gnu.org>
+;;;
+;;; 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 <http://www.gnu.org/licenses/>.
+
+(define-module (gnu services avahi)
+ #:use-module (gnu services)
+ #:use-module (gnu system shadow)
+ #:use-module (gnu packages avahi)
+ #:use-module (guix monads)
+ #:use-module (guix gexp)
+ #:export (avahi-service))
+
+;;; Commentary:
+;;;
+;;; This module provides service definitions for the Avahi
+;;; "zero-configuration" tool set.
+;;;
+;;; Code:
+
+(define* (configuration-file #:key host-name publish?
+ ipv4? ipv6? wide-area? domains-to-browse)
+ "Return an avahi-daemon configuration file."
+ (define (bool value)
+ (if value "yes\n" "no\n"))
+
+ (text-file "avahi-daemon.conf"
+ (string-append
+ "[server]\n"
+ (if host-name
+ (string-append "host-name=" host-name "\n")
+ "")
+
+ "browse-domains=" (string-join domains-to-browse)
+ "\n"
+ "use-ipv4=" (bool ipv4?)
+ "use-ipv6=" (bool ipv6?)
+ "[wide-area]\n"
+ "enable-wide-area=" (bool wide-area?)
+ "[publish]\n"
+ "disable-publishing=" (bool (not publish?)))))
+
+(define* (avahi-service #:key (avahi avahi)
+ host-name
+ (publish? #t)
+ (ipv4? #t) (ipv6? #t)
+ wide-area?
+ (domains-to-browse '()))
+ "Return a service that runs @command{avahi-daemon}, a system-wide
+mDNS/DNS-SD responder that allows for service discovery and
+\"zero-configuration\" host name lookups.
+
+If @var{host-name} is different from @code{#f}, use that as the host name to
+publish for this machine; otherwise, use the machine's actual host name.
+
+When @var{publish?} is true, publishing of host names and services is allowed;
+in particular, avahi-daemon will publish the machine's host name and IP
+address via mDNS on the local network.
+
+When @var{wide-area?} is true, DNS-SD over unicast DNS is enabled.
+
+Boolean values @var{ipv4?} and @var{ipv6?} determine whether to use IPv4/IPv6
+sockets."
+ (mlet %store-monad ((config (configuration-file #:host-name host-name
+ #:publish? publish?
+ #:ipv4? ipv4?
+ #:ipv6? ipv6?
+ #:wide-area? wide-area?
+ #:domains-to-browse
+ domains-to-browse)))
+ (return
+ (service
+ (documentation "Run the Avahi mDNS/DNS-SD responder.")
+ (provision '(avahi-daemon))
+ (requirement '(dbus-system networking))
+
+ (start #~(make-forkexec-constructor
+ (string-append #$avahi "/sbin/avahi-daemon")
+ "--syslog" "-f" #$config))
+ (stop #~(make-kill-destructor))
+ (activate #~(begin
+ (use-modules (guix build utils))
+ (mkdir-p "/var/run/avahi-daemon")))
+
+ (user-groups (list (user-group
+ (name "avahi"))))
+ (user-accounts (list (user-account
+ (name "avahi")
+ (group "avahi")
+ (comment "Avahi daemon user")
+ (home-directory "/var/empty")
+ (shell
+ "/run/current-system/profile/sbin/nologin"))))))))
+
+;;; avahi.scm ends here
diff --git a/gnu/services/base.scm b/gnu/services/base.scm
index d6c1707c6a..dc0161408b 100644
--- a/gnu/services/base.scm
+++ b/gnu/services/base.scm
@@ -24,11 +24,15 @@
#:use-module ((gnu packages base)
#:select (glibc-final))
#:use-module (gnu packages package-management)
+ #:use-module (guix gexp)
#:use-module (guix monads)
#:use-module (srfi srfi-1)
#:use-module (srfi srfi-26)
#:use-module (ice-9 format)
- #:export (host-name-service
+ #:export (root-file-system-service
+ file-system-service
+ user-processes-service
+ host-name-service
mingetty-service
nscd-service
syslog-service
@@ -42,14 +46,148 @@
;;;
;;; Code:
+(define (root-file-system-service)
+ "Return a service whose sole purpose is to re-mount read-only the root file
+system upon shutdown (aka. cleanly \"umounting\" root.)
+
+This service must be the root of the service dependency graph so that its
+'stop' action is invoked when dmd is the only process left."
+ (with-monad %store-monad
+ (return
+ (service
+ (documentation "Take care of the root file system.")
+ (provision '(root-file-system))
+ (start #~(const #t))
+ (stop #~(lambda _
+ ;; Return #f if successfully stopped.
+ (sync)
+
+ (call-with-blocked-asyncs
+ (lambda ()
+ (let ((null (%make-void-port "w")))
+ ;; Close 'dmd.log'.
+ (display "closing log\n")
+ ;; XXX: Ideally we'd use 'stop-logging', but that one
+ ;; doesn't actually close the port as of dmd 0.1.
+ (close-port (@@ (dmd comm) log-output-port))
+ (set! (@@ (dmd comm) log-output-port) null)
+
+ ;; Redirect the default output ports..
+ (set-current-output-port null)
+ (set-current-error-port null)
+
+ ;; Close /dev/console.
+ (for-each close-fdes '(0 1 2))
+
+ ;; At this point, there are no open files left, so the
+ ;; root file system can be re-mounted read-only.
+ (mount #f "/" #f
+ (logior MS_REMOUNT MS_RDONLY)
+ #:update-mtab? #f)
+
+ #f)))))
+ (respawn? #f)))))
+
+(define* (file-system-service device target type
+ #:key (check? #t) options)
+ "Return a service that mounts DEVICE on TARGET as a file system TYPE with
+OPTIONS. When CHECK? is true, check the file system before mounting it."
+ (with-monad %store-monad
+ (return
+ (service
+ (provision (list (symbol-append 'file-system- (string->symbol target))))
+ (requirement '(root-file-system))
+ (documentation "Check, mount, and unmount the given file system.")
+ (start #~(lambda args
+ #$(if check?
+ #~(check-file-system #$device #$type)
+ #~#t)
+ (mount #$device #$target #$type 0 #$options)
+ #t))
+ (stop #~(lambda args
+ ;; Normally there are no processes left at this point, so
+ ;; TARGET can be safely unmounted.
+ (umount #$target)
+ #f))))))
+
+(define %do-not-kill-file
+ ;; Name of the file listing PIDs of processes that must survive when halting
+ ;; the system. Typical example is user-space file systems.
+ "/etc/dmd/do-not-kill")
+
+(define* (user-processes-service requirements #:key (grace-delay 2))
+ "Return the service that is responsible for terminating all the processes so
+that the root file system can be re-mounted read-only, just before
+rebooting/halting. Processes still running GRACE-DELAY seconds after SIGTERM
+has been sent are terminated with SIGKILL.
+
+The returned service will depend on 'root-file-system' and on all the services
+listed in REQUIREMENTS.
+
+All the services that spawn processes must depend on this one so that they are
+stopped before 'kill' is called."
+ (with-monad %store-monad
+ (return (service
+ (documentation "When stopped, terminate all user processes.")
+ (provision '(user-processes))
+ (requirement (cons 'root-file-system requirements))
+ (start #~(const #t))
+ (stop #~(lambda _
+ (define (kill-except omit signal)
+ ;; Kill all the processes with SIGNAL except those
+ ;; listed in OMIT and the current process.
+ (let ((omit (cons (getpid) omit)))
+ (for-each (lambda (pid)
+ (unless (memv pid omit)
+ (false-if-exception
+ (kill pid signal))))
+ (processes))))
+
+ (define omitted-pids
+ ;; List of PIDs that must not be killed.
+ (if (file-exists? #$%do-not-kill-file)
+ (map string->number
+ (call-with-input-file #$%do-not-kill-file
+ (compose string-tokenize
+ (@ (ice-9 rdelim) read-string))))
+ '()))
+
+ ;; When this happens, all the processes have been
+ ;; killed, including 'deco', so DMD-OUTPUT-PORT and
+ ;; thus CURRENT-OUTPUT-PORT are dangling.
+ (call-with-output-file "/dev/console"
+ (lambda (port)
+ (display "sending all processes the TERM signal\n"
+ port)))
+
+ (if (null? omitted-pids)
+ (begin
+ ;; Easy: terminate all of them.
+ (kill -1 SIGTERM)
+ (sleep #$grace-delay)
+ (kill -1 SIGKILL))
+ (begin
+ ;; Kill them all except OMITTED-PIDS. XXX: We
+ ;; would like to (kill -1 SIGSTOP) to get a fixed
+ ;; list of processes, like 'killall5' does, but
+ ;; that seems unreliable.
+ (kill-except omitted-pids SIGTERM)
+ (sleep #$grace-delay)
+ (kill-except omitted-pids SIGKILL)
+ (delete-file #$%do-not-kill-file)))
+
+ (display "all processes have been terminated\n")
+ #f))
+ (respawn? #f)))))
+
(define (host-name-service name)
"Return a service that sets the host name to NAME."
(with-monad %store-monad
(return (service
(documentation "Initialize the machine's host name.")
(provision '(host-name))
- (start `(lambda _
- (sethostname ,name)))
+ (start #~(lambda _
+ (sethostname #$name)))
(respawn? #f)))))
(define* (mingetty-service tty
@@ -57,8 +195,7 @@
(motd (text-file "motd" "Welcome.\n"))
(allow-empty-passwords? #t))
"Return a service to run mingetty on TTY."
- (mlet %store-monad ((mingetty-bin (package-file mingetty "sbin/mingetty"))
- (motd motd))
+ (mlet %store-monad ((motd motd))
(return
(service
(documentation (string-append "Run mingetty on " tty "."))
@@ -66,12 +203,12 @@
;; Since the login prompt shows the host name, wait for the 'host-name'
;; service to be done.
- (requirement '(host-name))
+ (requirement '(user-processes host-name))
- (start `(make-forkexec-constructor ,mingetty-bin "--noclear" ,tty))
- (stop `(make-kill-destructor))
- (inputs `(("mingetty" ,mingetty)
- ("motd" ,motd)))
+ (start #~(make-forkexec-constructor
+ (string-append #$mingetty "/sbin/mingetty")
+ "--noclear" #$tty))
+ (stop #~(make-kill-destructor))
(pam-services
;; Let 'login' be known to PAM. All the mingetty services will have
@@ -83,16 +220,23 @@
(define* (nscd-service #:key (glibc glibc-final))
"Return a service that runs libc's name service cache daemon (nscd)."
- (mlet %store-monad ((nscd (package-file glibc "sbin/nscd")))
+ (with-monad %store-monad
(return (service
(documentation "Run libc's name service cache daemon (nscd).")
(provision '(nscd))
- (start `(make-forkexec-constructor ,nscd "-f" "/dev/null"
- "--foreground"))
- (stop `(make-kill-destructor))
+ (requirement '(user-processes))
- (respawn? #f)
- (inputs `(("glibc" ,glibc)))))))
+ (activate #~(begin
+ (use-modules (guix build utils))
+ (mkdir-p "/var/run/nscd")))
+
+ (start
+ #~(make-forkexec-constructor (string-append #$glibc "/sbin/nscd")
+ "-f" "/dev/null"
+ "--foreground"))
+ (stop #~(make-kill-destructor))
+
+ (respawn? #f)))))
(define (syslog-service)
"Return a service that runs 'syslogd' with reasonable default settings."
@@ -120,21 +264,22 @@
")
(mlet %store-monad
- ((syslog.conf (text-file "syslog.conf" contents))
- (syslogd (package-file inetutils "libexec/syslogd")))
+ ((syslog.conf (text-file "syslog.conf" contents)))
(return
(service
(documentation "Run the syslog daemon (syslogd).")
(provision '(syslogd))
- (start `(make-forkexec-constructor ,syslogd "--no-detach"
- "--rcfile" ,syslog.conf))
- (stop `(make-kill-destructor))
- (inputs `(("inetutils" ,inetutils)
- ("syslog.conf" ,syslog.conf)))))))
+ (requirement '(user-processes))
+ (start
+ #~(make-forkexec-constructor (string-append #$inetutils
+ "/libexec/syslogd")
+ "--no-detach"
+ "--rcfile" #$syslog.conf))
+ (stop #~(make-kill-destructor))))))
(define* (guix-build-accounts count #:key
+ (group "guixbuild")
(first-uid 30001)
- (gid 30000)
(shadow shadow))
"Return a list of COUNT user accounts for Guix build users, with UIDs
starting at FIRST-UID, and under GID."
@@ -143,34 +288,32 @@ starting at FIRST-UID, and under GID."
(lambda (n)
(user-account
(name (format #f "guixbuilder~2,'0d" n))
- (password "!")
(uid (+ first-uid n -1))
- (gid gid)
+ (group group)
(comment (format #f "Guix Build User ~2d" n))
(home-directory "/var/empty")
- (shell (package-file shadow "sbin/nologin"))
- (inputs `(("shadow" ,shadow)))))
+ (shell #~(string-append #$shadow "/sbin/nologin"))))
1+
1))))
(define* (guix-service #:key (guix guix) (builder-group "guixbuild")
- (build-user-gid 30000) (build-accounts 10))
+ (build-accounts 10))
"Return a service that runs the build daemon from GUIX, and has
BUILD-ACCOUNTS user accounts available under BUILD-USER-GID."
- (mlet %store-monad ((daemon (package-file guix "bin/guix-daemon"))
- (accounts (guix-build-accounts build-accounts
- #:gid build-user-gid)))
+ (mlet %store-monad ((accounts (guix-build-accounts build-accounts
+ #:group builder-group)))
(return (service
(provision '(guix-daemon))
- (start `(make-forkexec-constructor ,daemon
- "--build-users-group"
- ,builder-group))
- (stop `(make-kill-destructor))
- (inputs `(("guix" ,guix)))
+ (requirement '(user-processes))
+ (start
+ #~(make-forkexec-constructor (string-append #$guix
+ "/bin/guix-daemon")
+ "--build-users-group"
+ #$builder-group))
+ (stop #~(make-kill-destructor))
(user-accounts accounts)
(user-groups (list (user-group
(name builder-group)
- (id build-user-gid)
(members (map user-account-name
user-accounts)))))))))
diff --git a/gnu/services/dbus.scm b/gnu/services/dbus.scm
new file mode 100644
index 0000000000..3fbbfde09b
--- /dev/null
+++ b/gnu/services/dbus.scm
@@ -0,0 +1,120 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2014 Ludovic Courtès <ludo@gnu.org>
+;;;
+;;; 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 <http://www.gnu.org/licenses/>.
+
+(define-module (gnu services dbus)
+ #:use-module (gnu services)
+ #:use-module (gnu system shadow)
+ #:use-module (gnu packages glib)
+ #:use-module (guix monads)
+ #:use-module (guix gexp)
+ #:export (dbus-service))
+
+;;; Commentary:
+;;;
+;;; This module supports the configuration of the D-Bus message bus
+;;; (http://dbus.freedesktop.org/). D-Bus is an inter-process communication
+;;; facility. Its "system bus" is used to allow system services to
+;;; communicate and be notified of system-wide events.
+;;;
+;;; Code:
+
+(define (dbus-configuration-directory dbus services)
+ "Return a configuration directory for @var{dbus} that includes the
+@code{etc/dbus-1/system.d} directories of each package listed in
+@var{services}."
+ (define build
+ #~(begin
+ (use-modules (sxml simple))
+
+ (define (services->sxml services)
+ ;; Return the SXML 'includedir' clauses for DIRS.
+ `(busconfig
+ ,@(map (lambda (dir)
+ `(includedir ,(string-append dir
+ "/etc/dbus-1/system.d")))
+ services)))
+
+ (mkdir #$output)
+ (copy-file (string-append #$dbus "/etc/dbus-1/system.conf")
+ (string-append #$output "/system.conf"))
+
+ ;; The default 'system.conf' has an <includedir> clause for
+ ;; 'system.d', so create it.
+ (mkdir (string-append #$output "/system.d"))
+
+ ;; 'system-local.conf' is automatically included by the default
+ ;; 'system.conf', so this is where we stuff our own things.
+ (call-with-output-file (string-append #$output "/system-local.conf")
+ (lambda (port)
+ (sxml->xml (services->sxml (list #$@services))
+ port)))))
+
+ (gexp->derivation "dbus-configuration" build))
+
+(define* (dbus-service services #:key (dbus dbus))
+ "Return a service that runs the system bus, using @var{dbus}, with support
+for @var{services}.
+
+@var{services} must be a list of packages that provide an
+@file{etc/dbus-1/system.d} directory containing additional D-Bus configuration
+and policy files. For example, to allow avahi-daemon to use the system bus,
+@var{services} must be equal to @code{(list avahi)}."
+ (mlet %store-monad ((conf (dbus-configuration-directory dbus services)))
+ (return
+ (service
+ (documentation "Run the D-Bus system daemon.")
+ (provision '(dbus-system))
+ (requirement '(user-processes))
+ (start #~(make-forkexec-constructor
+ (string-append #$dbus "/bin/dbus-daemon")
+ "--nofork"
+ (string-append "--config-file=" #$conf "/system.conf")))
+ (stop #~(make-kill-destructor))
+ (user-groups (list (user-group
+ (name "messagebus"))))
+ (user-accounts (list (user-account
+ (name "messagebus")
+ (group "messagebus")
+ (comment "D-Bus system bus user")
+ (home-directory "/var/run/dbus")
+ (shell
+ "/run/current-system/profile/sbin/nologin"))))
+ (activate #~(begin
+ (use-modules (guix build utils))
+
+ (mkdir-p "/var/run/dbus")
+
+ (let ((user (getpwnam "messagebus")))
+ (chown "/var/run/dbus"
+ (passwd:uid user) (passwd:gid user)))
+
+ (unless (file-exists? "/etc/machine-id")
+ (format #t "creating /etc/machine-id...~%")
+ (let ((prog (string-append #$dbus "/bin/dbus-uuidgen")))
+ ;; XXX: We can't use 'system' because the initrd's
+ ;; guile system(3) only works when 'sh' is in $PATH.
+ (let ((pid (primitive-fork)))
+ (if (zero? pid)
+ (call-with-output-file "/etc/machine-id"
+ (lambda (port)
+ (close-fdes 1)
+ (dup2 (port->fdes port) 1)
+ (execl prog)))
+ (waitpid pid)))))))))))
+
+;;; dbus.scm ends here
diff --git a/gnu/services/dmd.scm b/gnu/services/dmd.scm
index 54fb5cbfd6..982c196fe4 100644
--- a/gnu/services/dmd.scm
+++ b/gnu/services/dmd.scm
@@ -17,6 +17,7 @@
;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
(define-module (gnu services dmd)
+ #:use-module (guix gexp)
#:use-module (guix monads)
#:use-module (gnu services)
#:use-module (ice-9 match)
@@ -29,52 +30,45 @@
;;;
;;; Code:
-(define (dmd-configuration-file services etc)
- "Return the dmd configuration file for SERVICES, that initializes /etc from
-ETC (the name of a directory in the store) on startup."
- (define config
- `(begin
- (use-modules (ice-9 ftw))
+(define (dmd-configuration-file services)
+ "Return the dmd configuration file for SERVICES."
+ (define modules
+ ;; Extra modules visible to dmd.conf.
+ '((guix build syscalls)
+ (guix build linux-initrd)
+ (guix build utils)))
- (register-services
- ,@(map (lambda (service)
- `(make <service>
- #:docstring ',(service-documentation service)
- #:provides ',(service-provision service)
- #:requires ',(service-requirement service)
- #:respawn? ',(service-respawn? service)
- #:start ,(service-start service)
- #:stop ,(service-stop service)))
- services))
+ (mlet %store-monad ((modules (imported-modules modules))
+ (compiled (compiled-modules modules)))
+ (define config
+ #~(begin
+ (eval-when (expand load eval)
+ (set! %load-path (cons #$modules %load-path))
+ (set! %load-compiled-path
+ (cons #$compiled %load-compiled-path)))
- ;; /etc is a mixture of static and dynamic settings. Here is where we
- ;; initialize it from the static part.
- (format #t "populating /etc from ~a...~%" ,etc)
- (let ((rm-f (lambda (f)
- (false-if-exception (delete-file f)))))
- (rm-f "/etc/static")
- (symlink ,etc "/etc/static")
- (for-each (lambda (file)
- ;; TODO: Handle 'shadow' specially so that changed
- ;; password aren't lost.
- (let ((target (string-append "/etc/" file))
- (source (string-append "/etc/static/" file)))
- (rm-f target)
- (symlink source target)))
- (scandir ,etc
- (lambda (file)
- (not (member file '("." ".."))))))
+ (use-modules (ice-9 ftw)
+ (guix build syscalls)
+ ((guix build linux-initrd)
+ #:select (check-file-system)))
- ;; Prevent ETC from being GC'd.
- (rm-f "/var/guix/gcroots/etc-directory")
- (symlink ,etc "/var/guix/gcroots/etc-directory"))
+ (register-services
+ #$@(map (lambda (service)
+ #~(make <service>
+ #:docstring '#$(service-documentation service)
+ #:provides '#$(service-provision service)
+ #:requires '#$(service-requirement service)
+ #:respawn? '#$(service-respawn? service)
+ #:start #$(service-start service)
+ #:stop #$(service-stop service)))
+ services))
- ;; guix-daemon 0.6 aborts if 'PATH' is undefined, so work around it.
- (setenv "PATH" "/run/current-system/bin")
+ ;; guix-daemon 0.6 aborts if 'PATH' is undefined, so work around it.
+ (setenv "PATH" "/run/current-system/profile/bin")
- (format #t "starting services...~%")
- (for-each start ',(append-map service-provision services))))
+ (format #t "starting services...~%")
+ (for-each start '#$(append-map service-provision services))))
- (text-file "dmd.conf" (object->string config)))
+ (gexp->file "dmd.conf" config)))
;;; dmd.scm ends here
diff --git a/gnu/services/networking.scm b/gnu/services/networking.scm
index 317800db50..8bb05850e3 100644
--- a/gnu/services/networking.scm
+++ b/gnu/services/networking.scm
@@ -20,6 +20,7 @@
#:use-module (gnu services)
#:use-module (gnu packages admin)
#:use-module (gnu packages linux)
+ #:use-module (guix gexp)
#:use-module (guix monads)
#:export (static-networking-service))
@@ -41,40 +42,41 @@ true, it must be a string specifying the default network gateway."
;; TODO: Eventually we should do this using Guile's networking procedures,
;; like 'configure-qemu-networking' does, but the patch that does this is
;; not yet in stock Guile.
- (mlet %store-monad ((ifconfig (package-file inetutils "bin/ifconfig"))
- (route (package-file net-tools "sbin/route")))
+ (with-monad %store-monad
(return
(service
(documentation
(string-append "Set up networking on the '" interface
"' interface using a static IP address."))
(provision '(networking))
- (start `(lambda _
- ;; Return #t if successfully started.
- (and (zero? (system* ,ifconfig ,interface ,ip "up"))
- ,(if gateway
- `(zero? (system* ,route "add" "-net" "default"
- "gw" ,gateway))
- #t)
- ,(if (pair? name-servers)
- `(call-with-output-file "/etc/resolv.conf"
- (lambda (port)
- (display
- "# Generated by 'static-networking-service'.\n"
- port)
- (for-each (lambda (server)
- (format port "nameserver ~a~%"
- server))
- ',name-servers)))
- #t))))
- (stop `(lambda _
+ (start #~(lambda _
+ ;; Return #t if successfully started.
+ (and (zero? (system* (string-append #$inetutils
+ "/bin/ifconfig")
+ #$interface #$ip "up"))
+ #$(if gateway
+ #~(zero? (system* (string-append #$net-tools
+ "/sbin/route")
+ "add" "-net" "default"
+ "gw" #$gateway))
+ #t)
+ #$(if (pair? name-servers)
+ #~(call-with-output-file "/etc/resolv.conf"
+ (lambda (port)
+ (display
+ "# Generated by 'static-networking-service'.\n"
+ port)
+ (for-each (lambda (server)
+ (format port "nameserver ~a~%"
+ server))
+ '#$name-servers)))
+ #t))))
+ (stop #~(lambda _
;; Return #f is successfully stopped.
- (not (and (system* ,ifconfig ,interface "down")
- (system* ,route "del" "-net" "default")))))
- (respawn? #f)
- (inputs `(("inetutils" ,inetutils)
- ,@(if gateway
- `(("net-tools" ,net-tools))
- '())))))))
+ (not (and (system* (string-append #$inetutils "/bin/ifconfig")
+ #$interface "down")
+ (system* (string-append #$net-tools "/sbin/route")
+ "del" "-net" "default")))))
+ (respawn? #f)))))
;;; networking.scm ends here
diff --git a/gnu/services/xorg.scm b/gnu/services/xorg.scm
index 086150a658..7215297f69 100644
--- a/gnu/services/xorg.scm
+++ b/gnu/services/xorg.scm
@@ -27,6 +27,7 @@
#:use-module (gnu packages gnustep)
#:use-module (gnu packages admin)
#:use-module (gnu packages bash)
+ #:use-module (guix gexp)
#:use-module (guix monads)
#:use-module (guix derivations)
#:export (xorg-start-command
@@ -86,77 +87,42 @@ Section \"Screen\"
Device \"Device-vesa\"
EndSection"))
- (mlet %store-monad ((guile-bin (package-file guile "bin/guile"))
- (xorg-bin (package-file xorg-server "bin/X"))
- (dri (package-file mesa "lib/dri"))
- (xkbcomp-bin (package-file xkbcomp "bin"))
- (xkb-dir (package-file xkeyboard-config
- "share/X11/xkb"))
- (config (xserver.conf)))
- (define builder
+ (mlet %store-monad ((config (xserver.conf)))
+ (define script
;; Write a small wrapper around the X server.
- `(let ((out (assoc-ref %outputs "out")))
- (call-with-output-file out
- (lambda (port)
- (format port "#!~a --no-auto-compile~%!#~%" ,guile-bin)
- (write '(begin
- (setenv "XORG_DRI_DRIVER_PATH" ,dri)
- (setenv "XKB_BINDIR" ,xkbcomp-bin)
-
- (apply execl
-
- ,xorg-bin "-ac" "-logverbose" "-verbose"
- "-xkbdir" ,xkb-dir
- "-config" ,(derivation->output-path config)
- "-nolisten" "tcp" "-terminate"
-
- ;; Note: SLiM and other display managers add the
- ;; '-auth' flag by themselves.
- (cdr (command-line))))
- port)))
- (chmod out #o555)
- #t))
-
- (mlet %store-monad ((inputs (lower-inputs
- `(("xorg" ,xorg-server)
- ("xkbcomp" ,xkbcomp)
- ("xkeyboard-config" ,xkeyboard-config)
- ("mesa" ,mesa)
- ("guile" ,guile)
- ("xorg.conf" ,config)))))
- (derivation-expression "start-xorg" builder
- #:inputs inputs))))
+ #~(begin
+ (setenv "XORG_DRI_DRIVER_PATH" (string-append #$mesa "/lib/dri"))
+ (setenv "XKB_BINDIR" (string-append #$xkbcomp "/bin"))
+
+ (apply execl (string-append #$xorg-server "/bin/X")
+ "-ac" "-logverbose" "-verbose"
+ "-xkbdir" (string-append #$xkeyboard-config "/share/X11/xkb")
+ "-config" #$config
+ "-nolisten" "tcp" "-terminate"
+
+ ;; Note: SLiM and other display managers add the
+ ;; '-auth' flag by themselves.
+ (cdr (command-line)))))
+
+ (gexp->script "start-xorg" script)))
(define* (xinitrc #:key
(guile guile-final)
(ratpoison ratpoison)
(windowmaker windowmaker))
"Return a system-wide xinitrc script that starts the specified X session."
- (mlet %store-monad ((guile-bin (package-file guile "bin/guile"))
- (ratpoison-bin (package-file ratpoison "bin/ratpoison"))
- (wmaker-bin (package-file windowmaker "bin/wmaker"))
- (inputs (lower-inputs
- `(("raptoison" ,ratpoison)
- ("wmaker" ,windowmaker)))))
- (define builder
- `(let ((out (assoc-ref %outputs "out")))
- (call-with-output-file out
- (lambda (port)
- (format port "#!~a --no-auto-compile~%!#~%" ,guile-bin)
- (write '(begin
- (use-modules (ice-9 match))
-
- ;; TODO: Check for ~/.xsession.
- (match (command-line)
- ((_ "ratpoison")
- (execl ,ratpoison-bin))
- (_
- (execl ,wmaker-bin))))
- port)))
- (chmod out #o555)
- #t))
-
- (derivation-expression "xinitrc" builder #:inputs inputs)))
+ (define builder
+ #~(begin
+ (use-modules (ice-9 match))
+
+ ;; TODO: Check for ~/.xsession.
+ (match (command-line)
+ ((_ "ratpoison")
+ (execl (string-append #$ratpoison "/bin/ratpoison")))
+ (_
+ (execl (string-append #$windowmaker "/bin/wmaker"))))))
+
+ (gexp->script "xinitrc" builder))
(define* (slim-service #:key (slim slim)
(allow-empty-passwords? #t) auto-login?
@@ -173,7 +139,7 @@ When AUTO-LOGIN? is true, log in automatically as DEFAULT-USER."
(mlet %store-monad ((startx (or startx (xorg-start-command)))
(xinitrc (xinitrc)))
(text-file* "slim.cfg" "
-default_path /run/current-system/bin
+default_path /run/current-system/profile/bin
default_xserver " startx "
xserver_arguments :0 vt7
xauth_path " xauth "/bin/xauth
@@ -181,7 +147,7 @@ authfile /var/run/slim.auth
# The login command. '%session' is replaced by the chosen session name, one
# of the names specified in the 'sessions' setting: 'wmaker', 'xfce', etc.
-login_cmd exec " xinitrc "%session
+login_cmd exec " xinitrc " %session
sessions wmaker,ratpoison
halt_cmd " dmd "/sbin/halt
@@ -190,25 +156,19 @@ reboot_cmd " dmd "/sbin/reboot
(string-append "auto_login yes\ndefault_user " default-user)
""))))
- (mlet %store-monad ((slim-bin (package-file slim "bin/slim"))
- (bash-bin (package-file bash "bin/bash"))
- (slim.cfg (slim.cfg)))
+ (mlet %store-monad ((slim.cfg (slim.cfg)))
(return
(service
(documentation "Xorg display server")
(provision '(xorg-server))
- (requirement '(host-name))
+ (requirement '(user-processes host-name))
(start
;; XXX: Work around the inability to specify env. vars. directly.
- `(make-forkexec-constructor
- ,bash-bin "-c"
- ,(string-append "SLIM_CFGFILE=" (derivation->output-path slim.cfg)
- " " slim-bin
- " -nodaemon")))
- (stop `(make-kill-destructor))
- (inputs `(("slim" ,slim)
- ("slim.cfg" ,slim.cfg)
- ("bash" ,bash)))
+ #~(make-forkexec-constructor
+ (string-append #$bash "/bin/sh") "-c"
+ (string-append "SLIM_CFGFILE=" #$slim.cfg
+ " " #$slim "/bin/slim" " -nodaemon")))
+ (stop #~(make-kill-destructor))
(respawn? #t)
(pam-services
;; Tell PAM about 'slim'.
diff --git a/gnu/system.scm b/gnu/system.scm
index 96f721330f..06bec40cef 100644
--- a/gnu/system.scm
+++ b/gnu/system.scm
@@ -19,6 +19,7 @@
(define-module (gnu system)
#:use-module (guix store)
#:use-module (guix monads)
+ #:use-module (guix gexp)
#:use-module (guix records)
#:use-module (guix packages)
#:use-module (guix derivations)
@@ -33,14 +34,17 @@
#:use-module (gnu system shadow)
#:use-module (gnu system linux)
#:use-module (gnu system linux-initrd)
+ #:use-module (gnu system file-systems)
#:use-module (ice-9 match)
#:use-module (srfi srfi-1)
#:use-module (srfi srfi-26)
#:export (operating-system
operating-system?
+
+ operating-system-bootloader
operating-system-services
+ operating-system-user-services
operating-system-packages
- operating-system-bootloader-entries
operating-system-host-name
operating-system-kernel
operating-system-initrd
@@ -49,10 +53,11 @@
operating-system-packages
operating-system-timezone
operating-system-locale
- operating-system-services
+ operating-system-file-systems
- operating-system-profile-directory
- operating-system-derivation))
+ operating-system-derivation
+ operating-system-profile
+ operating-system-grub.cfg))
;;; Commentary:
;;;
@@ -67,12 +72,10 @@
operating-system?
(kernel operating-system-kernel ; package
(default linux-libre))
- (bootloader operating-system-bootloader ; package
- (default grub))
- (bootloader-entries operating-system-bootloader-entries ; list
- (default '()))
- (initrd operating-system-initrd ; monadic derivation
- (default (gnu-system-initrd)))
+ (bootloader operating-system-bootloader) ; <grub-configuration>
+
+ (initrd operating-system-initrd ; (list fs) -> M derivation
+ (default qemu-initrd))
(host-name operating-system-host-name) ; string
@@ -84,11 +87,10 @@
(groups operating-system-groups ; list of user groups
(default (list (user-group
(name "root")
- (id 0))
- (user-group
- (name "users")
- (id 100)
- (members '("guest"))))))
+ (id 0)))))
+
+ (skeletons operating-system-skeletons ; list of name/monadic value
+ (default (default-skeletons)))
(packages operating-system-packages ; list of (PACKAGE OUTPUT...)
(default (list coreutils ; or just PACKAGE
@@ -104,9 +106,16 @@
(timezone operating-system-timezone) ; string
(locale operating-system-locale) ; string
- (services operating-system-services ; list of monadic services
- (default %base-services)))
+ (services operating-system-user-services ; list of monadic services
+ (default %base-services))
+
+ (pam-services operating-system-pam-services ; list of PAM services
+ (default (base-pam-services)))
+ (setuid-programs operating-system-setuid-programs
+ (default %setuid-programs)) ; list of string-valued gexps
+ (sudoers operating-system-sudoers ; /etc/sudoers contents
+ (default %sudoers-specification)))
;;;
@@ -119,122 +128,104 @@
"Return a derivation that builds the union of INPUTS. INPUTS is a list of
input tuples."
(define builder
- '(begin
- (use-modules (guix build union))
+ #~(begin
+ (use-modules (guix build union))
- (setvbuf (current-output-port) _IOLBF)
- (setvbuf (current-error-port) _IOLBF)
+ (define inputs '#$inputs)
- (let ((output (assoc-ref %outputs "out"))
- (inputs (map cdr %build-inputs)))
- (format #t "building union `~a' with ~a packages...~%"
- output (length inputs))
- (union-build output inputs))))
+ (setvbuf (current-output-port) _IOLBF)
+ (setvbuf (current-error-port) _IOLBF)
- (mlet %store-monad
- ((inputs (sequence %store-monad
- (map (match-lambda
- ((or ((? package? p)) (? package? p))
- (mlet %store-monad
- ((drv (package->derivation p system)))
- (return `(,name ,drv))))
- (((? package? p) output)
- (mlet %store-monad
- ((drv (package->derivation p system)))
- (return `(,name ,drv ,output))))
- (x
- (return x)))
- inputs))))
- (derivation-expression name builder
- #:system system
- #:inputs inputs
- #:modules '((guix build union))
- #:guile-for-build guile
- #:local-build? #t)))
-
-(define* (file-union files
- #:key (inputs '()) (name "file-union"))
+ (format #t "building union `~a' with ~a packages...~%"
+ #$output (length inputs))
+ (union-build #$output inputs)))
+
+ (gexp->derivation name builder
+ #:system system
+ #:modules '((guix build union))
+ #:guile-for-build guile
+ #:local-build? #t))
+
+(define* (file-union name files)
"Return a derivation that builds a directory containing all of FILES. Each
item in FILES must be a list where the first element is the file name to use
-in the new directory, and the second element is the target file.
-
-The subset of FILES corresponding to plain store files is automatically added
-as an inputs; additional inputs, such as derivations, are taken from INPUTS."
- (mlet %store-monad ((inputs (lower-inputs inputs)))
- (let* ((outputs (append-map (match-lambda
- ((_ (? derivation? drv))
- (list (derivation->output-path drv)))
- ((_ (? derivation? drv) sub-drv ...)
- (map (cut derivation->output-path drv <>)
- sub-drv))
- (_ '()))
- inputs))
- (inputs (append inputs
- (filter (match-lambda
- ((_ file)
- ;; Elements of FILES that are store
- ;; files and that do not correspond to
- ;; the output of INPUTS are considered
- ;; inputs (still here?).
- (and (direct-store-path? file)
- (not (member file outputs)))))
- files))))
- (derivation-expression name
- `(let ((out (assoc-ref %outputs "out")))
- (mkdir out)
- (chdir out)
- ,@(map (match-lambda
- ((name target)
- `(symlink ,target ,name)))
- files))
-
- #:inputs inputs
- #:local-build? #t))))
-
-(define (links inputs)
- "Return a directory with symbolic links to all of INPUTS. This is
-essentially useful when one wants to keep references to all of INPUTS, be they
-directories or regular files."
+in the new directory, and the second element is a gexp denoting the target
+file."
(define builder
- '(begin
- (use-modules (srfi srfi-1))
-
- (let ((out (assoc-ref %outputs "out")))
- (mkdir out)
- (chdir out)
- (fold (lambda (file number)
- (symlink file (number->string number))
- (+ 1 number))
- 0
- (map cdr %build-inputs))
- #t)))
-
- (mlet %store-monad ((inputs (lower-inputs inputs)))
- (derivation-expression "links" builder
- #:inputs inputs
- #:local-build? #t)))
+ #~(begin
+ (mkdir #$output)
+ (chdir #$output)
+ #$@(map (match-lambda
+ ((target source)
+ #~(symlink #$source #$target)))
+ files)))
+
+ (gexp->derivation name builder))
+
+
+;;;
+;;; Services.
+;;;
+
+(define (other-file-system-services os)
+ "Return file system services for the file systems of OS that are not marked
+as 'needed-for-boot'."
+ (define file-systems
+ (remove (lambda (fs)
+ (or (file-system-needed-for-boot? fs)
+ (string=? "/" (file-system-mount-point fs))))
+ (operating-system-file-systems os)))
+
+ (sequence %store-monad
+ (map (match-lambda
+ (($ <file-system> device target type flags opts #f check?)
+ (file-system-service device target type
+ #:check? check?
+ #:options opts)))
+ file-systems)))
+
+(define (essential-services os)
+ "Return the list of essential services for OS. These are special services
+that implement part of what's declared in OS are responsible for low-level
+bookkeeping."
+ (mlet* %store-monad ((root-fs (root-file-system-service))
+ (other-fs (other-file-system-services os))
+ (procs (user-processes-service
+ (map (compose first service-provision)
+ other-fs)))
+ (host-name (host-name-service
+ (operating-system-host-name os))))
+ (return (cons* host-name procs root-fs other-fs))))
+
+(define (operating-system-services os)
+ "Return all the services of OS, including \"internal\" services that do not
+explicitly appear in OS."
+ (mlet %store-monad
+ ((user (sequence %store-monad (operating-system-user-services os)))
+ (essential (essential-services os)))
+ (return (append essential user))))
+
+
+;;;
+;;; /etc.
+;;;
(define* (etc-directory #:key
(locale "C") (timezone "Europe/Paris")
- (accounts '())
- (groups '())
+ (skeletons '())
(pam-services '())
- (profile "/var/run/current-system/profile"))
+ (profile "/run/current-system/profile")
+ (sudoers ""))
"Return a derivation that builds the static part of the /etc directory."
(mlet* %store-monad
- ((services (package-file net-base "etc/services"))
- (protocols (package-file net-base "etc/protocols"))
- (rpc (package-file net-base "etc/rpc"))
- (passwd (passwd-file accounts))
- (shadow (passwd-file accounts #:shadow? #t))
- (group (group-file groups))
- (pam.d (pam-services->directory pam-services))
+ ((pam.d (pam-services->directory pam-services))
+ (sudoers (text-file "sudoers" sudoers))
(login.defs (text-file "login.defs" "# Empty for now.\n"))
(shells (text-file "shells" ; used by xterm and others
"\
/bin/sh
-/run/current-system/bin/sh
-/run/current-system/bin/bash\n"))
+/run/current-system/profile/bin/sh
+/run/current-system/profile/bin/bash\n"))
(issue (text-file "issue" "
This is an alpha preview of the GNU system. Welcome.
@@ -253,119 +244,259 @@ export LC_ALL=\"" locale "\"
export TZ=\"" timezone "\"
export TZDIR=\"" tzdata "/share/zoneinfo\"
-export PATH=$HOME/.guix-profile/bin:" profile "/bin:" profile "/sbin
+export PATH=/run/setuid-programs:/run/current-system/profile/sbin
+export PATH=$HOME/.guix-profile/bin:/run/current-system/profile/bin:$PATH
export CPATH=$HOME/.guix-profile/include:" profile "/include
export LIBRARY_PATH=$HOME/.guix-profile/lib:" profile "/lib
alias ls='ls -p --color'
alias ll='ls -l'
"))
-
- (tz-file (package-file tzdata
- (string-append "share/zoneinfo/" timezone)))
- (files -> `(("services" ,services)
- ("protocols" ,protocols)
- ("rpc" ,rpc)
- ("pam.d" ,(derivation->output-path pam.d))
- ("login.defs" ,login.defs)
- ("issue" ,issue)
- ("shells" ,shells)
- ("profile" ,(derivation->output-path bashrc))
- ("localtime" ,tz-file)
- ("passwd" ,passwd)
- ("shadow" ,shadow)
- ("group" ,group))))
- (file-union files
- #:inputs `(("net" ,net-base)
- ("pam.d" ,pam.d)
- ("bashrc" ,bashrc)
- ("tzdata" ,tzdata))
- #:name "etc")))
-
-(define (operating-system-profile-derivation os)
+ (skel (skeleton-directory skeletons)))
+ (file-union "etc"
+ `(("services" ,#~(string-append #$net-base "/etc/services"))
+ ("protocols" ,#~(string-append #$net-base "/etc/protocols"))
+ ("rpc" ,#~(string-append #$net-base "/etc/rpc"))
+ ("pam.d" ,#~#$pam.d)
+ ("login.defs" ,#~#$login.defs)
+ ("issue" ,#~#$issue)
+ ("skel" ,#~#$skel)
+ ("shells" ,#~#$shells)
+ ("profile" ,#~#$bashrc)
+ ("localtime" ,#~(string-append #$tzdata "/share/zoneinfo/"
+ #$timezone))
+ ("sudoers" ,#~#$sudoers)))))
+
+(define (operating-system-profile os)
"Return a derivation that builds the default profile of OS."
;; TODO: Replace with a real profile with a manifest.
(union (operating-system-packages os)
#:name "default-profile"))
-(define (operating-system-profile-directory os)
- "Return the directory name of the default profile of OS."
- (mlet %store-monad ((drv (operating-system-profile-derivation os)))
- (return (derivation->output-path drv))))
-
-(define (operating-system-derivation os)
- "Return a derivation that builds OS."
+(define %root-account
+ ;; Default root account.
+ (user-account
+ (name "root")
+ (password "")
+ (uid 0) (group "root")
+ (comment "System administrator")
+ (home-directory "/root")))
+
+(define (operating-system-accounts os)
+ "Return the user accounts for OS, including an obligatory 'root' account."
+ (define users
+ ;; Make sure there's a root account.
+ (if (find (lambda (user)
+ (and=> (user-account-uid user) zero?))
+ (operating-system-users os))
+ (operating-system-users os)
+ (cons %root-account (operating-system-users os))))
+
+ (mlet %store-monad ((services (operating-system-services os)))
+ (return (append users
+ (append-map service-user-accounts services)))))
+
+(define (operating-system-etc-directory os)
+ "Return that static part of the /etc directory of OS."
(mlet* %store-monad
- ((services (sequence %store-monad
- (cons (host-name-service
- (operating-system-host-name os))
- (operating-system-services os))))
+ ((services (operating-system-services os))
(pam-services ->
;; Services known to PAM.
(delete-duplicates
- (cons %pam-other-services
- (append-map service-pam-services services))))
-
- (bash-file (package-file bash "bin/bash"))
- (dmd-file (package-file (@ (gnu packages admin) dmd) "bin/dmd"))
- (accounts -> (cons (user-account
- (name "root")
- (password "")
- (uid 0) (gid 0)
- (comment "System administrator")
- (home-directory "/root"))
- (append (operating-system-users os)
- (append-map service-user-accounts
- services))))
- (groups -> (append (operating-system-groups os)
- (append-map service-user-groups services)))
-
- (profile-drv (operating-system-profile-derivation os))
- (profile -> (derivation->output-path profile-drv))
- (etc-drv (etc-directory #:accounts accounts #:groups groups
- #:pam-services pam-services
- #:locale (operating-system-locale os)
- #:timezone (operating-system-timezone os)
- #:profile profile-drv))
- (etc -> (derivation->output-path etc-drv))
- (dmd-conf (dmd-configuration-file services etc))
-
-
- (boot (text-file "boot"
- (object->string
- `(execl ,dmd-file "dmd"
- "--config" ,dmd-conf))))
- (kernel -> (operating-system-kernel os))
- (kernel-dir (package-file kernel))
- (initrd (operating-system-initrd os))
- (initrd-file -> (string-append (derivation->output-path initrd)
- "/initrd"))
+ (append (operating-system-pam-services os)
+ (append-map service-pam-services services))))
+ (profile-drv (operating-system-profile os))
+ (skeletons (operating-system-skeletons os)))
+ (etc-directory #:pam-services pam-services
+ #:skeletons skeletons
+ #:locale (operating-system-locale os)
+ #:timezone (operating-system-timezone os)
+ #:sudoers (operating-system-sudoers os)
+ #:profile profile-drv)))
+
+(define %setuid-programs
+ ;; Default set of setuid-root programs.
+ (let ((shadow (@ (gnu packages admin) shadow)))
+ (list #~(string-append #$shadow "/bin/passwd")
+ #~(string-append #$shadow "/bin/su")
+ #~(string-append #$inetutils "/bin/ping")
+ #~(string-append #$sudo "/bin/sudo"))))
+
+(define %sudoers-specification
+ ;; Default /etc/sudoers contents: 'root' and all members of the 'wheel'
+ ;; group can do anything. See
+ ;; <http://www.sudo.ws/sudo/man/1.8.10/sudoers.man.html>.
+ ;; TODO: Add a declarative API.
+ "root ALL=(ALL) ALL
+%wheel ALL=(ALL) ALL\n")
+
+(define (user-group->gexp group)
+ "Turn GROUP, a <user-group> object, into a list-valued gexp suitable for
+'active-groups'."
+ #~(list #$(user-group-name group)
+ #$(user-group-password group)
+ #$(user-group-id group)))
+
+(define (user-account->gexp account)
+ "Turn ACCOUNT, a <user-account> object, into a list-valued gexp suitable for
+'activate-users'."
+ #~`(#$(user-account-name account)
+ #$(user-account-uid account)
+ #$(user-account-group account)
+ #$(user-account-supplementary-groups account)
+ #$(user-account-comment account)
+ #$(user-account-home-directory account)
+ ,#$(user-account-shell account) ; this one is a gexp
+ #$(user-account-password account)))
+
+(define (operating-system-activation-script os)
+ "Return the activation script for OS---i.e., the code that \"activates\" the
+stateful part of OS, including user accounts and groups, special directories,
+etc."
+ (define %modules
+ '((guix build activation)
+ (guix build utils)
+ (guix build linux-initrd)))
+
+ (define (service-activations services)
+ ;; Return the activation scripts for SERVICES.
+ (let ((gexps (filter-map service-activate services)))
+ (sequence %store-monad (map (cut gexp->file "activate-service.scm" <>)
+ gexps))))
+
+ (mlet* %store-monad ((services (operating-system-services os))
+ (actions (service-activations services))
+ (etc (operating-system-etc-directory os))
+ (modules (imported-modules %modules))
+ (compiled (compiled-modules %modules))
+ (accounts (operating-system-accounts os)))
+ (define setuid-progs
+ (operating-system-setuid-programs os))
+
+ (define user-specs
+ (map user-account->gexp accounts))
+
+ (define groups
+ (append (operating-system-groups os)
+ (append-map service-user-groups services)))
+
+ (define group-specs
+ (map user-group->gexp groups))
+
+ (gexp->file "boot"
+ #~(begin
+ (eval-when (expand load eval)
+ ;; Make sure 'use-modules' below succeeds.
+ (set! %load-path (cons #$modules %load-path))
+ (set! %load-compiled-path
+ (cons #$compiled %load-compiled-path)))
+
+ (use-modules (guix build activation))
+
+ ;; Populate /etc.
+ (activate-etc #$etc)
+
+ ;; Add users and user groups.
+ (setenv "PATH"
+ (string-append #$(@ (gnu packages admin) shadow)
+ "/sbin"))
+ (activate-users+groups (list #$@user-specs)
+ (list #$@group-specs))
+
+ ;; Activate setuid programs.
+ (activate-setuid-programs (list #$@setuid-progs))
+
+ ;; Run the services' activation snippets.
+ ;; TODO: Use 'load-compiled'.
+ (for-each primitive-load '#$actions)
+
+ ;; Set up /run/current-system.
+ (activate-current-system)))))
+
+(define (operating-system-boot-script os)
+ "Return the boot script for OS---i.e., the code started by the initrd once
+we're running in the final root."
+ (mlet* %store-monad ((services (operating-system-services os))
+ (activate (operating-system-activation-script os))
+ (dmd-conf (dmd-configuration-file services)))
+ (gexp->file "boot"
+ #~(begin
+ ;; Activate the system.
+ ;; TODO: Use 'load-compiled'.
+ (primitive-load #$activate)
+
+ ;; Keep track of the booted system.
+ (false-if-exception (delete-file "/run/booted-system"))
+ (symlink (readlink "/run/current-system")
+ "/run/booted-system")
+
+ ;; Close any remaining open file descriptors to be on the
+ ;; safe side. This must be the very last thing we do,
+ ;; because Guile has internal FDs such as 'sleep_pipe'
+ ;; that need to be alive.
+ (let loop ((fd 3))
+ (when (< fd 1024)
+ (false-if-exception (close-fdes fd))
+ (loop (+ 1 fd))))
+
+ ;; Start dmd.
+ (execl (string-append #$dmd "/bin/dmd")
+ "dmd" "--config" #$dmd-conf)))))
+
+(define (operating-system-root-file-system os)
+ "Return the root file system of OS."
+ (find (match-lambda
+ (($ <file-system> _ "/") #t)
+ (_ #f))
+ (operating-system-file-systems os)))
+
+(define (operating-system-initrd-file os)
+ "Return a gexp denoting the initrd file of OS."
+ (define boot-file-systems
+ (filter (match-lambda
+ (($ <file-system> device "/")
+ #t)
+ (($ <file-system> device mount-point type flags options boot?)
+ boot?))
+ (operating-system-file-systems os)))
+
+ (mlet %store-monad
+ ((initrd ((operating-system-initrd os) boot-file-systems)))
+ (return #~(string-append #$initrd "/initrd"))))
+
+(define (operating-system-grub.cfg os)
+ "Return the GRUB configuration file for OS."
+ (mlet* %store-monad
+ ((system (operating-system-derivation os))
+ (root-fs -> (operating-system-root-file-system os))
+ (kernel -> (operating-system-kernel os))
(entries -> (list (menu-entry
(label (string-append
"GNU system with "
(package-full-name kernel)
" (technology preview)"))
(linux kernel)
- (linux-arguments `("--root=/dev/sda1"
- ,(string-append "--load=" boot)))
- (initrd initrd-file))))
- (grub.cfg (grub-configuration-file entries))
- (extras (links (delete-duplicates
- (append (append-map service-inputs services)
- (append-map user-account-inputs accounts))))))
- (file-union `(("boot" ,boot)
- ("kernel" ,kernel-dir)
- ("initrd" ,initrd-file)
- ("dmd.conf" ,dmd-conf)
- ("profile" ,profile)
- ("grub.cfg" ,grub.cfg)
- ("etc" ,etc)
- ("system-inputs" ,(derivation->output-path extras)))
- #:inputs `(("kernel" ,kernel)
- ("initrd" ,initrd)
- ("bash" ,bash)
- ("profile" ,profile-drv)
- ("etc" ,etc-drv)
- ("system-inputs" ,extras))
- #:name "system")))
+ (linux-arguments
+ (list (string-append "--root="
+ (file-system-device root-fs))
+ #~(string-append "--system=" #$system)
+ #~(string-append "--load=" #$system
+ "/boot")))
+ (initrd #~(string-append #$system "/initrd"))))))
+ (grub-configuration-file (operating-system-bootloader os) entries)))
+
+(define (operating-system-derivation os)
+ "Return a derivation that builds OS."
+ (mlet* %store-monad
+ ((profile (operating-system-profile os))
+ (etc (operating-system-etc-directory os))
+ (boot (operating-system-boot-script os))
+ (kernel -> (operating-system-kernel os))
+ (initrd (operating-system-initrd-file os)))
+ (file-union "system"
+ `(("boot" ,#~#$boot)
+ ("kernel" ,#~#$kernel)
+ ("initrd" ,initrd)
+ ("profile" ,#~#$profile)
+ ("etc" ,#~#$etc)))))
;;; system.scm ends here
diff --git a/gnu/system/file-systems.scm b/gnu/system/file-systems.scm
new file mode 100644
index 0000000000..485150ea51
--- /dev/null
+++ b/gnu/system/file-systems.scm
@@ -0,0 +1,72 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2013, 2014 Ludovic Courtès <ludo@gnu.org>
+;;;
+;;; 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 <http://www.gnu.org/licenses/>.
+
+(define-module (gnu system file-systems)
+ #:use-module (guix records)
+ #:export (<file-system>
+ file-system
+ file-system?
+ file-system-device
+ file-system-mount-point
+ file-system-type
+ file-system-needed-for-boot?
+ file-system-flags
+ file-system-options
+
+ %fuse-control-file-system
+ %binary-format-file-system))
+
+;;; Commentary:
+;;;
+;;; Declaring file systems to be mounted.
+;;;
+;;; Code:
+
+;; File system declaration.
+(define-record-type* <file-system> file-system
+ make-file-system
+ file-system?
+ (device file-system-device) ; string
+ (mount-point file-system-mount-point) ; string
+ (type file-system-type) ; string
+ (flags file-system-flags ; list of symbols
+ (default '()))
+ (options file-system-options ; string or #f
+ (default #f))
+ (needed-for-boot? file-system-needed-for-boot? ; Boolean
+ (default #f))
+ (check? file-system-check? ; Boolean
+ (default #t)))
+
+(define %fuse-control-file-system
+ ;; Control file system for Linux' file systems in user-space (FUSE).
+ (file-system
+ (device "fusectl")
+ (mount-point "/sys/fs/fuse/connections")
+ (type "fusectl")
+ (check? #f)))
+
+(define %binary-format-file-system
+ ;; Support for arbitrary executable binary format.
+ (file-system
+ (device "binfmt_misc")
+ (mount-point "/proc/sys/fs/binfmt_misc")
+ (type "binfmt_misc")
+ (check? #f)))
+
+;;; file-systems.scm ends here
diff --git a/gnu/system/grub.scm b/gnu/system/grub.scm
index 5dc0b85ff2..e789e4c591 100644
--- a/gnu/system/grub.scm
+++ b/gnu/system/grub.scm
@@ -22,10 +22,16 @@
#:use-module (guix derivations)
#:use-module (guix records)
#:use-module (guix monads)
+ #:use-module (guix gexp)
#:use-module (ice-9 match)
#:use-module (srfi srfi-1)
- #:export (menu-entry
+ #:export (grub-configuration
+ grub-configuration?
+ grub-configuration-device
+
+ menu-entry
menu-entry?
+
grub-configuration-file))
;;; Commentary:
@@ -34,51 +40,61 @@
;;;
;;; Code:
+(define-record-type* <grub-configuration>
+ grub-configuration make-grub-configuration
+ grub-configuration?
+ (grub grub-configuration-grub ; package
+ (default (@ (gnu packages grub) grub)))
+ (device grub-configuration-device) ; string
+ (menu-entries grub-configuration-menu-entries ; list
+ (default '()))
+ (default-entry grub-configuration-default-entry ; integer
+ (default 1))
+ (timeout grub-configuration-timeout ; integer
+ (default 5)))
+
(define-record-type* <menu-entry>
menu-entry make-menu-entry
menu-entry?
(label menu-entry-label)
(linux menu-entry-linux)
(linux-arguments menu-entry-linux-arguments
- (default '()))
- (initrd menu-entry-initrd)) ; file name of the initrd
+ (default '())) ; list of string-valued gexps
+ (initrd menu-entry-initrd)) ; file name of the initrd as a gexp
-(define* (grub-configuration-file entries
- #:key (default-entry 1) (timeout 5)
- (system (%current-system)))
- "Return the GRUB configuration file for ENTRIES, a list of
-<menu-entry> objects, defaulting to DEFAULT-ENTRY and with the given TIMEOUT."
- (define (prologue kernel)
- (format #f "
-set default=~a
-set timeout=~a
-search.file ~a~%"
- default-entry timeout kernel))
-
- (define (bzImage)
- (any (match-lambda
- (($ <menu-entry> _ linux)
- (package-file linux "bzImage"
- #:system system)))
- entries))
+(define* (grub-configuration-file config entries
+ #:key (system (%current-system)))
+ "Return the GRUB configuration file corresponding to CONFIG, a
+<grub-configuration> object."
+ (define all-entries
+ (append entries (grub-configuration-menu-entries config)))
- (define entry->text
+ (define entry->gexp
(match-lambda
(($ <menu-entry> label linux arguments initrd)
- (mlet %store-monad ((linux (package-file linux "bzImage"
- #:system system)))
- (return (format #f "menuentry ~s {
- linux ~a ~a
+ #~(format port "menuentry ~s {
+ linux ~a/bzImage ~a
initrd ~a
}~%"
- label
- linux (string-join arguments) initrd))))))
+ #$label
+ #$linux (string-join (list #$@arguments))
+ #$initrd))))
+
+ (define builder
+ #~(call-with-output-file #$output
+ (lambda (port)
+ (format port "
+set default=~a
+set timeout=~a
+search.file ~a/bzImage~%"
+ #$(grub-configuration-default-entry config)
+ #$(grub-configuration-timeout config)
+ #$(any (match-lambda
+ (($ <menu-entry> _ linux)
+ linux))
+ all-entries))
+ #$@(map entry->gexp all-entries))))
- (mlet %store-monad ((kernel (bzImage))
- (body (sequence %store-monad
- (map entry->text entries))))
- (text-file "grub.cfg"
- (string-append (prologue kernel)
- (string-concatenate body)))))
+ (gexp->derivation "grub.cfg" builder))
;;; grub.scm ends here
diff --git a/gnu/system/linux-initrd.scm b/gnu/system/linux-initrd.scm
index 42ca29cb58..b80ff10f1e 100644
--- a/gnu/system/linux-initrd.scm
+++ b/gnu/system/linux-initrd.scm
@@ -18,19 +18,24 @@
(define-module (gnu system linux-initrd)
#:use-module (guix monads)
+ #:use-module (guix gexp)
#:use-module (guix utils)
#:use-module ((guix store)
#:select (%store-prefix))
+ #:use-module ((guix derivations)
+ #:select (derivation->output-path))
#:use-module (gnu packages cpio)
#:use-module (gnu packages compression)
#:use-module (gnu packages linux)
#:use-module (gnu packages guile)
#:use-module ((gnu packages make-bootstrap)
#:select (%guile-static-stripped))
+ #:use-module (gnu system file-systems)
+ #:use-module (ice-9 match)
#:use-module (ice-9 regex)
+ #:use-module (srfi srfi-1)
#:export (expression->initrd
- qemu-initrd
- gnu-system-initrd))
+ qemu-initrd))
;;; Commentary:
@@ -49,12 +54,14 @@
(name "guile-initrd")
(system (%current-system))
(modules '())
+ (to-copy '())
(linux #f)
(linux-modules '()))
"Return a package that contains a Linux initrd (a gzipped cpio archive)
containing GUILE and that evaluates EXP upon booting. LINUX-MODULES is a list
-of `.ko' file names to be copied from LINUX into the initrd. MODULES is a
-list of Guile module names to be embedded in the initrd."
+of `.ko' file names to be copied from LINUX into the initrd. TO-COPY is a
+list of additional derivations or packages to copy to the initrd. MODULES is
+a list of Guile module names to be embedded in the initrd."
;; General Linux overview in `Documentation/early-userspace/README' and
;; `Documentation/filesystems/ramfs-rootfs-initramfs.txt'.
@@ -63,150 +70,157 @@ list of Guile module names to be embedded in the initrd."
;; Return a regexp that matches STR exactly.
(string-append "^" (regexp-quote str) "$"))
- (define builder
- `(begin
- (use-modules (guix build utils)
- (ice-9 pretty-print)
- (ice-9 popen)
- (ice-9 match)
- (ice-9 ftw)
- (srfi srfi-26)
- (system base compile)
- (rnrs bytevectors)
- ((system foreign) #:select (sizeof)))
-
- (let ((guile (assoc-ref %build-inputs "guile"))
- (cpio (string-append (assoc-ref %build-inputs "cpio")
- "/bin/cpio"))
- (gzip (string-append (assoc-ref %build-inputs "gzip")
- "/bin/gzip"))
- (modules (assoc-ref %build-inputs "modules"))
- (gos (assoc-ref %build-inputs "modules/compiled"))
- (scm-dir (string-append "share/guile/" (effective-version)))
- (go-dir (format #f ".cache/guile/ccache/~a-~a-~a-~a"
- (effective-version)
- (if (eq? (native-endianness) (endianness little))
- "LE"
- "BE")
- (sizeof '*)
- (effective-version)))
- (out (assoc-ref %outputs "out")))
- (mkdir out)
- (mkdir "contents")
- (with-directory-excursion "contents"
- (copy-recursively guile ".")
- (call-with-output-file "init"
- (lambda (p)
- (format p "#!/bin/guile -ds~%!#~%" guile)
- (pretty-print ',exp p)))
- (chmod "init" #o555)
- (chmod "bin/guile" #o555)
-
- ;; Copy Guile modules.
- (chmod scm-dir #o777)
- (copy-recursively modules scm-dir
- #:follow-symlinks? #t)
- (copy-recursively gos (string-append "lib/guile/"
- (effective-version) "/ccache")
- #:follow-symlinks? #t)
-
- ;; Compile `init'.
- (mkdir-p go-dir)
- (set! %load-path (cons modules %load-path))
- (set! %load-compiled-path (cons gos %load-compiled-path))
- (compile-file "init"
- #:opts %auto-compilation-options
- #:output-file (string-append go-dir "/init.go"))
-
- ;; Copy Linux modules.
- (let* ((linux (assoc-ref %build-inputs "linux"))
- (module-dir (and linux
- (string-append linux "/lib/modules"))))
- (mkdir "modules")
- ,@(map (lambda (module)
- `(match (find-files module-dir
- ,(string->regexp module))
- ((file)
- (format #t "copying '~a'...~%" file)
- (copy-file file (string-append "modules/"
- ,module)))
- (()
- (error "module not found" ,module module-dir))
- ((_ ...)
- (error "several modules by that name"
- ,module module-dir))))
- linux-modules))
-
- ;; Reset the timestamps of all the files that will make it in the
- ;; initrd.
- (for-each (cut utime <> 0 0 0 0)
- (find-files "." ".*"))
-
- (system* cpio "--version")
- (let ((pipe (open-pipe* OPEN_WRITE cpio "-o"
- "-O" (string-append out "/initrd")
- "-H" "newc" "--null")))
- (define print0
- (let ((len (string-length "./")))
- (lambda (file)
- (format pipe "~a\0" (string-drop file len)))))
-
- ;; Note: as per `ramfs-rootfs-initramfs.txt', always add
- ;; directory entries before the files that are inside of it: "The
- ;; Linux kernel cpio extractor won't create files in a directory
- ;; that doesn't exist, so the directory entries must go before
- ;; the files that go in those directories."
- (file-system-fold (const #t)
- (lambda (file stat result) ; leaf
- (print0 file))
- (lambda (dir stat result) ; down
- (unless (string=? dir ".")
- (print0 dir)))
- (const #f) ; up
- (const #f) ; skip
- (const #f)
- #f
- ".")
-
- (and (zero? (close-pipe pipe))
- (with-directory-excursion out
- (and (zero? (system* gzip "--best" "initrd"))
- (rename-file "initrd.gz" "initrd")))))))))
-
- (mlet* %store-monad
- ((source (imported-modules modules))
- (compiled (compiled-modules modules))
- (inputs (lower-inputs
- `(("guile" ,guile)
- ("cpio" ,cpio)
- ("gzip" ,gzip)
- ("modules" ,source)
- ("modules/compiled" ,compiled)
- ,@(if linux
- `(("linux" ,linux))
- '())))))
- (derivation-expression name builder
- #:modules '((guix build utils))
- #:inputs inputs)))
-
-(define* (qemu-initrd #:key
+ (mlet* %store-monad ((source (imported-modules modules))
+ (compiled (compiled-modules modules)))
+ (define builder
+ ;; TODO: Move most of this code to (guix build linux-initrd).
+ #~(begin
+ (use-modules (guix build utils)
+ (ice-9 pretty-print)
+ (ice-9 popen)
+ (ice-9 match)
+ (ice-9 ftw)
+ (srfi srfi-26)
+ (system base compile)
+ (rnrs bytevectors)
+ ((system foreign) #:select (sizeof)))
+
+ (let ((cpio (string-append #$cpio "/bin/cpio"))
+ (gzip (string-append #$gzip "/bin/gzip"))
+ (modules #$source)
+ (gos #$compiled)
+ (scm-dir (string-append "share/guile/" (effective-version)))
+ (go-dir (format #f ".cache/guile/ccache/~a-~a-~a-~a"
+ (effective-version)
+ (if (eq? (native-endianness) (endianness little))
+ "LE"
+ "BE")
+ (sizeof '*)
+ (effective-version))))
+ (mkdir #$output)
+ (mkdir "contents")
+ (with-directory-excursion "contents"
+ (copy-recursively #$guile ".")
+ (call-with-output-file "init"
+ (lambda (p)
+ (format p "#!/bin/guile -ds~%!#~%" #$guile)
+ (pretty-print '#$exp p)))
+ (chmod "init" #o555)
+ (chmod "bin/guile" #o555)
+
+ ;; Copy Guile modules.
+ (chmod scm-dir #o777)
+ (copy-recursively modules scm-dir
+ #:follow-symlinks? #t)
+ (copy-recursively gos (string-append "lib/guile/"
+ (effective-version) "/ccache")
+ #:follow-symlinks? #t)
+
+ ;; Compile `init'.
+ (mkdir-p go-dir)
+ (set! %load-path (cons modules %load-path))
+ (set! %load-compiled-path (cons gos %load-compiled-path))
+ (compile-file "init"
+ #:opts %auto-compilation-options
+ #:output-file (string-append go-dir "/init.go"))
+
+ ;; Copy Linux modules.
+ (let* ((linux #$linux)
+ (module-dir (and linux
+ (string-append linux "/lib/modules"))))
+ (mkdir "modules")
+ #$@(map (lambda (module)
+ #~(match (find-files module-dir
+ #$(string->regexp module))
+ ((file)
+ (format #t "copying '~a'...~%" file)
+ (copy-file file (string-append "modules/"
+ #$module)))
+ (()
+ (error "module not found" #$module module-dir))
+ ((_ ...)
+ (error "several modules by that name"
+ #$module module-dir))))
+ linux-modules))
+
+ (let ((store #$(string-append "." (%store-prefix)))
+ (to-copy '#$to-copy))
+ (unless (null? to-copy)
+ (mkdir-p store))
+ ;; XXX: Should we do export-references-graph?
+ (for-each (lambda (input)
+ (let ((target
+ (string-append store "/"
+ (basename input))))
+ (copy-recursively input target)))
+ to-copy))
+
+ ;; Reset the timestamps of all the files that will make it in the
+ ;; initrd.
+ (for-each (cut utime <> 0 0 0 0)
+ (find-files "." ".*"))
+
+ (system* cpio "--version")
+ (let ((pipe (open-pipe* OPEN_WRITE cpio "-o"
+ "-O" (string-append #$output "/initrd")
+ "-H" "newc" "--null")))
+ (define print0
+ (let ((len (string-length "./")))
+ (lambda (file)
+ (format pipe "~a\0" (string-drop file len)))))
+
+ ;; Note: as per `ramfs-rootfs-initramfs.txt', always add
+ ;; directory entries before the files that are inside of it: "The
+ ;; Linux kernel cpio extractor won't create files in a directory
+ ;; that doesn't exist, so the directory entries must go before
+ ;; the files that go in those directories."
+ (file-system-fold (const #t)
+ (lambda (file stat result) ; leaf
+ (print0 file))
+ (lambda (dir stat result) ; down
+ (unless (string=? dir ".")
+ (print0 dir)))
+ (const #f) ; up
+ (const #f) ; skip
+ (const #f)
+ #f
+ ".")
+
+ (and (zero? (close-pipe pipe))
+ (with-directory-excursion #$output
+ (and (zero? (system* gzip "--best" "initrd"))
+ (rename-file "initrd.gz" "initrd")))))))))
+
+ (gexp->derivation name builder
+ #:modules '((guix build utils)))))
+
+(define (file-system->spec fs)
+ "Return a list corresponding to file-system FS that can be passed to the
+initrd code."
+ (match fs
+ (($ <file-system> device mount-point type flags options _ check?)
+ (list device mount-point type flags options check?))))
+
+(define* (qemu-initrd file-systems
+ #:key
guile-modules-in-chroot?
- volatile-root?
- (mounts `((cifs "/store" ,(%store-prefix))
- (cifs "/xchg" "/xchg"))))
+ (qemu-networking? #t)
+ volatile-root?)
"Return a monadic derivation that builds an initrd for use in a QEMU guest
-where the store is shared with the host. MOUNTS is a list of file systems to
-be mounted atop the root file system, where each item has the form:
+where the store is shared with the host. FILE-SYSTEMS is a list of
+file-systems to be mounted by the initrd, possibly in addition to the root
+file system specified on the kernel command line via '--root'.
- (FILE-SYSTEM-TYPE SOURCE TARGET)
+When QEMU-NETWORKING? is true, set up networking with the standard QEMU
+parameters.
+
+When VOLATILE-ROOT? is true, the root file system is writable but any changes
+to it are lost.
When GUILE-MODULES-IN-CHROOT? is true, make core Guile modules available in
the new root. This is necessary is the file specified as '--load' needs
access to these modules (which is the case if it wants to even just print an
-exception and backtrace!).
-
-When VOLATILE-ROOT? is true, the root file system is writable but any changes
-to it are lost."
+exception and backtrace!)."
(define cifs-modules
;; Modules needed to mount CIFS file systems.
'("md4.ko" "ecb.ko" "cifs.ko"))
@@ -215,35 +229,56 @@ to it are lost."
;; Modules for the 9p paravirtualized file system.
'("9pnet.ko" "9p.ko" "9pnet_virtio.ko"))
+ (define (file-system-type-predicate type)
+ (lambda (fs)
+ (string=? (file-system-type fs) type)))
+
(define linux-modules
;; Modules added to the initrd and loaded from the initrd.
`("virtio.ko" "virtio_ring.ko" "virtio_pci.ko"
"virtio_balloon.ko" "virtio_blk.ko" "virtio_net.ko"
- ,@(if (assoc-ref mounts 'cifs)
+ ,@(if (find (file-system-type-predicate "cifs") file-systems)
cifs-modules
'())
- ,@(if (assoc-ref mounts '9p)
+ ,@(if (find (file-system-type-predicate "9p") file-systems)
virtio-9p-modules
+ '())
+ ,@(if volatile-root?
+ '("fuse.ko")
+ '())))
+
+ (define helper-packages
+ ;; Packages to be copied on the initrd.
+ `(,@(if (find (lambda (fs)
+ (string-prefix? "ext" (file-system-type fs)))
+ file-systems)
+ (list e2fsck/static)
+ '())
+ ,@(if volatile-root?
+ (list unionfs-fuse/static)
'())))
(expression->initrd
- `(begin
- (use-modules (guix build linux-initrd))
-
- (boot-system #:mounts ',mounts
- #:linux-modules ',linux-modules
- #:qemu-guest-networking? #t
- #:guile-modules-in-chroot? ',guile-modules-in-chroot?
- #:volatile-root? ',volatile-root?))
+ #~(begin
+ (use-modules (guix build linux-initrd)
+ (guix build utils)
+ (srfi srfi-26))
+
+ (with-output-to-port (%make-void-port "w")
+ (lambda ()
+ (set-path-environment-variable "PATH" '("bin" "sbin")
+ '#$helper-packages)))
+
+ (boot-system #:mounts '#$(map file-system->spec file-systems)
+ #:linux-modules '#$linux-modules
+ #:qemu-guest-networking? #$qemu-networking?
+ #:guile-modules-in-chroot? '#$guile-modules-in-chroot?
+ #:volatile-root? '#$volatile-root?))
#:name "qemu-initrd"
#:modules '((guix build utils)
(guix build linux-initrd))
+ #:to-copy helper-packages
#:linux linux-libre
#:linux-modules linux-modules))
-(define (gnu-system-initrd)
- "Initrd for the GNU system itself, with nothing QEMU-specific."
- (qemu-initrd #:guile-modules-in-chroot? #f
- #:mounts '()))
-
;;; linux-initrd.scm ends here
diff --git a/gnu/system/linux.scm b/gnu/system/linux.scm
index 65868ce9bf..5440f5852f 100644
--- a/gnu/system/linux.scm
+++ b/gnu/system/linux.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2013 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2013, 2014 Ludovic Courtès <ludo@gnu.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -21,6 +21,7 @@
#:use-module (guix records)
#:use-module (guix derivations)
#:use-module (guix monads)
+ #:use-module (guix gexp)
#:use-module (ice-9 match)
#:use-module (srfi srfi-1)
#:use-module (srfi srfi-26)
@@ -28,8 +29,8 @@
#:export (pam-service
pam-entry
pam-services->directory
- %pam-other-services
- unix-pam-service))
+ unix-pam-service
+ base-pam-services))
;;; Commentary:
;;;
@@ -58,58 +59,56 @@
(define-record-type* <pam-entry> pam-entry
make-pam-entry
pam-entry?
- (control pam-entry-control) ; string
- (module pam-entry-module) ; file name
- (arguments pam-entry-arguments ; list of strings
+ (control pam-entry-control) ; string
+ (module pam-entry-module) ; file name
+ (arguments pam-entry-arguments ; list of string-valued g-expressions
(default '())))
(define (pam-service->configuration service)
- "Return the configuration string for SERVICE, to be dumped in
-/etc/pam.d/NAME, where NAME is the name of SERVICE."
- (define (entry->string type entry)
+ "Return the derivation building the configuration file for SERVICE, to be
+dumped in /etc/pam.d/NAME, where NAME is the name of SERVICE."
+ (define (entry->gexp type entry)
(match entry
(($ <pam-entry> control module (arguments ...))
- (string-append type " "
- control " " module " "
- (string-join arguments)
- "\n"))))
+ #~(format #t "~a ~a ~a ~a~%"
+ #$type #$control #$module
+ (string-join (list #$@arguments))))))
(match service
(($ <pam-service> name account auth password session)
- (string-concatenate
- (append (map (cut entry->string "account" <>) account)
- (map (cut entry->string "auth" <>) auth)
- (map (cut entry->string "password" <>) password)
- (map (cut entry->string "session" <>) session))))))
+ (define builder
+ #~(begin
+ (with-output-to-file #$output
+ (lambda ()
+ #$@(append (map (cut entry->gexp "account" <>) account)
+ (map (cut entry->gexp "auth" <>) auth)
+ (map (cut entry->gexp "password" <>) password)
+ (map (cut entry->gexp "session" <>) session))
+ #t))))
+
+ (gexp->derivation name builder))))
(define (pam-services->directory services)
"Return the derivation to build the configuration directory to be used as
/etc/pam.d for SERVICES."
(mlet %store-monad
((names -> (map pam-service-name services))
- (files (mapm %store-monad
- (match-lambda
- ((and service ($ <pam-service> name))
- (let ((config (pam-service->configuration service)))
- (text-file (string-append name ".pam") config))))
-
- ;; XXX: Eventually, SERVICES may be a list of monadic
- ;; values instead of plain values.
- (map return services))))
+ (files (sequence %store-monad
+ (map pam-service->configuration
+ ;; XXX: Eventually, SERVICES may be a list of
+ ;; monadic values instead of plain values.
+ services))))
(define builder
- '(begin
- (use-modules (ice-9 match))
+ #~(begin
+ (use-modules (ice-9 match))
- (let ((out (assoc-ref %outputs "out")))
- (mkdir out)
- (for-each (match-lambda
- ((name . file)
- (symlink file (string-append out "/" name))))
- %build-inputs)
- #t)))
+ (mkdir #$output)
+ (for-each (match-lambda
+ ((name file)
+ (symlink file (string-append #$output "/" name))))
+ '#$(zip names files))))
- (derivation-expression "pam.d" builder
- #:inputs (zip names files))))
+ (gexp->derivation "pam.d" builder)))
(define %pam-other-services
;; The "other" PAM configuration, which denies everything (see
@@ -149,7 +148,19 @@ should be the name of a file used as the message-of-the-day."
(pam-entry
(control "optional")
(module "pam_motd.so")
- (arguments (list (string-append "motd=" motd)))))
+ (arguments
+ (list #~(string-append "motd=" #$motd)))))
(list unix))))))))
+(define* (base-pam-services #:key allow-empty-passwords?)
+ "Return the list of basic PAM services everyone would want."
+ (cons %pam-other-services
+ (map (cut unix-pam-service <>
+ #:allow-empty-passwords? allow-empty-passwords?)
+ '("su" "passwd" "sudo"
+ "useradd" "userdel" "usermod"
+ "groupadd" "groupdel" "groupmod"
+ ;; TODO: Add other Shadow programs?
+ ))))
+
;;; linux.scm ends here
diff --git a/gnu/system/shadow.scm b/gnu/system/shadow.scm
index 2a85a20ebb..738816b78f 100644
--- a/gnu/system/shadow.scm
+++ b/gnu/system/shadow.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2013 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2013, 2014 Ludovic Courtès <ludo@gnu.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -17,25 +17,23 @@
;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
(define-module (gnu system shadow)
- #:use-module (guix store)
#:use-module (guix records)
- #:use-module (guix packages)
+ #:use-module (guix gexp)
#:use-module (guix monads)
#:use-module ((gnu packages admin)
#:select (shadow))
#:use-module (gnu packages bash)
- #:use-module (srfi srfi-1)
- #:use-module (ice-9 match)
+ #:use-module (gnu packages guile-wm)
#:export (user-account
user-account?
user-account-name
- user-account-pass
+ user-account-password
user-account-uid
- user-account-gid
+ user-account-group
+ user-account-supplementary-groups
user-account-comment
user-account-home-directory
user-account-shell
- user-account-inputs
user-group
user-group?
@@ -44,9 +42,8 @@
user-group-id
user-group-members
- passwd-file
- group-file
- guix-build-accounts))
+ default-skeletons
+ skeleton-directory))
;;; Commentary:
;;;
@@ -58,68 +55,66 @@
user-account make-user-account
user-account?
(name user-account-name)
- (password user-account-pass (default ""))
- (uid user-account-uid)
- (gid user-account-gid)
+ (password user-account-password (default #f))
+ (uid user-account-uid (default #f))
+ (group user-account-group) ; number | string
+ (supplementary-groups user-account-supplementary-groups
+ (default '())) ; list of strings
(comment user-account-comment (default ""))
(home-directory user-account-home-directory)
- (shell user-account-shell ; monadic value
- (default (package-file bash "bin/bash")))
- (inputs user-account-inputs (default `(("bash" ,bash)))))
+ (shell user-account-shell ; gexp
+ (default #~(string-append #$bash "/bin/bash"))))
(define-record-type* <user-group>
user-group make-user-group
user-group?
(name user-group-name)
(password user-group-password (default #f))
- (id user-group-id)
+ (id user-group-id (default #f))
(members user-group-members (default '())))
-(define (group-file groups)
- "Return a /etc/group file for GROUPS, a list of <user-group> objects."
- (define contents
- (let loop ((groups groups)
- (result '()))
- (match groups
- ((($ <user-group> name _ gid (users ...)) rest ...)
- ;; XXX: Ignore the group password.
- (loop rest
- (cons (string-append name "::" (number->string gid)
- ":" (string-join users ","))
- result)))
- (()
- (string-join (reverse result) "\n" 'suffix)))))
+(define (default-skeletons)
+ "Return the default skeleton files for /etc/skel. These files are copied by
+'useradd' in the home directory of newly created user accounts."
+ (define copy-guile-wm
+ #~(begin
+ (use-modules (guix build utils))
+ (copy-file (car (find-files #$guile-wm "wm-init-sample.scm"))
+ #$output)))
- (text-file "group" contents))
+ (mlet %store-monad ((bashrc (text-file "bashrc" "\
+# Allow non-login shells such as an xterm to get things right.
+test -f /etc/profile && source /etc/profile\n"))
+ (guile-wm (gexp->derivation "guile-wm" copy-guile-wm
+ #:modules
+ '((guix build utils))))
+ (xdefaults (text-file "Xdefaults" "\
+XTerm*utf8: always
+XTerm*metaSendsEscape: true\n"))
+ (gdbinit (text-file "gdbinit" "\
+# Tell GDB where to look for separate debugging files.
+set debug-file-directory ~/.guix-profile/lib/debug\n")))
+ (return `((".bashrc" ,bashrc)
+ (".Xdefaults" ,xdefaults)
+ (".guile-wm" ,guile-wm)
+ (".gdbinit" ,gdbinit)))))
-(define* (passwd-file accounts #:key shadow?)
- "Return a password file for ACCOUNTS, a list of <user-account> objects. If
-SHADOW? is true, then it is a /etc/shadow file, otherwise it is a /etc/passwd
-file."
- ;; XXX: The resulting file is world-readable, so beware when SHADOW? is #t!
- (define (contents)
- (with-monad %store-monad
- (let loop ((accounts accounts)
- (result '()))
- (match accounts
- ((($ <user-account> name pass uid gid comment home-dir mshell)
- rest ...)
- (mlet %store-monad ((shell mshell))
- (loop rest
- (cons (if shadow?
- (string-append name
- ":" ; XXX: use (crypt PASS …)?
- ":::::::")
- (string-append name
- ":" "x"
- ":" (number->string uid)
- ":" (number->string gid)
- ":" comment ":" home-dir ":" shell))
- result))))
- (()
- (return (string-join (reverse result) "\n" 'suffix)))))))
+(define (skeleton-directory skeletons)
+ "Return a directory containing SKELETONS, a list of name/derivation pairs."
+ (gexp->derivation "skel"
+ #~(begin
+ (use-modules (ice-9 match))
- (mlet %store-monad ((contents (contents)))
- (text-file (if shadow? "shadow" "passwd") contents)))
+ (mkdir #$output)
+ (chdir #$output)
+
+ ;; Note: copy the skeletons instead of symlinking
+ ;; them like 'file-union' does, because 'useradd'
+ ;; would just copy the symlinks as is.
+ (for-each (match-lambda
+ ((target source)
+ (copy-file source target)))
+ '#$skeletons)
+ #t)))
;;; shadow.scm ends here
diff --git a/gnu/system/vm.scm b/gnu/system/vm.scm
index 069ac3093a..a15c4c358b 100644
--- a/gnu/system/vm.scm
+++ b/gnu/system/vm.scm
@@ -19,6 +19,7 @@
(define-module (gnu system vm)
#:use-module (guix config)
#:use-module (guix store)
+ #:use-module (guix gexp)
#:use-module (guix derivations)
#:use-module (guix packages)
#:use-module (guix monads)
@@ -41,6 +42,7 @@
#:use-module (gnu system linux)
#:use-module (gnu system linux-initrd)
#:use-module (gnu system grub)
+ #:use-module (gnu system file-systems)
#:use-module (gnu system)
#:use-module (gnu services)
@@ -52,7 +54,8 @@
qemu-image
system-qemu-image
system-qemu-image/shared-store
- system-qemu-image/shared-store-script))
+ system-qemu-image/shared-store-script
+ system-disk-image))
;;; Commentary:
@@ -81,19 +84,34 @@ input tuple. The output file name is when building for SYSTEM."
((input (and (? string?) (? store-path?) file))
(return `(,input . ,file))))))
-;; An alias to circumvent name clashes.
-(define %imported-modules imported-modules)
+(define %linux-vm-file-systems
+ ;; File systems mounted for 'derivation-in-linux-vm'. The store and /xchg
+ ;; directory are shared with the host over 9p.
+ (list (file-system
+ (mount-point (%store-prefix))
+ (device "store")
+ (type "9p")
+ (needed-for-boot? #t)
+ (options "trans=virtio")
+ (check? #f))
+ (file-system
+ (mount-point "/xchg")
+ (device "xchg")
+ (type "9p")
+ (needed-for-boot? #t)
+ (options "trans=virtio")
+ (check? #f))))
(define* (expression->derivation-in-linux-vm name exp
#:key
(system (%current-system))
- (inputs '())
(linux linux-libre)
initrd
(qemu qemu-headless)
(env-vars '())
- (imported-modules
+ (modules
'((guix build vm)
+ (guix build install)
(guix build linux-initrd)
(guix build utils)))
(guile-for-build
@@ -102,222 +120,240 @@ input tuple. The output file name is when building for SYSTEM."
(make-disk-image? #f)
(references-graphs #f)
(memory-size 256)
+ (disk-image-format "qcow2")
(disk-image-size
(* 100 (expt 2 20))))
"Evaluate EXP in a QEMU virtual machine running LINUX with INITRD (a
-derivation). In the virtual machine, EXP has access to all of INPUTS from the
+derivation). In the virtual machine, EXP has access to all its inputs from the
store; it should put its output files in the `/xchg' directory, which is
copied to the derivation's output when the VM terminates. The virtual machine
runs with MEMORY-SIZE MiB of memory.
-When MAKE-DISK-IMAGE? is true, then create a QEMU disk image of
-DISK-IMAGE-SIZE bytes and return it.
+When MAKE-DISK-IMAGE? is true, then create a QEMU disk image of type
+DISK-IMAGE-FORMAT (e.g., 'qcow2' or 'raw'), of DISK-IMAGE-SIZE bytes and
+return it.
-IMPORTED-MODULES is the set of modules imported in the execution environment
-of EXP.
+MODULES is the set of modules imported in the execution environment of EXP.
When REFERENCES-GRAPHS is true, it must be a list of file name/store path
pairs, as for `derivation'. The files containing the reference graphs are
made available under the /xchg CIFS share."
- ;; FIXME: Add #:modules parameter, for the 'use-modules' form.
-
- (define input-alist
- (map input->name+output inputs))
-
- (define builder
- ;; Code that launches the VM that evaluates EXP.
- `(let ()
- (use-modules (guix build utils)
- (guix build vm))
-
- (let ((linux (string-append (assoc-ref %build-inputs "linux")
- "/bzImage"))
- (initrd (string-append (assoc-ref %build-inputs "initrd")
- "/initrd"))
- (loader (assoc-ref %build-inputs "loader"))
- (graphs ',(match references-graphs
- (((graph-files . _) ...) graph-files)
- (_ #f))))
-
- (set-path-environment-variable "PATH" '("bin")
- (map cdr %build-inputs))
-
- (load-in-linux-vm loader
- #:output (assoc-ref %outputs "out")
- #:linux linux #:initrd initrd
- #:memory-size ,memory-size
- #:make-disk-image? ,make-disk-image?
- #:disk-image-size ,disk-image-size
- #:references-graphs graphs))))
-
(mlet* %store-monad
- ((input-alist (sequence %store-monad input-alist))
- (module-dir (%imported-modules imported-modules))
- (compiled (compiled-modules imported-modules))
- (exp* -> `(let ((%build-inputs ',input-alist))
- ,exp))
- (user-builder (text-file "builder-in-linux-vm"
- (object->string exp*)))
- (loader (text-file* "linux-vm-loader" ; XXX: use 'sexp-file'
- "(begin (set! %load-path (cons \""
- module-dir "\" %load-path)) "
- "(set! %load-compiled-path (cons \""
- compiled "\" %load-compiled-path))"
- "(primitive-load \"" user-builder "\"))"))
+ ((module-dir (imported-modules modules))
+ (compiled (compiled-modules modules))
+ (user-builder (gexp->file "builder-in-linux-vm" exp))
+ (loader (gexp->file "linux-vm-loader"
+ #~(begin
+ (set! %load-path
+ (cons #$module-dir %load-path))
+ (set! %load-compiled-path
+ (cons #$compiled
+ %load-compiled-path))
+ (primitive-load #$user-builder))))
(coreutils -> (car (assoc-ref %final-inputs "coreutils")))
(initrd (if initrd ; use the default initrd?
(return initrd)
- (qemu-initrd #:guile-modules-in-chroot? #t
- #:mounts `((9p "store" ,(%store-prefix))
- (9p "xchg" "/xchg")))))
- (inputs (lower-inputs `(("qemu" ,qemu)
- ("linux" ,linux)
- ("initrd" ,initrd)
- ("coreutils" ,coreutils)
- ("builder" ,user-builder)
- ("loader" ,loader)
- ,@inputs))))
- (derivation-expression name builder
- ;; TODO: Require the "kvm" feature.
- #:system system
- #:inputs inputs
- #:env-vars env-vars
- #:modules (delete-duplicates
- `((guix build utils)
- (guix build vm)
- (guix build linux-initrd)
- ,@imported-modules))
- #:guile-for-build guile-for-build
- #:references-graphs references-graphs)))
+ (qemu-initrd %linux-vm-file-systems
+ #:guile-modules-in-chroot? #t))))
+
+ (define builder
+ ;; Code that launches the VM that evaluates EXP.
+ #~(begin
+ (use-modules (guix build utils)
+ (guix build vm))
+
+ (let ((inputs '#$(list qemu coreutils))
+ (linux (string-append #$linux "/bzImage"))
+ (initrd (string-append #$initrd "/initrd"))
+ (loader #$loader)
+ (graphs '#$(match references-graphs
+ (((graph-files . _) ...) graph-files)
+ (_ #f))))
+
+ (set-path-environment-variable "PATH" '("bin") inputs)
+
+ (load-in-linux-vm loader
+ #:output #$output
+ #:linux linux #:initrd initrd
+ #:memory-size #$memory-size
+ #:make-disk-image? #$make-disk-image?
+ #:disk-image-format #$disk-image-format
+ #:disk-image-size #$disk-image-size
+ #:references-graphs graphs))))
+
+ (gexp->derivation name builder
+ ;; TODO: Require the "kvm" feature.
+ #:system system
+ #:env-vars env-vars
+ #:modules modules
+ #:guile-for-build guile-for-build
+ #:references-graphs references-graphs)))
(define* (qemu-image #:key
(name "qemu-image")
(system (%current-system))
+ (qemu qemu-headless)
(disk-image-size (* 100 (expt 2 20)))
+ (disk-image-format "qcow2")
+ (file-system-type "ext4")
grub-configuration
- (initialize-store? #f)
- (populate #f)
+ (register-closures? #t)
(inputs '())
- (inputs-to-copy '()))
- "Return a bootable, stand-alone QEMU image. The returned image is a full
-disk image, with a GRUB installation that uses GRUB-CONFIGURATION as its
-configuration file (GRUB-CONFIGURATION must be the name of a file in the VM.)
-
-INPUTS-TO-COPY is a list of inputs (as for packages) whose closure is copied
-into the image being built. When INITIALIZE-STORE? is true, initialize the
-store database in the image so that Guix can be used in the image.
-
-POPULATE is a list of directives stating directories or symlinks to be created
-in the disk image partition. It is evaluated once the image has been
-populated with INPUTS-TO-COPY. It can be used to provide additional files,
-such as /etc files."
+ copy-inputs?)
+ "Return a bootable, stand-alone QEMU image of type DISK-IMAGE-FORMAT (e.g.,
+'qcow2' or 'raw'), with a root partition of type FILE-SYSTEM-TYPE. The
+returned image is a full disk image, with a GRUB installation that uses
+GRUB-CONFIGURATION as its configuration file (GRUB-CONFIGURATION must be the
+name of a file in the VM.)
+
+INPUTS is a list of inputs (as for packages). When COPY-INPUTS? is true, copy
+all of INPUTS into the image being built. When REGISTER-CLOSURES? is true,
+register INPUTS in the store database of the image so that Guix can be used in
+the image."
(mlet %store-monad
- ((graph (sequence %store-monad
- (map input->name+output inputs-to-copy))))
+ ((graph (sequence %store-monad (map input->name+output inputs))))
(expression->derivation-in-linux-vm
- "qemu-image"
- `(let ()
- (use-modules (guix build vm)
- (guix build utils))
-
- (set-path-environment-variable "PATH" '("bin" "sbin")
- (map cdr %build-inputs))
-
- (let ((graphs ',(match inputs-to-copy
- (((names . _) ...)
- names))))
- (initialize-hard-disk #:grub.cfg ,grub-configuration
- #:closures-to-copy graphs
- #:disk-image-size ,disk-image-size
- #:initialize-store? ,initialize-store?
- #:directives ',populate)
- (reboot)))
+ name
+ #~(begin
+ (use-modules (guix build vm)
+ (guix build utils))
+
+ (let ((inputs
+ '#$(append (list qemu parted grub e2fsprogs util-linux)
+ (map (compose car (cut assoc-ref %final-inputs <>))
+ '("sed" "grep" "coreutils" "findutils" "gawk"))
+ (if register-closures? (list guix) '())))
+
+ ;; This variable is unused but allows us to add INPUTS-TO-COPY
+ ;; as inputs.
+ (to-register
+ '#$(map (match-lambda
+ ((name thing) thing)
+ ((name thing output) `(,thing ,output)))
+ inputs)))
+
+ (set-path-environment-variable "PATH" '("bin" "sbin") inputs)
+
+ (let ((graphs '#$(match inputs
+ (((names . _) ...)
+ names))))
+ (initialize-hard-disk "/dev/vda"
+ #:grub.cfg #$grub-configuration
+ #:closures graphs
+ #:copy-closures? #$copy-inputs?
+ #:register-closures? #$register-closures?
+ #:disk-image-size #$disk-image-size
+ #:file-system-type #$file-system-type)
+ (reboot))))
#:system system
- #:inputs `(("parted" ,parted)
- ("grub" ,grub)
- ("e2fsprogs" ,e2fsprogs)
-
- ;; For shell scripts.
- ("sed" ,(car (assoc-ref %final-inputs "sed")))
- ("grep" ,(car (assoc-ref %final-inputs "grep")))
- ("coreutils" ,(car (assoc-ref %final-inputs "coreutils")))
- ("findutils" ,(car (assoc-ref %final-inputs "findutils")))
- ("gawk" ,(car (assoc-ref %final-inputs "gawk")))
- ("util-linux" ,util-linux)
-
- ,@(if initialize-store?
- `(("guix" ,guix))
- '())
-
- ,@inputs-to-copy)
#:make-disk-image? #t
#:disk-image-size disk-image-size
+ #:disk-image-format disk-image-format
#:references-graphs graph)))
;;;
-;;; Stand-alone VM image.
+;;; VM and disk images.
;;;
-(define (operating-system-build-gid os)
- "Return as a monadic value the group id for build users of OS, or #f."
- (anym %store-monad
- (lambda (service)
- (and (equal? '(guix-daemon)
- (service-provision service))
- (match (service-user-groups service)
- ((group)
- (user-group-id group)))))
- (operating-system-services os)))
-
-(define (operating-system-default-contents os)
- "Return a list of directives suitable for 'system-qemu-image' describing the
-basic contents of the root file system of OS."
- (define (user-directories user)
- (let ((home (user-account-home-directory user))
- ;; XXX: Deal with automatically allocated ids.
- (uid (or (user-account-uid user) 0))
- (gid (or (user-account-gid user) 0))
- (root (string-append "/var/guix/profiles/per-user/"
- (user-account-name user))))
- `((directory ,root ,uid ,gid)
- (directory ,home ,uid ,gid))))
-
- (mlet* %store-monad ((os-drv (operating-system-derivation os))
- (os-dir -> (derivation->output-path os-drv))
- (build-gid (operating-system-build-gid os))
- (profile (operating-system-profile-directory os)))
- (return `((directory ,(%store-prefix) 0 ,(or build-gid 0))
- (directory "/etc")
- (directory "/var/log") ; for dmd
- (directory "/var/run/nscd")
- (directory "/var/guix/gcroots")
- ("/var/guix/gcroots/system" -> ,os-dir)
- (directory "/run")
- ("/run/current-system" -> ,profile)
- (directory "/bin")
- ("/bin/sh" -> "/run/current-system/bin/bash")
- (directory "/tmp")
- (directory "/var/guix/profiles/per-user/root" 0 0)
-
- (directory "/root" 0 0) ; an exception
- ,@(append-map user-directories
- (operating-system-users os))))))
+(define* (system-disk-image os
+ #:key
+ (file-system-type "ext4")
+ (disk-image-size (* 900 (expt 2 20)))
+ (volatile? #t))
+ "Return the derivation of a disk image of DISK-IMAGE-SIZE bytes of the
+system described by OS. Said image can be copied on a USB stick as is. When
+VOLATILE? is true, the root file system is made volatile; this is useful
+to USB sticks meant to be read-only."
+ (define file-systems-to-keep
+ (remove (lambda (fs)
+ (string=? (file-system-mount-point fs) "/"))
+ (operating-system-file-systems os)))
+
+ (let ((os (operating-system (inherit os)
+ ;; Since this is meant to be used on real hardware, don't set up
+ ;; QEMU networking.
+ (initrd (cut qemu-initrd <>
+ #:volatile-root? volatile?
+ #:qemu-networking? #f))
+
+ ;; Force our own root file system.
+ (file-systems (cons (file-system
+ (mount-point "/")
+ (device "/dev/sda1")
+ (type file-system-type))
+ file-systems-to-keep)))))
+
+ (mlet* %store-monad ((os-drv (operating-system-derivation os))
+ (grub.cfg (operating-system-grub.cfg os)))
+ (qemu-image #:grub-configuration grub.cfg
+ #:disk-image-size disk-image-size
+ #:disk-image-format "raw"
+ #:file-system-type file-system-type
+ #:copy-inputs? #t
+ #:register-closures? #t
+ #:inputs `(("system" ,os-drv)
+ ("grub.cfg" ,grub.cfg))))))
(define* (system-qemu-image os
- #:key (disk-image-size (* 900 (expt 2 20))))
- "Return the derivation of a QEMU image of DISK-IMAGE-SIZE bytes of the GNU
-system as described by OS."
- (mlet* %store-monad
- ((os-drv (operating-system-derivation os))
- (os-dir -> (derivation->output-path os-drv))
- (grub.cfg -> (string-append os-dir "/grub.cfg"))
- (populate (operating-system-default-contents os)))
- (qemu-image #:grub-configuration grub.cfg
- #:populate populate
- #:disk-image-size disk-image-size
- #:initialize-store? #t
- #:inputs-to-copy `(("system" ,os-drv)))))
+ #:key
+ (file-system-type "ext4")
+ (disk-image-size (* 900 (expt 2 20))))
+ "Return the derivation of a freestanding QEMU image of DISK-IMAGE-SIZE bytes
+of the GNU system as described by OS."
+ (define file-systems-to-keep
+ ;; Keep only file systems other than root and not normally bound to real
+ ;; devices.
+ (remove (lambda (fs)
+ (let ((target (file-system-mount-point fs))
+ (source (file-system-device fs)))
+ (or (string=? target "/")
+ (string-prefix? "/dev/" source))))
+ (operating-system-file-systems os)))
+
+ (let ((os (operating-system (inherit os)
+ ;; Force our own root file system.
+ (file-systems (cons (file-system
+ (mount-point "/")
+ (device "/dev/sda1")
+ (type file-system-type))
+ file-systems-to-keep)))))
+ (mlet* %store-monad
+ ((os-drv (operating-system-derivation os))
+ (grub.cfg (operating-system-grub.cfg os)))
+ (qemu-image #:grub-configuration grub.cfg
+ #:disk-image-size disk-image-size
+ #:file-system-type file-system-type
+ #:inputs `(("system" ,os-drv)
+ ("grub.cfg" ,grub.cfg))
+ #:copy-inputs? #t))))
+
+(define (virtualized-operating-system os)
+ "Return an operating system based on OS suitable for use in a virtualized
+environment with the store shared with the host."
+ (operating-system (inherit os)
+ (initrd (cut qemu-initrd <> #:volatile-root? #t))
+ (file-systems (cons* (file-system
+ (mount-point "/")
+ (device "/dev/vda1")
+ (type "ext4"))
+ (file-system
+ (mount-point (%store-prefix))
+ (device "store")
+ (type "9p")
+ (needed-for-boot? #t)
+ (options "trans=virtio")
+ (check? #f))
+
+ ;; Remove file systems that conflict with those
+ ;; above, or that are normally bound to real devices.
+ (remove (lambda (fs)
+ (let ((target (file-system-mount-point fs))
+ (source (file-system-device fs)))
+ (or (string=? target (%store-prefix))
+ (string=? target "/")
+ (string-prefix? "/dev/" source))))
+ (operating-system-file-systems os))))))
(define* (system-qemu-image/shared-store
os
@@ -326,13 +362,14 @@ system as described by OS."
with the host."
(mlet* %store-monad
((os-drv (operating-system-derivation os))
- (os-dir -> (derivation->output-path os-drv))
- (grub.cfg -> (string-append os-dir "/grub.cfg"))
- (populate (operating-system-default-contents os)))
- ;; TODO: Initialize the database so Guix can be used in the guest.
+ (grub.cfg (operating-system-grub.cfg os)))
(qemu-image #:grub-configuration grub.cfg
- #:populate populate
- #:disk-image-size disk-image-size)))
+ #:disk-image-size disk-image-size
+ #:inputs `(("system" ,os-drv))
+
+ ;; XXX: Passing #t here is too slow, so let it off by default.
+ #:register-closures? #f
+ #:copy-inputs? #f)))
(define* (system-qemu-image/shared-store-script
os
@@ -341,47 +378,28 @@ with the host."
(graphic? #t))
"Return a derivation that builds a script to run a virtual machine image of
OS that shares its store with the host."
- (let* ((initrd (qemu-initrd #:mounts `((9p "store" ,(%store-prefix)))
- #:volatile-root? #t))
- (os (operating-system (inherit os) (initrd initrd))))
+ (mlet* %store-monad
+ ((os -> (virtualized-operating-system os))
+ (os-drv (operating-system-derivation os))
+ (image (system-qemu-image/shared-store os)))
(define builder
- (mlet %store-monad ((image (system-qemu-image/shared-store os))
- (qemu (package-file qemu
- "bin/qemu-system-x86_64"))
- (bash (package-file bash "bin/sh"))
- (kernel (package-file (operating-system-kernel os)
- "bzImage"))
- (initrd initrd)
- (os-drv (operating-system-derivation os)))
- (return `(let ((out (assoc-ref %outputs "out")))
- (call-with-output-file out
- (lambda (port)
- (display
- (string-append "#!" ,bash "
-exec " ,qemu " -enable-kvm -no-reboot -net nic,model=virtio \
- -virtfs local,path=" ,(%store-prefix) ",security_model=none,mount_tag=store \
+ #~(call-with-output-file #$output
+ (lambda (port)
+ (display
+ (string-append "#!" #$bash "/bin/sh
+exec " #$qemu "/bin/qemu-system-x86_64 -enable-kvm -no-reboot -net nic,model=virtio \
+ -virtfs local,path=" #$(%store-prefix) ",security_model=none,mount_tag=store \
-net user \
- -kernel " ,kernel " -initrd "
- ,(string-append (derivation->output-path initrd) "/initrd") " \
--append \"" ,(if graphic? "" "console=ttyS0 ")
-"--load=" ,(derivation->output-path os-drv) "/boot --root=/dev/vda1\" \
- -drive file=" ,(derivation->output-path image)
+ -kernel " #$(operating-system-kernel os) "/bzImage \
+ -initrd " #$os-drv "/initrd \
+-append \"" #$(if graphic? "" "console=ttyS0 ")
+ "--system=" #$os-drv " --load=" #$os-drv "/boot --root=/dev/vda1\" \
+ -serial stdio \
+ -drive file=" #$image
",if=virtio,cache=writeback,werror=report,readonly\n")
- port)))
- (chmod out #o555)
- #t))))
-
- (mlet %store-monad ((image (system-qemu-image/shared-store os))
- (initrd initrd)
- (qemu (package->derivation qemu))
- (bash (package->derivation bash))
- (os (operating-system-derivation os))
- (builder builder))
- (derivation-expression "run-vm.sh" builder
- #:inputs `(("qemu" ,qemu)
- ("image" ,image)
- ("bash" ,bash)
- ("initrd" ,initrd)
- ("os" ,os))))))
+ port)
+ (chmod port #o555))))
+
+ (gexp->derivation "run-vm.sh" builder)))
;;; vm.scm ends here