From 9fb0bc157268561bc1cef8e27990f119fd123471 Mon Sep 17 00:00:00 2001 From: Cyril Roelandt Date: Thu, 10 Oct 2013 22:48:39 +0200 Subject: gnu: Valgrind: make it work with glibc 2.18. * gnu/packages/patches/valgrind-glibc.patch: update it. --- gnu/packages/patches/valgrind-glibc.patch | 74 ++++--------------------------- 1 file changed, 8 insertions(+), 66 deletions(-) diff --git a/gnu/packages/patches/valgrind-glibc.patch b/gnu/packages/patches/valgrind-glibc.patch index bee1abe71f..0279e37118 100644 --- a/gnu/packages/patches/valgrind-glibc.patch +++ b/gnu/packages/patches/valgrind-glibc.patch @@ -1,64 +1,15 @@ -commit 3781ac11ff374b3517011c1710ec517d52f25cd2 -Author: tom -Date: Mon Jan 14 09:48:49 2013 +0000 - - Accept glibc 2.17 as valid. - - - git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13228 a5019735-40e9-0310-863c-91ae7b9d1cf9 - -diff --git a/configure.in b/configure.in -index e0fb12d..0f3b3df 100644 ---- a/configure.in -+++ b/configure.in -@@ -906,6 +906,13 @@ case "${GLIBC_VERSION}" in +Accept glibc 2.18 as valid. +--- a/configure 2013-10-10 22:27:20.331223000 +0200 ++++ b/configure 2013-10-10 22:27:55.055223000 +0200 +@@ -6604,6 +6604,16 @@ DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}" DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}" ;; -+ 2.17) -+ AC_MSG_RESULT(2.17 family) -+ AC_DEFINE([GLIBC_2_17], 1, [Define to 1 if you're using glibc 2.17.x]) -+ DEFAULT_SUPP="glibc-2.X.supp ${DEFAULT_SUPP}" -+ DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}" -+ DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}" -+ ;; - darwin) - AC_MSG_RESULT(Darwin) - AC_DEFINE([DARWIN_LIBC], 1, [Define to 1 if you're using Darwin]) -@@ -919,7 +926,7 @@ case "${GLIBC_VERSION}" in - - *) - AC_MSG_RESULT([unsupported version ${GLIBC_VERSION}]) -- AC_MSG_ERROR([Valgrind requires glibc version 2.2 - 2.16]) -+ AC_MSG_ERROR([Valgrind requires glibc version 2.2 - 2.17]) - AC_MSG_ERROR([or Darwin libc]) - ;; - esac -diff -ur valgrind-3.8.1/config.h.in valgrind-3.8.1/config.h.in ---- valgrind-3.8.1/config.h.in 2013-01-16 17:15:33.531018561 +0100 -+++ valgrind-3.8.1/config.h.in 2013-01-16 17:19:21.000000000 +0100 -@@ -48,6 +48,9 @@ - /* Define to 1 if you're using glibc 2.16.x */ - #undef GLIBC_2_16 - -+/* Define to 1 if you're using glibc 2.17.x */ -+#undef GLIBC_2_17 ++ 2.18) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: 2.18 family" >&5 ++$as_echo "2.18 family" >&6; } + - /* Define to 1 if you're using glibc 2.2.x */ - #undef GLIBC_2_2 - -diff -ur valgrind-3.8.1/configure valgrind-3.8.1/configure ---- valgrind-3.8.1/configure 2013-01-16 17:15:33.563018480 +0100 -+++ valgrind-3.8.1/configure 2013-01-16 17:19:21.373643238 +0100 -@@ -6610,6 +6610,16 @@ - DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}" - DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}" - ;; -+ 2.17) -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: 2.17 family" >&5 -+$as_echo "2.17 family" >&6; } -+ -+$as_echo "#define GLIBC_2_17 1" >>confdefs.h ++$as_echo "#define GLIBC_2_18 1" >>confdefs.h + + DEFAULT_SUPP="glibc-2.X.supp ${DEFAULT_SUPP}" + DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}" @@ -67,12 +18,3 @@ diff -ur valgrind-3.8.1/configure valgrind-3.8.1/configure darwin) { $as_echo "$as_me:${as_lineno-$LINENO}: result: Darwin" >&5 $as_echo "Darwin" >&6; } -@@ -6630,7 +6640,7 @@ - *) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported version ${GLIBC_VERSION}" >&5 - $as_echo "unsupported version ${GLIBC_VERSION}" >&6; } -- as_fn_error "Valgrind requires glibc version 2.2 - 2.16" "$LINENO" 5 -+ as_fn_error "Valgrind requires glibc version 2.2 - 2.17" "$LINENO" 5 - as_fn_error "or Darwin libc" "$LINENO" 5 - ;; - esac -- cgit v1.2.3 From f349fa02def606e20e8e33e76b847b13038612c6 Mon Sep 17 00:00:00 2001 From: Nikita Karetnikov Date: Thu, 10 Oct 2013 10:32:15 +0000 Subject: gnu: Add GNU acct. * gnu/packages/acct.scm: New file. * gnu-system.am (GNU_SYSTEM_MODULES): Add it. --- gnu-system.am | 1 + gnu/packages/acct.scm | 44 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 45 insertions(+) create mode 100644 gnu/packages/acct.scm diff --git a/gnu-system.am b/gnu-system.am index 37a174cbca..0132187062 100644 --- a/gnu-system.am +++ b/gnu-system.am @@ -22,6 +22,7 @@ GNU_SYSTEM_MODULES = \ gnu/packages.scm \ + gnu/packages/acct.scm \ gnu/packages/acl.scm \ gnu/packages/algebra.scm \ gnu/packages/apr.scm \ diff --git a/gnu/packages/acct.scm b/gnu/packages/acct.scm new file mode 100644 index 0000000000..e892fd8484 --- /dev/null +++ b/gnu/packages/acct.scm @@ -0,0 +1,44 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2013 Nikita Karetnikov +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see . + +(define-module (gnu packages acct) + #:use-module (guix licenses) + #:use-module (guix packages) + #:use-module (guix download) + #:use-module (guix build-system gnu)) + +(define-public acct + (package + (name "acct") + (version "6.6.1") + (source + (origin + (method url-fetch) + (uri (string-append "mirror://gnu/acct/acct-" + version ".tar.gz")) + (sha256 + (base32 + "1jzz601cavml7894fjalw661gz28ia35002inw990agr3rhiaiam")))) + (build-system gnu-build-system) + (home-page "https://gnu.org/software/acct/") + (synopsis "Standard login and process accounting utilities") + (description + "GNU acct provides a means for system administrators to determine +system usage patterns. It provides information on, for example, connections, +programs executed, and system resources used.") + (license gpl3+))) -- cgit v1.2.3 From 1a75f8d9391cc61eebccbecd9c2996022d561051 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Fri, 11 Oct 2013 22:02:33 +0200 Subject: gnu-maintenance: Adjust URL of package description file. * guix/gnu-maintenance.scm (%package-description-url): Adjust to the new URL. --- guix/gnu-maintenance.scm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/guix/gnu-maintenance.scm b/guix/gnu-maintenance.scm index 1b767f35ac..3dd8874985 100644 --- a/guix/gnu-maintenance.scm +++ b/guix/gnu-maintenance.scm @@ -86,7 +86,7 @@ (define %package-description-url ;; This file contains package descriptions in recutils format. ;; See . (string->uri - (string-append %gnumaint-base-url "pkgdescr.txt?root=womb"))) + (string-append %gnumaint-base-url "pkgblurbs.txt?root=womb"))) (define-record-type* gnu-package-descriptor -- cgit v1.2.3 From 5151c2e1f472bb27fdf5f68256d0ccc7707316cd Mon Sep 17 00:00:00 2001 From: Arne Babenhauserheide Date: Fri, 11 Oct 2013 22:16:50 +0200 Subject: gnu: Add Mercurial. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/packages/version-control.scm (mercurial): New variable. Signed-off-by: Ludovic Courtès --- gnu/packages/version-control.scm | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm index 30660e830f..c23e742e7d 100644 --- a/gnu/packages/version-control.scm +++ b/gnu/packages/version-control.scm @@ -180,6 +180,33 @@ (define-public git (license gpl2) (home-page "http://git-scm.com/"))) +(define-public mercurial + (package + (name "mercurial") + (version "2.7.1") + (source (origin + (method url-fetch) + (uri (string-append "http://mercurial.selenic.com/release/mercurial-" + version ".tar.gz")) + (sha256 + (base32 + "121m8f7vmipmdg00cnzdz2rjkgydh28mwfirqkrbs5fv089vywl4")))) + (build-system python-build-system) + (arguments + `(;; Restrict to Python 2, as Python 3 would require + ;; the argument --c2to3. + #:python ,python-2 + ;; FIXME: Disabled tests because they require the nose unit + ;; testing framework: https://nose.readthedocs.org/en/latest/ . + #:tests? #f)) + (home-page "http://mercurial.selenic.com") + (synopsis "Decentralized version control system") + (description + "Mercurial is a free, distributed source control management tool. +It efficiently handles projects of any size +and offers an easy and intuitive interface.") + (license gpl2+))) + (define-public subversion (package (name "subversion") -- cgit v1.2.3 From 1e9ed0e3dcbdb19f18741a0ef811a4491ffbbea5 Mon Sep 17 00:00:00 2001 From: Andreas Enge Date: Sat, 12 Oct 2013 14:48:52 +0200 Subject: gnu: Add Qt 4.8.5. * gnu/packages/qt.scm (qt-4): New variable. * gnu/packages/patches/qt4-tests.patch: New file, patch dropping tests requiring a running X server. --- gnu/packages/patches/qt4-tests.patch | 22 ++++++++++++++++++ gnu/packages/qt.scm | 43 ++++++++++++++++++++++++++++++++++++ 2 files changed, 65 insertions(+) create mode 100644 gnu/packages/patches/qt4-tests.patch diff --git a/gnu/packages/patches/qt4-tests.patch b/gnu/packages/patches/qt4-tests.patch new file mode 100644 index 0000000000..eb499ec76a --- /dev/null +++ b/gnu/packages/patches/qt4-tests.patch @@ -0,0 +1,22 @@ +Drop tests requiring a running X server, but not starting any. + +diff -ru qt-everywhere-opensource-src-4.8.5.orig/src/3rdparty/webkit/Source/WebKit/qt/tests/tests.pro qt-everywhere-opensource-src-4.8.5/src/3rdparty/webkit/Source/WebKit/qt/tests/tests.pro +--- qt-everywhere-opensource-src-4.8.5.orig/src/3rdparty/webkit/Source/WebKit/qt/tests/tests.pro 2013-10-12 13:15:47.000000000 +0200 ++++ qt-everywhere-opensource-src-4.8.5/src/3rdparty/webkit/Source/WebKit/qt/tests/tests.pro 2013-10-12 13:20:15.000000000 +0200 +@@ -1,15 +1,4 @@ + + TEMPLATE = subdirs +-SUBDIRS = qwebframe qwebpage qwebelement qgraphicswebview qwebhistoryinterface qwebview qwebhistory qwebinspector hybridPixmap ++SUBDIRS = + +-linux-* { +- # This test bypasses the library and links the tested code's object itself. +- # This stresses the build system in some corners so we only run it on linux. +- SUBDIRS += MIMESniffing +-} +- +-contains(QT_CONFIG, declarative): SUBDIRS += qdeclarativewebview +-SUBDIRS += benchmarks/painting benchmarks/loading +-contains(DEFINES, ENABLE_WEBGL=1) { +- SUBDIRS += benchmarks/webgl +-} diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm index be953e2452..07bb4fdd39 100644 --- a/gnu/packages/qt.scm +++ b/gnu/packages/qt.scm @@ -21,6 +21,7 @@ (define-module (gnu packages qt) #: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 compression) #:use-module (gnu packages fontutils) @@ -139,3 +140,45 @@ (define-public qt (description "Qt is a cross-platform application and UI framework for developers using C++ or QML, a CSS & JavaScript like language.") (license lgpl2.1))) + +(define-public qt-4 + (package (inherit qt) + (version "4.8.5") + (source (origin + (method url-fetch) + (uri (string-append "http://download.qt-project.org/official_releases/qt/" + (string-copy version 0 (string-rindex version #\.)) + "/" version + "/single/qt-everywhere-opensource-src-" + version ".tar.gz")) + (sha256 + (base32 + "0f51dbgn1dcck8pqimls2qyf1pfmsmyknh767cvw87c3d218ywpb")) + (patches (list (search-patch "qt4-tests.patch"))))) + (arguments + `(#:phases + (alist-replace + 'configure + (lambda* (#:key outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out"))) + (substitute* '("configure") + (("/bin/pwd") (which "pwd"))) + ;; do not pass "--enable-fast-install", which makes the + ;; configure process fail + (zero? (system* "./configure" + "-verbose" + "-prefix" out + "-opensource" + "-confirm-license" + ;; drop all special machine instructions + "-no-mmx" + "-no-3dnow" + "-no-sse" + "-no-sse2" + "-no-sse3" + "-no-ssse3" + "-no-sse4.1" + "-no-sse4.2" + "-no-avx" + "-no-neon")))) + %standard-phases))))) -- cgit v1.2.3 From f854a8c13341f0f5079380c3f8fa570cbb0d2636 Mon Sep 17 00:00:00 2001 From: Andreas Enge Date: Sat, 12 Oct 2013 19:43:27 +0200 Subject: gnu: Add gp2c. * gnu/packages/algebra.scm (gp2c): New variable. --- gnu/packages/algebra.scm | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/gnu/packages/algebra.scm b/gnu/packages/algebra.scm index b70dd91099..9cc079d498 100644 --- a/gnu/packages/algebra.scm +++ b/gnu/packages/algebra.scm @@ -125,6 +125,38 @@ (define-public pari-gp (license gpl2+) (home-page "http://pari.math.u-bordeaux.fr/"))) +(define-public gp2c + (package + (name "gp2c") + (version "0.0.8") + (source (origin + (method url-fetch) + (uri (string-append + "http://pari.math.u-bordeaux.fr/pub/pari/GP2C/gp2c-" + version ".tar.gz")) + (sha256 (base32 + "03fgiwy2si264g3zfgw2yi6i2l8szl5m106zgwk77sddshk20b34")))) + (build-system gnu-build-system) + (inputs `(("pari-gp" ,pari-gp))) + (arguments + '(#:configure-flags + (list (string-append "--with-paricfg=" + (assoc-ref %build-inputs "pari-gp") + "/lib/pari/pari.cfg")))) + (synopsis "PARI/GP, a computer algebra system for number theory") + (description + "PARI/GP is a widely used computer algebra system designed for fast +computations in number theory (factorisations, algebraic number theory, +elliptic curves...), but it also contains a large number of other useful +functions to compute with mathematical entities such as matrices, +polynomials, power series, algebraic numbers, etc., and a lot of +transcendental functions. +PARI is also available as a C library to allow for faster computations. + +GP2C, the GP to C compiler, translates GP scripts to PARI programs.") + (license gpl2) + (home-page "http://pari.math.u-bordeaux.fr/"))) + (define-public bc (package (name "bc") -- cgit v1.2.3 From 39e9f95d059e61a735a52f866d4c175906826744 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Sat, 12 Oct 2013 16:37:28 +0200 Subject: guix: Add missing call to 'bindtextdomain'. * scripts/guix.in (config-lookup): Add "localedir" entry. (run-guix-main): Add call to 'bindtextdomain'. * guix/ui.scm (initialize-guix): Use %GETTEXT-DOMAIN instead of a literal. --- guix/ui.scm | 2 +- scripts/guix.in | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/guix/ui.scm b/guix/ui.scm index 4415997252..7f8ed970d4 100644 --- a/guix/ui.scm +++ b/guix/ui.scm @@ -123,7 +123,7 @@ (define (install-locale) (define (initialize-guix) "Perform the usual initialization for stand-alone Guix commands." (install-locale) - (textdomain "guix") + (textdomain %gettext-domain) ;; Ignore SIGPIPE. If the daemon closes the connection, we prefer to be ;; notified via an EPIPE later. diff --git a/scripts/guix.in b/scripts/guix.in index c99e866361..673036f6cb 100644 --- a/scripts/guix.in +++ b/scripts/guix.in @@ -31,7 +31,8 @@ (define config-lookup (let ((config '(("prefix" . "@prefix@") ("datarootdir" . "@datarootdir@") - ("guilemoduledir" . "@guilemoduledir@"))) + ("guilemoduledir" . "@guilemoduledir@") + ("localedir" . "@localedir@"))) (var-ref-regexp (make-regexp "\\$\\{([a-z]+)\\}"))) (define (expand-var-ref match) (lookup (match:substring match 1))) @@ -58,6 +59,7 @@ (define (run-guix-main) (let ((guix-main (module-ref (resolve-interface '(guix ui)) 'guix-main))) + (bindtextdomain "guix" (config-lookup "localedir")) (apply guix-main (command-line)))) (maybe-augment-load-paths!) -- cgit v1.2.3 From d8907ac43f4bf3314fe3d053e6760de61e8e4a38 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Sat, 12 Oct 2013 16:39:10 +0200 Subject: download: Support 'file://' URLs. * guix/download.scm (download-to-store): When URL has a 'file' scheme or no scheme, use 'add-to-store' directly. --- guix/download.scm | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/guix/download.scm b/guix/download.scm index 03c2f8066f..837ff0e683 100644 --- a/guix/download.scm +++ b/guix/download.scm @@ -24,6 +24,7 @@ (define-module (guix download) #:use-module ((guix store) #:select (derivation-path? add-to-store)) #:use-module ((guix build download) #:renamer (symbol-prefix-proc 'build:)) #:use-module (guix utils) + #:use-module (web uri) #:use-module (srfi srfi-1) #:use-module (srfi srfi-26) #:export (%mirrors @@ -244,13 +245,18 @@ (define* (download-to-store store url #:optional (name (basename url)) #:key (log (current-error-port))) "Download from URL to STORE, either under NAME or URL's basename if omitted. Write progress reports to LOG." - (call-with-temporary-output-file - (lambda (temp port) - (let ((result - (parameterize ((current-output-port log)) - (build:url-fetch url temp #:mirrors %mirrors)))) - (close port) - (and result - (add-to-store store name #f "sha256" temp)))))) + (define uri + (string->uri url)) + + (if (memq (uri-scheme uri) '(file #f)) + (add-to-store store name #f "sha256" (uri-path uri)) + (call-with-temporary-output-file + (lambda (temp port) + (let ((result + (parameterize ((current-output-port log)) + (build:url-fetch url temp #:mirrors %mirrors)))) + (close port) + (and result + (add-to-store store name #f "sha256" temp))))))) ;;; download.scm ends here -- cgit v1.2.3 From 0ad7da1e90d479fa82dbb0cabf858e1b7a120c9d Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Sat, 12 Oct 2013 17:14:41 +0200 Subject: pull: Add '--url' option. * guix/scripts/pull.scm (%default-options): Add 'tarball-url' pair. (%options, show-help): Add '--url'. (guix-pull): Honor it. --- guix/scripts/pull.scm | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/guix/scripts/pull.scm b/guix/scripts/pull.scm index 023b83e6a3..1ee1c91142 100644 --- a/guix/scripts/pull.scm +++ b/guix/scripts/pull.scm @@ -137,13 +137,15 @@ (define builder (define %default-options ;; Alist of default option values. - '()) + `((tarball-url . ,%snapshot-url))) (define (show-help) (display (_ "Usage: guix pull [OPTION]... Download and deploy the latest version of Guix.\n")) (display (_ " --verbose produce verbose output")) + (display (_ " + --url=URL download the Guix tarball from URL")) (display (_ " --bootstrap use the bootstrap Guile to build the new Guix")) (newline) @@ -159,6 +161,10 @@ (define %options (list (option '("verbose") #f #f (lambda (opt name arg result) (alist-cons 'verbose? #t result))) + (option '("url") #t #f + (lambda (opt name arg result) + (alist-cons 'tarball-url arg + (alist-delete 'tarball-url result)))) (option '("bootstrap") #f #f (lambda (opt name arg result) (alist-cons 'bootstrap? #t result))) @@ -182,10 +188,10 @@ (define (parse-options) %default-options)) (with-error-handling - (let ((opts (parse-options)) - (store (open-connection))) - (let ((tarball (download-to-store store %snapshot-url - "guix-latest.tar.gz"))) + (let* ((opts (parse-options)) + (store (open-connection)) + (url (assoc-ref opts 'tarball-url))) + (let ((tarball (download-to-store store url "guix-latest.tar.gz"))) (unless tarball (leave (_ "failed to download up-to-date source, exiting\n"))) (parameterize ((%guile-for-build -- cgit v1.2.3 From b421cebd6adbbadf6ad9aa000ca6605b1a4b2380 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Sat, 12 Oct 2013 22:28:15 +0200 Subject: build-system/perl: Lazily resolve (gnu packages perl). * guix/build-system/perl.scm (default-perl): New procedure. (perl-build): Use it. --- guix/build-system/perl.scm | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/guix/build-system/perl.scm b/guix/build-system/perl.scm index 6661689efb..eac8f53d3e 100644 --- a/guix/build-system/perl.scm +++ b/guix/build-system/perl.scm @@ -35,9 +35,16 @@ (define-module (guix build-system perl) ;; ;; Code: +(define (default-perl) + "Return the default Perl package." + + ;; Do not use `@' to avoid introducing circular dependencies. + (let ((module (resolve-interface '(gnu packages perl)))) + (module-ref module 'perl))) + (define* (perl-build store name source inputs #:key - (perl (@ (gnu packages perl) perl)) + (perl (default-perl)) (search-paths '()) (tests? #t) (make-maker-flags ''()) -- cgit v1.2.3 From b646c3dd377210504a1a3ea5a963f3502011465e Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Sat, 12 Oct 2013 22:28:59 +0200 Subject: gnu: qemu-with-multiple-smb-shares: Fix typo. * gnu/packages/qemu.scm (qemu/smb-shares): Turn 'patches' into a list. --- gnu/packages/qemu.scm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gnu/packages/qemu.scm b/gnu/packages/qemu.scm index 791aa715c8..8efde67595 100644 --- a/gnu/packages/qemu.scm +++ b/gnu/packages/qemu.scm @@ -135,4 +135,5 @@ (define-public qemu/smb-shares (package (inherit qemu) (name "qemu-with-multiple-smb-shares") (source (origin (inherit (package-source qemu)) - (patches (search-patch "qemu-multiple-smb-shares.patch")))))) + (patches + (list (search-patch "qemu-multiple-smb-shares.patch"))))))) -- cgit v1.2.3 From 8ab00475fba76b665ebe2ca0a6566fcb6af5373d Mon Sep 17 00:00:00 2001 From: Andreas Enge Date: Sat, 12 Oct 2013 23:34:22 +0200 Subject: gnu: qt: Add patch to distribution. * gnu-system.am (dist_patch_DATA): Add qt patch. --- gnu-system.am | 1 + 1 file changed, 1 insertion(+) diff --git a/gnu-system.am b/gnu-system.am index 0132187062..227415e7d1 100644 --- a/gnu-system.am +++ b/gnu-system.am @@ -237,6 +237,7 @@ dist_patch_DATA = \ gnu/packages/patches/procps-make-3.82.patch \ gnu/packages/patches/python-fix-dbm.patch \ gnu/packages/patches/qemu-multiple-smb-shares.patch \ + gnu/packages/patches/qt4-tests.patch \ gnu/packages/patches/readline-link-ncurses.patch \ gnu/packages/patches/ripperx-libm.patch \ gnu/packages/patches/scheme48-tests.patch \ -- cgit v1.2.3 From ab5d72ad2b2448542adcbb0f2dc89245b77e3087 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Sat, 12 Oct 2013 23:23:41 +0200 Subject: doc: Document "guix pull --url". * doc/guix.texi (Invoking guix pull): Add --url. --- doc/guix.texi | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/doc/guix.texi b/doc/guix.texi index ceb8046aca..9633f90559 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -880,6 +880,12 @@ but it supports the following options: @item --verbose Produce verbose output, writing build logs to the standard error output. +@item --url=@var{url} +Download the source tarball of Guix from @var{url}. + +By default, the tarball is taken from its canonical address at +@code{gnu.org}, for the stable branch of Guix. + @item --bootstrap Use the bootstrap Guile to build the latest Guix. This option is only useful to Guix developers. -- cgit v1.2.3 From 52af657aee4430c13af93829ca10b2239a9956b9 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Sat, 12 Oct 2013 23:45:57 +0200 Subject: pull: Simplify the builder. * guix/scripts/pull.scm (unpack)[builder]: Use 'copy-recursively' and 'copy-file' instead of 'file-system-fold'. --- guix/scripts/pull.scm | 26 +++++--------------------- 1 file changed, 5 insertions(+), 21 deletions(-) diff --git a/guix/scripts/pull.scm b/guix/scripts/pull.scm index 1ee1c91142..a93343ceef 100644 --- a/guix/scripts/pull.scm +++ b/guix/scripts/pull.scm @@ -47,6 +47,8 @@ (define builder (ice-9 ftw) (ice-9 match)) + (setvbuf (current-output-port) _IOLBF) + (setvbuf (current-error-port) _IOLBF) (let ((out (assoc-ref %outputs "out")) (tar (assoc-ref %build-inputs "tar")) (gzip (assoc-ref %build-inputs "gzip")) @@ -66,27 +68,9 @@ (define builder (format #t "copying and compiling Guix to `~a'...~%" out) ;; Copy everything under guix/ and gnu/ plus guix.scm. - (file-system-fold (lambda (dir stat result) ; enter? - (or (string-prefix? "./guix" dir) - (string-prefix? "./gnu" dir) - (string=? "." dir))) - (lambda (file stat result) ; leaf - (when (or (not (string=? (dirname file) ".")) - (string=? (basename file) "guix.scm")) - (let ((target (string-drop file 1))) - (copy-file file - (string-append out target))))) - (lambda (dir stat result) ; down - (mkdir (string-append out - (string-drop dir 1)))) - (const #t) ; up - (const #t) ; skip - (lambda (file stat errno result) - (error "cannot access file" - file (strerror errno))) - #f - "." - lstat) + (copy-recursively "guix" (string-append out "/guix")) + (copy-recursively "gnu" (string-append out "/gnu")) + (copy-file "guix.scm" (string-append out "/guix.scm")) ;; Add a fake (guix config) module to allow the other modules to be ;; compiled. The user's (guix config) is the one that will be used. -- cgit v1.2.3 From a58a7c926b96a49263cf72f6b94b5c147581b2a3 Mon Sep 17 00:00:00 2001 From: Andreas Enge Date: Sun, 13 Oct 2013 13:03:09 +0200 Subject: gnu: gtk+: Update to 3.10.1. * gnu/packages/gtk.scm (gtk+): Update to 3.10.1, drop no longer needed configure flag. --- gnu/packages/gtk.scm | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/gnu/packages/gtk.scm b/gnu/packages/gtk.scm index 5e27c151c2..b120dc92f8 100644 --- a/gnu/packages/gtk.scm +++ b/gnu/packages/gtk.scm @@ -287,7 +287,7 @@ (define-public gtk+-2 (define-public gtk+ (package (inherit gtk+-2) - (version "3.10.0") + (version "3.10.1") (source (origin (method url-fetch) (uri (string-append "mirror://gnome/sources/gtk+/" @@ -295,7 +295,7 @@ (define-public gtk+ version ".tar.xz")) (sha256 (base32 - "1zjkbjvp6ay08107r6zfsrp39x7qfadbd86p3hs5v4ydc2rzwnb5")))) + "1f3a7r3z7i9xh5imlfpfcgyydzkj2fnd0v6ylvqxij0yzfbnhbn1")))) (propagated-inputs `(("at-spi2-atk" ,at-spi2-atk) ("atk" ,atk) @@ -310,8 +310,7 @@ (define-public gtk+ ("python-wrapper" ,python-wrapper) ("xorg-server" ,xorg-server))) (arguments - `(#:configure-flags '("--enable-x11-backend") ; should not be needed in > 3.10.0 - #:phases + `(#:phases (alist-replace 'configure (lambda* (#:key #:allow-other-keys #:rest args) -- cgit v1.2.3 From 487da565703c34ae3b57977b0b6e31dada77a129 Mon Sep 17 00:00:00 2001 From: Andreas Enge Date: Sun, 13 Oct 2013 16:26:12 +0200 Subject: gnu: gsl: Update to 1.16. * gnu/packages/maths.scm (gsl): Update to 1.16, disable parallel tests leading to a failure in vector. --- gnu/packages/maths.scm | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm index 4ff7143f86..a76220a052 100644 --- a/gnu/packages/maths.scm +++ b/gnu/packages/maths.scm @@ -55,7 +55,7 @@ (define-public units (define-public gsl (package (name "gsl") - (version "1.15") + (version "1.16") (source (origin (method url-fetch) @@ -63,10 +63,11 @@ (define-public gsl version ".tar.gz")) (sha256 (base32 - "18qf6jzz1r3mzb5qynywv4xx3z9g61hgkbpkdrhbgqh2g7jhgfc5")))) + "0lrgipi0z6559jqh82yx8n4xgnxkhzj46v96dl77hahdp58jzg3k")))) (build-system gnu-build-system) (arguments - `(#:phases + `(#:parallel-tests? #f + #:phases (alist-replace 'configure (lambda* (#:key target system outputs #:allow-other-keys #:rest args) -- cgit v1.2.3 From 6eac909b459301912becb854c112532ee3fd7cc3 Mon Sep 17 00:00:00 2001 From: Andreas Enge Date: Sun, 13 Oct 2013 17:00:18 +0200 Subject: gnu: cmake: Update patch to work with new system. * gnu/packages/patches/cmake-fix-tests.patch: Update to work with -p1. * gnu/packages/cmake.scm (cmake): Drop patch flag -p0. --- gnu/packages/cmake.scm | 1 - gnu/packages/patches/cmake-fix-tests.patch | 8 ++++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/gnu/packages/cmake.scm b/gnu/packages/cmake.scm index 0717529fcd..c80bc2eb6a 100644 --- a/gnu/packages/cmake.scm +++ b/gnu/packages/cmake.scm @@ -41,7 +41,6 @@ (define-public cmake (build-system gnu-build-system) (arguments '(#:test-target "test" - #:patch-flags '("-p0") #:phases (alist-replace 'configure (lambda* (#:key outputs #:allow-other-keys) diff --git a/gnu/packages/patches/cmake-fix-tests.patch b/gnu/packages/patches/cmake-fix-tests.patch index ae28ca336b..5327f3749a 100644 --- a/gnu/packages/patches/cmake-fix-tests.patch +++ b/gnu/packages/patches/cmake-fix-tests.patch @@ -1,5 +1,5 @@ ---- Tests/CMakeLists.txt 2013-03-20 22:57:13.000000000 +0100 -+++ Tests/CMakeLists.txt 2013-03-20 22:58:02.000000000 +0100 +--- a/Tests/CMakeLists.txt 2013-03-20 22:57:13.000000000 +0100 ++++ b/Tests/CMakeLists.txt 2013-03-20 22:58:02.000000000 +0100 @@ -1706,16 +1706,17 @@ PASS_REGULAR_EXPRESSION "Could not find executable" FAIL_REGULAR_EXPRESSION "SegFault") @@ -28,8 +28,8 @@ configure_file( "${CMake_SOURCE_DIR}/Tests/CTestTestConfigFileInBuildDir/test1.cmake.in" ---- Utilities/cmcurl/CMakeLists.txt 2013-03-20 22:57:13.000000000 +0100 -+++ Utilities/cmcurl/CMakeLists.txt 2013-03-20 23:08:41.000000000 +0100 +--- a/Utilities/cmcurl/CMakeLists.txt 2013-03-20 22:57:13.000000000 +0100 ++++ b/Utilities/cmcurl/CMakeLists.txt 2013-03-20 23:08:41.000000000 +0100 @@ -729,8 +729,9 @@ ADD_EXECUTABLE(LIBCURL Testing/curltest.c) TARGET_LINK_LIBRARIES(LIBCURL cmcurl ${CMAKE_DL_LIBS}) -- cgit v1.2.3 From e78fd4ca636a19bc286747f8d91bda22cd8f08fd Mon Sep 17 00:00:00 2001 From: Andreas Enge Date: Sun, 13 Oct 2013 18:02:49 +0200 Subject: guix: Make cmake build system aware of usual paths. * guix/build/cmake-build-system.scm (configure): Set CMAKE_LIBRARY_PATH to LIBRARY_PATH and CMAKE_INCLUDE_PATH to CPATH. --- guix/build/cmake-build-system.scm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/guix/build/cmake-build-system.scm b/guix/build/cmake-build-system.scm index 877d8110d7..449c609398 100644 --- a/guix/build/cmake-build-system.scm +++ b/guix/build/cmake-build-system.scm @@ -38,6 +38,8 @@ (define* (configure #:key outputs (configure-flags '()) (if (file-exists? "CMakeLists.txt") (let ((args `(,(string-append "-DCMAKE_INSTALL_PREFIX=" out) ,@configure-flags))) + (setenv "CMAKE_LIBRARY_PATH" (getenv "LIBRARY_PATH")) + (setenv "CMAKE_INCLUDE_PATH" (getenv "CPATH")) (format #t "running 'cmake' with arguments ~s~%" args) (zero? (apply system* "cmake" args))) (error "no CMakeLists.txt found")))) -- cgit v1.2.3 From 973d9f1d1cf58b181064b6a2f14fd6dd00d36ddd Mon Sep 17 00:00:00 2001 From: Andreas Enge Date: Sun, 13 Oct 2013 18:16:36 +0200 Subject: gnu: kde: Add module and automoc4 package. * gnu/packages/kde.scm: New file. * gnu-system.am (GNU_SYSTEM_MODULES): Add it. --- gnu-system.am | 1 + gnu/packages/kde.scm | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 47 insertions(+) create mode 100644 gnu/packages/kde.scm diff --git a/gnu-system.am b/gnu-system.am index 227415e7d1..9f5a89700a 100644 --- a/gnu-system.am +++ b/gnu-system.am @@ -93,6 +93,7 @@ GNU_SYSTEM_MODULES = \ gnu/packages/imagemagick.scm \ gnu/packages/indent.scm \ gnu/packages/irssi.scm \ + gnu/packages/kde.scm \ gnu/packages/ld-wrapper.scm \ gnu/packages/less.scm \ gnu/packages/lesstif.scm \ diff --git a/gnu/packages/kde.scm b/gnu/packages/kde.scm new file mode 100644 index 0000000000..3da261ccd1 --- /dev/null +++ b/gnu/packages/kde.scm @@ -0,0 +1,46 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2013 Andreas Enge +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see . + +(define-module (gnu packages kde) + #:use-module ((guix licenses) #:select (bsd-2)) + #:use-module (guix packages) + #:use-module (guix download) + #:use-module (guix build-system cmake) + #:use-module (gnu packages qt)) + +(define-public automoc4 + (package + (name "automoc4") + (version "0.9.88") + (source (origin + (method url-fetch) + (uri (string-append "http://download.kde.org/stable/" name + "/" version "/" name "-" + version ".tar.bz2")) + (sha256 + (base32 + "0jackvg0bdjg797qlbbyf9syylm0qjs55mllhn11vqjsq3s1ch93")))) + (build-system cmake-build-system) + (inputs + `(("qt" ,qt-4))) + (arguments + `(#:tests? #f)) ; no check target + (home-page "http://techbase.kde.org/Development/Tools/Automoc4") + (synopsis "build tool for KDE") + (description "KDE desktop environment") + (license bsd-2))) -- cgit v1.2.3 From 178f77b2d20ecb371110b76703db031285a6b65e Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Sun, 13 Oct 2013 22:22:42 +0200 Subject: pull: Compile modules correctly regardless of the compilation order. * guix/scripts/pull.scm (unpack)[builder]: Work around . --- guix/scripts/pull.scm | 56 ++++++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 46 insertions(+), 10 deletions(-) diff --git a/guix/scripts/pull.scm b/guix/scripts/pull.scm index a93343ceef..b910276204 100644 --- a/guix/scripts/pull.scm +++ b/guix/scripts/pull.scm @@ -45,15 +45,54 @@ (define builder (use-modules (guix build utils) (system base compile) (ice-9 ftw) - (ice-9 match)) + (ice-9 match) + (srfi srfi-1) + (srfi srfi-11) + (srfi srfi-26)) (setvbuf (current-output-port) _IOLBF) (setvbuf (current-error-port) _IOLBF) + (let ((out (assoc-ref %outputs "out")) (tar (assoc-ref %build-inputs "tar")) (gzip (assoc-ref %build-inputs "gzip")) (gcrypt (assoc-ref %build-inputs "gcrypt")) (tarball (assoc-ref %build-inputs "tarball"))) + + (define* (compile-file* file #:key output-file (opts '())) + ;; Like 'compile-file', but remove any (guix …) and (gnu …) modules + ;; created during the process as an ugly workaround for + ;; (FIXME). This ensures correctness, + ;; but is overly conservative and very slow. + + (define (module-directory+file module) + ;; Return the directory for MODULE, like the 'dir-hint' in + ;; boot-9.scm. + (match (module-name module) + ((beginning ... last) + (values (string-concatenate + (map (lambda (elt) + (string-append (symbol->string elt) + file-name-separator-string)) + beginning)) + (symbol->string last))))) + + (define (clear-module-tree! root) + ;; Delete all the modules under ROOT. + (hash-for-each (lambda (name module) + (module-remove! root name) + (let-values (((dir name) + (module-directory+file module))) + (set-autoloaded! dir name #f)) + (clear-module-tree! module)) + (module-submodules root)) + (hash-clear! (module-submodules root))) + + (compile-file file #:output-file output-file #:opts opts) + + (for-each (compose clear-module-tree! resolve-module) + '((guix) (gnu)))) + (setenv "PATH" (string-append tar "/bin:" gzip "/bin")) (system* "tar" "xvf" tarball) @@ -91,15 +130,12 @@ (define builder ".go"))) (format (current-error-port) "compiling '~a'...~%" file) - (compile-file file - #:output-file go - #:opts %auto-compilation-options)))) - - ;; XXX: Because of the autoload hack in (guix build - ;; download), we must build it first to avoid errors since - ;; (gnutls) is unavailable. - (cons (string-append out "/guix/build/download.scm") - (find-files out "\\.scm"))) + (compile-file* file + #:output-file go + #:opts + %auto-compilation-options)))) + + (find-files out "\\.scm")) ;; Remove the "fake" (guix config). (delete-file (string-append out "/guix/config.scm")) -- cgit v1.2.3 From cc20a22a09bc1fa6969040e39cbc588a17bc62be Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Sun, 13 Oct 2013 22:35:50 +0200 Subject: gnu: Add dogtail. * gnu/packages/python.scm (python2-dogtail): New variable. --- gnu/packages/python.scm | 30 ++++++++++++++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index d64ed1a131..b5dbb6b90f 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -19,7 +19,7 @@ ;;; along with GNU Guix. If not, see . (define-module (gnu packages python) - #:use-module ((guix licenses) #:select (bsd-3 bsd-style psfl x11)) + #:use-module ((guix licenses) #:select (bsd-3 bsd-style psfl x11 gpl2+)) #:use-module ((guix licenses) #:select (zlib) #:renamer (symbol-prefix-proc 'license:)) #:use-module (gnu packages) @@ -399,7 +399,7 @@ (define-public python-simplejson "Json library for Python") (description "JSON (JavaScript Object Notation) is a subset of JavaScript syntax -(ECMA-262 3rd edition) used as a lightweight data interchange format. + (ECMA-262 3rd edition) used as a lightweight data interchange format. Simplejson exposes an API familiar to users of the standard library marshal and pickle modules. It is the externally maintained version of the json @@ -438,3 +438,29 @@ (define-public python2-pyicu (description "PyICU is a python extension wrapping the ICU C++ API.") (license x11))) + +(define-public python2-dogtail + ;; Python 2 only, as it leads to "TabError: inconsistent use of tabs and + ;; spaces in indentation" with Python 3. + (package + (name "python2-dogtail") + (version "0.8.2") + (source (origin + (method url-fetch) + (uri (string-append + "https://fedorahosted.org/released/dogtail/dogtail-" + version ".tar.gz")) + (sha256 + (base32 + "1yc4cg7ip87z15gyd4wy2vzbywrjc52a3m8r8gqy2b50d65llcg1")))) + (build-system python-build-system) + (arguments `(#:python ,python-2 + #:tests? #f)) ; invalid command "test" + (home-page "https://fedorahosted.org/dogtail/") + (synopsis "GUI test tool and automation framework written in ​Python") + (description + "dogtail is a GUI test tool and automation framework written in Python. +It uses Accessibility (a11y) technologies to communicate with desktop +applications. dogtail scripts are written in Python and executed like any +other Python program.") + (license gpl2+))) -- cgit v1.2.3 From 8db824ba3102b6941d3fbf32ec2f5e598c71422d Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Sun, 13 Oct 2013 22:49:23 +0200 Subject: gnu: poppler: Build the poppler-glib bindings. * gnu/packages/pdf.scm (poppler): Add Cairo and GLib as inputs. --- gnu/packages/pdf.scm | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/gnu/packages/pdf.scm b/gnu/packages/pdf.scm index 2dd3c9e32c..701eb586eb 100644 --- a/gnu/packages/pdf.scm +++ b/gnu/packages/pdf.scm @@ -31,7 +31,10 @@ (define-module (gnu packages pdf) #:use-module (gnu packages libpng) #:use-module (gnu packages libtiff) #:use-module (gnu packages pkg-config) - #:use-module (gnu packages xorg)) + #:use-module (gnu packages xorg) + #:use-module (gnu packages glib) + #:use-module (gnu packages gtk) + #:use-module (srfi srfi-1)) (define-public poppler (package @@ -47,7 +50,6 @@ (define-public poppler ;; FIXME: more dependencies could be added ;; cairo output: no (requires cairo >= 1.10.0) ;; qt4 wrapper: no - ;; glib wrapper: no (requires cairo output) ;; introspection: no ;; use gtk-doc: no ;; use libcurl: no @@ -58,7 +60,14 @@ (define-public poppler ("libpng" ,libpng) ("libtiff" ,libtiff) ("pkg-config" ,pkg-config) - ("zlib" ,zlib))) + ("zlib" ,zlib) + + ;; To build poppler-glib (as needed by Evince), we need Cairo and + ;; GLib. But of course, that Cairo must not depend on Poppler. + ("cairo" ,(package (inherit cairo) + (inputs (alist-delete "poppler" + (package-inputs cairo))))) + ("glib" ,glib))) (arguments `(#:tests? #f ; no test data provided with the tarball #:configure-flags -- cgit v1.2.3 From c1354b90e98538e890bc9388527e540a513a0d53 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Sun, 13 Oct 2013 22:49:52 +0200 Subject: gnu: Add libgnome-keyring and Evince. * gnu/packages/gnome.scm (libgnome-keyring, evince): New variables. --- gnu/packages/gnome.scm | 93 ++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 91 insertions(+), 2 deletions(-) diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm index e7dbfc75cb..16e491d3ed 100644 --- a/gnu/packages/gnome.scm +++ b/gnu/packages/gnome.scm @@ -17,14 +17,16 @@ ;;; along with GNU Guix. If not, see . (define-module (gnu packages gnome) - #:use-module ((guix licenses) #:select (gpl2 gpl2+ lgpl2.1+ lgpl3)) + #:use-module ((guix licenses) #:select (gpl2 gpl2+ lgpl2.0+ lgpl2.1+ lgpl3)) #:use-module (guix packages) #:use-module (guix download) #:use-module (guix build-system gnu) #:use-module (gnu packages glib) - #:use-module (gnu packages gnome) + #:use-module (gnu packages gnupg) #:use-module (gnu packages gstreamer) #:use-module (gnu packages gtk) + #:use-module (gnu packages pdf) + #:use-module (gnu packages ghostscript) #:use-module (gnu packages libcanberra) #:use-module (gnu packages libpng) #:use-module (gnu packages perl) @@ -98,6 +100,93 @@ (define-public gnome-doc-utils and keep up to date translations of documentation.") (license gpl2+))) ; xslt under lgpl +(define-public libgnome-keyring + (package + (name "libgnome-keyring") + (version "3.6.0") + (source (origin + (method url-fetch) + (uri (string-append + "mirror://gnome/sources/libgnome-keyring/3.6/libgnome-keyring-" + version + ".tar.xz")) + (sha256 + (base32 + "0c4qrjpmv1hqga3xv6wsq2z10x2n78qgw7q3k3s01y1pggxkgjkd")))) + (build-system gnu-build-system) + (native-inputs + `(("intltool" ,intltool))) + (inputs + `(("pkg-config" ,pkg-config) + ("libgcrypt" ,libgcrypt) + ("dbus" ,dbus))) + (propagated-inputs + ;; Referred to in .h files and .pc. + `(("glib" ,glib))) + (home-page "http://www.gnome.org") + (synopsis "Accessing passwords from the GNOME keyring") + (description + "Client library to access passwords from the GNOME keyring.") + + ;; Though a couple of files are LGPLv2.1+. + (license lgpl2.0+))) + +(define-public evince + (package + (name "evince") + (version "3.6.1") + (source (origin + (method url-fetch) + (uri (string-append + "mirror://gnome/sources/evince/3.6/evince-" + version + ".tar.xz")) + (sha256 + (base32 + "1da1pij030dh8mb0pr0jnyszgsbjnh8lc17rj5ii52j3kmbv51qv")))) + (build-system gnu-build-system) + (arguments + `(#:configure-flags '("--disable-nautilus") + + ;; FIXME: Tests fail with: + ;; ImportError: No module named gi.repository + ;; Where should that module come from? + #:tests? #f )) + (inputs + `(("libspectre" ,libspectre) + ;; ("djvulibre" ,djvulibre) + ("ghostscript" ,ghostscript) + ("poppler" ,poppler) + ("gsettings-desktop-schemas" ,gsettings-desktop-schemas) + ("libgnome-keyring" ,libgnome-keyring) + ("gnome-icon-theme" ,gnome-icon-theme) + ("itstool" ,itstool) + ("gdk-pixbuf" ,gdk-pixbuf) + ("atk" ,atk) + ("pango" ,pango) + ("gtk+" ,gtk+) + ("glib" ,glib) + ("libxml2" ,libxml2) + ("perl-xml-parser" ,perl-xml-parser) + ("perl" ,perl) + ("intltool" ,intltool) + ("pkg-config" ,pkg-config) + ("libsm" ,libsm) + ("libice" ,libice) + + ;; For tests. + ("dogtail" ,python2-dogtail))) + (home-page + "http://www.gnome.org/projects/evince/") + (synopsis "GNOME's document viewer") + (description + "Evince is a document viewer for multiple document formats. It +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+))) + (define-public gsettings-desktop-schemas (package (name "gsettings-desktop-schemas") -- cgit v1.2.3 From 749b90a5195f202f7c37f546d8d6218ea285279f Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Mon, 14 Oct 2013 09:48:52 +0200 Subject: gnu: subversion, cmake: Clean up descriptions. * gnu/packages/cmake.scm (cmake): Simplify the synopsis. * gnu/packages/version-control.scm (subversion): Remove "open-source" from the description. --- gnu/packages/cmake.scm | 2 +- gnu/packages/version-control.scm | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/gnu/packages/cmake.scm b/gnu/packages/cmake.scm index c80bc2eb6a..a5c3d45193 100644 --- a/gnu/packages/cmake.scm +++ b/gnu/packages/cmake.scm @@ -67,7 +67,7 @@ (define-public cmake (inputs `(("file" ,file))) (home-page "http://www.cmake.org/") - (synopsis "A cross-platform, open-source build system") + (synopsis "Cross-platform build system") (description "CMake is a family of tools designed to build, test and package software. CMake is used to control the software compilation process using simple platform diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm index c23e742e7d..cc6e3d3111 100644 --- a/gnu/packages/version-control.scm +++ b/gnu/packages/version-control.scm @@ -253,8 +253,8 @@ (define-public subversion (home-page "http://subversion.apache.org/") (synopsis "Subversion, a revision control system") (description - "Subversion exists to be universally recognized and adopted as an -open-source, centralized version control system characterized by its + "Subversion exists to be universally recognized and adopted as a +centralized version control system characterized by its reliability as a safe haven for valuable data; the simplicity of its model and usage; and its ability to support the needs of a wide variety of users and projects, from individuals to large-scale enterprise operations.") -- cgit v1.2.3 From 15e82fb2c030cc195dc42db66c37713d71c44f54 Mon Sep 17 00:00:00 2001 From: David Thompson Date: Mon, 14 Oct 2013 16:40:02 -0400 Subject: gnu: Add libtheora. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/packages/oggvorbis.scm (libtheora): New variable. Signed-off-by: Ludovic Courtès --- gnu/packages/oggvorbis.scm | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/gnu/packages/oggvorbis.scm b/gnu/packages/oggvorbis.scm index 0652ec3bed..1b1630e1fb 100644 --- a/gnu/packages/oggvorbis.scm +++ b/gnu/packages/oggvorbis.scm @@ -1,6 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2013 Andreas Enge ;;; Copyright © 2013 Nikita Karetnikov +;;; Copyright © 2013 David Thompson ;;; ;;; This file is part of GNU Guix. ;;; @@ -34,6 +35,7 @@ (define-module (gnu packages oggvorbis) #:use-module (guix build-system gnu) #:export (libogg libvorbis + libtheora speex ao flac @@ -88,6 +90,29 @@ (define libvorbis "See COPYING in the distribution.")) (home-page "http://xiph.org/vorbis/"))) +(define libtheora + (package + (name "libtheora") + (version "1.1.1") + (source (origin + (method url-fetch) + (uri (string-append "http://downloads.xiph.org/releases/theora/libtheora-" + version ".tar.xz")) + (sha256 + (base32 + "0q8wark9ribij57dciym5vdikg2464p8q2mgqvfb78ksjh4s8vgk")))) + (build-system gnu-build-system) + (inputs `(("libvorbis" ,libvorbis))) + ;; The .pc files refer to libogg. + (propagated-inputs `(("libogg" ,libogg))) + (synopsis "Library implementing the Theora video format") + (description + "The libtheora library implements the ogg theora video format, +a fully open, non-proprietary, patent-and-royalty-free, general-purpose +compressed video format.") + (license license:bsd-3) + (home-page "http://xiph.org/theora/"))) + (define speex (package (name "speex") -- cgit v1.2.3 From 3c1d9799b82fa6104d6b56073131a8aa43336ce9 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Mon, 14 Oct 2013 23:18:54 +0200 Subject: Thank Jeffrin and David. --- AUTHORS | 1 + THANKS | 1 + 2 files changed, 2 insertions(+) diff --git a/AUTHORS b/AUTHORS index 6d15973a72..e2b3881adb 100644 --- a/AUTHORS +++ b/AUTHORS @@ -15,4 +15,5 @@ alphabetical order): Aljosha Papsch Cyril Roelandt Alex Sassmannshausen + David Thompson Mark H. Weaver diff --git a/THANKS b/THANKS index 2d3aeaec0b..95d92aa9d6 100644 --- a/THANKS +++ b/THANKS @@ -14,6 +14,7 @@ infrastructure help: John Darrington Rafael Ferreira Christian Grothoff + Jeffrin Jose Matthew Lien Yutaka Niibe Cyrill Schenkel -- cgit v1.2.3 From b2ba65c8970a1371244015cc918257f9972454ec Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Tue, 15 Oct 2013 22:59:50 +0200 Subject: guix package: '--search' matches against package names. * guix/scripts/package.scm (find-packages-by-description): Return packages whose name matches RX. --- guix/scripts/package.scm | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/guix/scripts/package.scm b/guix/scripts/package.scm index 5c7c165cbb..0b9e0c4f6f 100644 --- a/guix/scripts/package.scm +++ b/guix/scripts/package.scm @@ -325,8 +325,8 @@ (define generation-ctime-alist (else #f))) (define (find-packages-by-description rx) - "Search in SYNOPSIS and DESCRIPTION using RX. Return a list of -matching packages." + "Return the list of packages whose name, synopsis, or description matches +RX." (define (same-location? p1 p2) ;; Compare locations of two packages. (equal? (package-location p1) (package-location p2))) @@ -337,7 +337,8 @@ (define (same-location? p1 p2) (define matches? (cut regexp-exec rx <>)) - (if (or (and=> (package-synopsis package) + (if (or (matches? (gettext (package-name package))) + (and=> (package-synopsis package) (compose matches? gettext)) (and=> (package-description package) (compose matches? gettext))) -- cgit v1.2.3 From 70a9c7202866df594628750f7c4c242f4fd53e60 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Tue, 15 Oct 2013 23:25:08 +0200 Subject: build: Add 'clean-go' target. * Makefile.am (clean-go): New phony target. --- Makefile.am | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Makefile.am b/Makefile.am index c2d6b9338f..7a74bc8601 100644 --- a/Makefile.am +++ b/Makefile.am @@ -95,6 +95,10 @@ srfi/srfi-37.scm: srfi/srfi-37.scm.in endif INSTALL_SRFI_37 +# Handy way to remove the .go files without removing all the rest. +clean-go: + -$(RM) -f $(GOBJECTS) + SCM_TESTS = \ tests/base32.scm \ @@ -240,5 +244,5 @@ assert-binaries-available: $(top_builddir)/pre-inst-env "$(GUILE)" \ "$(top_srcdir)/build-aux/check-available-binaries.scm" -.PHONY: sync-descriptions gen-ChangeLog +.PHONY: sync-descriptions gen-ChangeLog clean-go .PHONY: assert-no-store-file-names assert-binaries-available -- cgit v1.2.3 From 59fbeb8cae02032a2f8b7966ab52545817f3ed88 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Tue, 15 Oct 2013 23:31:22 +0200 Subject: records: define-record-type*: Field bindings are bound with 'let*'. * guix/records.scm (define-record-type*): Wrap field bindings in a 'let*', not in a 'letrec*', which turned out to be pointlessly inconvenient. * tests/records.scm: Adjust test names accordingly. --- guix/records.scm | 8 ++++---- tests/records.scm | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/guix/records.scm b/guix/records.scm index d47bbf89f2..37d34b4c81 100644 --- a/guix/records.scm +++ b/guix/records.scm @@ -73,7 +73,7 @@ (define (thunked-field? f) (memq (syntax->datum f) '#,thunked)) (define (field-bindings field+value) - ;; Return field to value bindings, for use in `letrec*' below. + ;; Return field to value bindings, for use in 'let*' below. (map (lambda (field+value) (syntax-case field+value () ((field value) @@ -85,7 +85,7 @@ (define (field-bindings field+value) (syntax-case s (inherit #,@fields) ((_ (inherit orig-record) (field value) (... ...)) - #`(letrec* #,(field-bindings #'((field value) (... ...))) + #`(let* #,(field-bindings #'((field value) (... ...))) #,(record-inheritance #'orig-record #'((field value) (... ...))))) ((_ (field value) (... ...)) @@ -116,8 +116,8 @@ (define (field-value f) s))))) (let ((fields (append fields (map car dflt)))) (cond ((lset= eq? fields 'expected) - #`(letrec* #,(field-bindings - #'((field value) (... ...))) + #`(let* #,(field-bindings + #'((field value) (... ...))) (ctor #,@(map field-value 'expected)))) ((pair? (lset-difference eq? fields 'expected)) (error* "extraneous field initializers ~a" diff --git a/tests/records.scm b/tests/records.scm index 851ff7bdef..15709ac326 100644 --- a/tests/records.scm +++ b/tests/records.scm @@ -36,9 +36,9 @@ (define-record-type* foo make-foo (match (foo (bar 1)) (($ 1 42) #t))))) -(test-assert "define-record-type* with letrec* behavior" +(test-assert "define-record-type* with let* behavior" ;; Make sure field initializers can refer to each other as if they were in - ;; a `letrec*'. + ;; a 'let*'. (begin (define-record-type* bar make-bar foo? @@ -69,7 +69,7 @@ (define-record-type* foo make-foo (equal? c d) (match e (($ 42 77) #t)))))) -(test-assert "define-record-type* & inherit & letrec* behavior" +(test-assert "define-record-type* & inherit & let* behavior" (begin (define-record-type* foo make-foo foo? -- cgit v1.2.3 From dfb52abbd60876de250f04fc5c64b3c85082cba6 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Tue, 15 Oct 2013 23:42:58 +0200 Subject: Remove weirdnesses caused by 'letrec*' behavior of record field initializers. * gnu/packages/bootstrap.scm (package-from-tarball): Remove '*' from parameter names. Adjust accordingly. * gnu/packages/linux-initrd.scm (expression->initrd): Use 'name' directly, removing the 'name*' alias. * gnu/packages/linux.scm (linux-libre-headers, linux-libre): Rename 'version*' to 'version'. --- gnu/packages/bootstrap.scm | 14 +++++++------- gnu/packages/linux-initrd.scm | 41 ++++++++++++++++++++--------------------- gnu/packages/linux.scm | 10 +++++----- gnu/packages/make-bootstrap.scm | 14 +++++++------- 4 files changed, 39 insertions(+), 40 deletions(-) diff --git a/gnu/packages/bootstrap.scm b/gnu/packages/bootstrap.scm index a1d4c7fc67..11f54ad051 100644 --- a/gnu/packages/bootstrap.scm +++ b/gnu/packages/bootstrap.scm @@ -70,14 +70,13 @@ (define (boot fetch) (boot url-fetch)) (else orig-method)))))) -(define (package-from-tarball name* source* program-to-test description*) - "Return a package that correspond to the extraction of SOURCE*. -PROGRAM-TO-TEST is a program to run after extraction of SOURCE*, to +(define (package-from-tarball name source program-to-test description) + "Return a package that correspond to the extraction of SOURCE. +PROGRAM-TO-TEST is a program to run after extraction of SOURCE, to check whether everything is alright." (package - (name name*) + (name name) (version "0") - (source #f) (build-system trivial-build-system) (arguments `(#:guile ,%bootstrap-guile @@ -101,8 +100,9 @@ (define (package-from-tarball name* source* program-to-test description*) (inputs `(("tar" ,(search-bootstrap-binary "tar" (%current-system))) ("xz" ,(search-bootstrap-binary "xz" (%current-system))) - ("tarball" ,(bootstrap-origin (source* (%current-system)))))) - (synopsis description*) + ("tarball" ,(bootstrap-origin (source (%current-system)))))) + (source #f) + (synopsis description) (description #f) (home-page #f) (license #f))) diff --git a/gnu/packages/linux-initrd.scm b/gnu/packages/linux-initrd.scm index ed30fa56b1..0134e89da8 100644 --- a/gnu/packages/linux-initrd.scm +++ b/gnu/packages/linux-initrd.scm @@ -212,28 +212,27 @@ (define print0 (and (zero? (system* gzip "--best" "initrd")) (rename-file "initrd.gz" "initrd"))))))))) - (let ((name* name)) - (package - (name name*) - (version "0") - (source #f) - (build-system trivial-build-system) - (arguments `(#:modules ((guix build utils)) - #:builder ,builder)) - (inputs `(("guile" ,guile) - ("cpio" ,cpio) - ("gzip" ,gzip) - ("modules" ,(module-package modules)) - ("modules/compiled" ,(compiled-module-package modules)) - ,@(if linux - `(("linux" ,linux)) - '()))) - (synopsis "An initial RAM disk (initrd) for the Linux kernel") - (description - "An initial RAM disk (initrd), really a gzipped cpio archive, for use by + (package + (name name) + (version "0") + (source #f) + (build-system trivial-build-system) + (arguments `(#:modules ((guix build utils)) + #:builder ,builder)) + (inputs `(("guile" ,guile) + ("cpio" ,cpio) + ("gzip" ,gzip) + ("modules" ,(module-package modules)) + ("modules/compiled" ,(compiled-module-package modules)) + ,@(if linux + `(("linux" ,linux)) + '()))) + (synopsis "An initial RAM disk (initrd) for the Linux kernel") + (description + "An initial RAM disk (initrd), really a gzipped cpio archive, for use by the Linux kernel.") - (license gpl3+) - (home-page "http://www.gnu.org/software/guix/")))) + (license gpl3+) + (home-page "http://www.gnu.org/software/guix/"))) (define-public qemu-initrd (expression->initrd diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm index 469ccc552c..1402f05974 100644 --- a/gnu/packages/linux.scm +++ b/gnu/packages/linux.scm @@ -65,7 +65,7 @@ (define (linux-libre-urls version) version "-gnu.tar.xz"))) (define-public linux-libre-headers - (let* ((version* "3.3.8") + (let* ((version "3.3.8") (build-phase (lambda (arch) `(lambda _ @@ -85,10 +85,10 @@ (define-public linux-libre-headers (string-append out "/include/config/kernel.release") (lambda (p) - (format p "~a-default~%" ,version*)))))))) + (format p "~a-default~%" ,version)))))))) (package (name "linux-libre-headers") - (version version*) + (version version) (source (origin (method url-fetch) (uri (linux-libre-urls version)) @@ -145,7 +145,7 @@ (define-public module-init-tools (license gpl2+))) (define-public linux-libre - (let* ((version* "3.11") + (let* ((version "3.11") (build-phase '(lambda* (#:key system #:allow-other-keys #:rest args) (let ((arch (car (string-split system #\-)))) @@ -185,7 +185,7 @@ (define-public linux-libre "modules_install")))))) (package (name "linux-libre") - (version version*) + (version version) (source (origin (method url-fetch) (uri (linux-libre-urls version)) diff --git a/gnu/packages/make-bootstrap.scm b/gnu/packages/make-bootstrap.scm index 5dc7387e92..8c148f7086 100644 --- a/gnu/packages/make-bootstrap.scm +++ b/gnu/packages/make-bootstrap.scm @@ -451,15 +451,15 @@ (define %guile-static ;; A statically-linked Guile that is relocatable--i.e., it can search ;; .scm and .go files relative to its installation directory, rather ;; than in hard-coded configure-time paths. - (let* ((patches* (cons* (search-patch "guile-relocatable.patch") - (search-patch "guile-default-utf8.patch") - (search-patch "guile-linux-syscalls.patch") - (origin-patches (package-source guile-2.0)))) - (source* (origin (inherit (package-source guile-2.0)) - (patches patches*))) + (let* ((patches (cons* (search-patch "guile-relocatable.patch") + (search-patch "guile-default-utf8.patch") + (search-patch "guile-linux-syscalls.patch") + (origin-patches (package-source guile-2.0)))) + (source (origin (inherit (package-source guile-2.0)) + (patches patches))) (guile (package (inherit guile-2.0) (name (string-append (package-name guile-2.0) "-static")) - (source source*) + (source source) (synopsis "Statically-linked and relocatable Guile") (propagated-inputs `(("bdw-gc" ,libgc) -- cgit v1.2.3 From d911258976690671d3b3ffe93994a6c5e2d72eed Mon Sep 17 00:00:00 2001 From: Eric Bavier Date: Mon, 14 Oct 2013 12:55:53 -0500 Subject: gnu: Add autogen package MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/package/autogen.scm: New file * gnu-system.am: Add it Signed-off-by: Ludovic Courtès --- gnu-system.am | 1 + gnu/packages/autogen.scm | 63 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 64 insertions(+) create mode 100644 gnu/packages/autogen.scm diff --git a/gnu-system.am b/gnu-system.am index 9f5a89700a..076cd0da4e 100644 --- a/gnu-system.am +++ b/gnu-system.am @@ -28,6 +28,7 @@ GNU_SYSTEM_MODULES = \ gnu/packages/apr.scm \ gnu/packages/aspell.scm \ gnu/packages/attr.scm \ + gnu/packages/autogen.scm \ gnu/packages/autotools.scm \ gnu/packages/avahi.scm \ gnu/packages/base.scm \ diff --git a/gnu/packages/autogen.scm b/gnu/packages/autogen.scm new file mode 100644 index 0000000000..3109c2bf0b --- /dev/null +++ b/gnu/packages/autogen.scm @@ -0,0 +1,63 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2013 Eric Bavier +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see . + +(define-module (gnu packages autogen) + #:use-module (guix packages) + #:use-module (guix licenses) + #:use-module (guix download) + #:use-module (guix build-system gnu) + #:use-module (gnu packages) + #:use-module (gnu packages which) + #:use-module (gnu packages guile)) + +(define-public autogen + (package + (name "autogen") + (version "5.18.1") + (source + (origin + (method url-fetch) + (uri (string-append "mirror://gnu/autogen/rel" + version "/autogen-" + version ".tar.gz")) + (sha256 + (base32 + "0k0gkr5inr9wb3ws30q6bbiqg3qm3ryvl9cznym2xis4lm216d53")))) + (build-system gnu-build-system) + (inputs `(("which" ,which) + ("guile" ,guile-2.0))) + (arguments + '(#:phases (alist-cons-before + 'patch-source-shebangs 'patch-test-scripts + (lambda _ + (let ((sh (which "sh"))) + (substitute* + (append (find-files "agen5/test" "\\.test$") + (find-files "autoopts/test" "\\.(test|in)$")) + (("/bin/sh") sh) + (("/usr/bin/tr") "tr")))) + %standard-phases))) + (home-page "http://www.gnu.org/software/autogen/") + (synopsis "Automated program generator") + (description + "AutoGen is a program to ease the maintenance of programs that contain +large amounts of repetitive text. It automates the construction of these +sections of the code, simplifying the task of keeping the text in sync. It +also includes an add-on package called AutoOpts, which is specialized for the +maintenance and documentation of program options.") + (license gpl3+))) -- cgit v1.2.3 From eeb70957e88146183895f763b922fdb281465b6c Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Wed, 16 Oct 2013 00:13:40 +0200 Subject: Update 'AUTHORS'. --- AUTHORS | 1 + 1 file changed, 1 insertion(+) diff --git a/AUTHORS b/AUTHORS index e2b3881adb..a7df51e8c4 100644 --- a/AUTHORS +++ b/AUTHORS @@ -8,6 +8,7 @@ contributing to it. See `nix/AUTHORS' for details. The fine people listed below have contributed code to GNU Guix (in alphabetical order): + Eric Bavier Ludovic Courtès Andreas Enge Joshua S. Grant -- cgit v1.2.3 From 418e82b50751fa4a0431482adabdd27344687497 Mon Sep 17 00:00:00 2001 From: Andreas Enge Date: Wed, 16 Oct 2013 10:44:56 +0200 Subject: gnu: harfbuzz: Update to 0.9.22. * gnu/packages/gtk.scm (harfbuzz): Update to 0.9.22; should solve the test problems on i686. --- gnu/packages/gtk.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gnu/packages/gtk.scm b/gnu/packages/gtk.scm index b120dc92f8..dff98b9791 100644 --- a/gnu/packages/gtk.scm +++ b/gnu/packages/gtk.scm @@ -115,14 +115,14 @@ (define-public cairo (define-public harfbuzz (package (name "harfbuzz") - (version "0.9.21") + (version "0.9.22") (source (origin (method url-fetch) (uri (string-append "http://www.freedesktop.org/software/harfbuzz/release/harfbuzz-" version ".tar.bz2")) (sha256 (base32 - "1s6sffgf6ndy12fyln2bdnkn3cb1qfkch0rakdgkgwlq7n46zlx0")))) + "1nkimwadri6v2kzrmz8y0crmy59gw0kg4i4f6cc786bngs0815lq")))) (build-system gnu-build-system) (inputs `(("cairo" ,cairo) -- cgit v1.2.3 From 7df7a74e23583a7cf550af63a4ca5f69203e6da5 Mon Sep 17 00:00:00 2001 From: Nikita Karetnikov Date: Thu, 17 Oct 2013 13:21:10 +0000 Subject: doc: Improve the copyright notice. --- doc/guix.texi | 53 ++++++++++++++--------------------------------------- 1 file changed, 14 insertions(+), 39 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index 9633f90559..5d92ed5255 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -8,7 +8,19 @@ @c %**end of header @include version.texi -@set YEARS 2012, 2013 + +@copying +Copyright @copyright{} 2012, 2013 Ludovic Courtès@* +Copyright @copyright{} 2013 Andreas Enge@* +Copyright @copyright{} 2013 Nikita Karetnikov + +Permission is granted to copy, distribute and/or modify this document +under the terms of the GNU Free Documentation License, Version 1.3 or +any later version published by the Free Software Foundation; with no +Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A +copy of the license is included in the section entitled ``GNU Free +Documentation License''. +@end copying @dircategory Package management @direntry @@ -31,34 +43,9 @@ Edition @value{EDITION} @* @value{UPDATED} @* -Copyright @copyright{} @value{YEARS} Ludovic Court@`es, Andreas Enge, Nikita Karetnikov - -@ifinfo -@quotation -Permission is granted to copy, distribute and/or modify this document -under the terms of the GNU Free Documentation License, Version 1.3 or -any later version published by the Free Software Foundation; with no -Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A -copy of the license is included in the section entitled ``GNU Free -Documentation License''. -@end quotation -@end ifinfo - +@insertcopying @end titlepage -@copying -This manual documents GNU Guix version @value{VERSION}. - -Copyright @copyright{} @value{YEARS} Ludovic Courtès - -Permission is granted to copy, distribute and/or modify this document -under the terms of the GNU Free Documentation License, Version 1.3 or -any later version published by the Free Software Foundation; with no -Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A -copy of the license is included in the section entitled ``GNU Free -Documentation License.'' -@end copying - @contents @c ********************************************************************* @@ -68,18 +55,6 @@ Documentation License.'' This document describes GNU Guix version @value{VERSION}, a functional package management tool written for the GNU system. - -@quotation -Copyright @copyright{} @value{YEARS} Ludovic Courtès, Andreas Enge, Nikita Karetnikov - -Permission is granted to copy, distribute and/or modify this document -under the terms of the GNU Free Documentation License, Version 1.3 or -any later version published by the Free Software Foundation; with no -Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A -copy of the license is included in the section entitled ``GNU Free -Documentation License.'' -@end quotation - @menu * Introduction:: What is Guix about? * Installation:: Installing Guix. -- cgit v1.2.3 From 515e68782f871a39586ba779137d10c13fa5cde2 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Thu, 17 Oct 2013 22:27:39 +0200 Subject: gnu: Add SCons. * gnu/packages/python.scm (scons): New variable. --- gnu/packages/python.scm | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index b5dbb6b90f..5b37ff6687 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -464,3 +464,29 @@ (define-public python2-dogtail applications. dogtail scripts are written in Python and executed like any other Python program.") (license gpl2+))) + +(define-public scons + (package + (name "scons") + (version "2.1.0") + (source (origin + (method url-fetch) + (uri (string-append "mirror://sourceforge/scons/scons-" + version ".tar.gz")) + (sha256 + (base32 + "07cjn4afb2cljjrd3cr7xf062qq58z8q96f58z6yplhdyqafsfa1")))) + (build-system python-build-system) + (arguments + ;; With Python 3.x, fails to build with a syntax error. + `(#:python ,python-2 + #:tests? #f)) ; no 'python setup.py test' command + (home-page "http://scons.org/") + (synopsis "Software construction tool written in Python") + (description + "SCons is a software construction tool. Think of SCons as an improved, +cross-platform substitute for the classic Make utility with integrated +functionality similar to autoconf/automake and compiler caches such as ccache. +In short, SCons is an easier, more reliable and faster way to build +software.") + (license x11))) -- cgit v1.2.3 From 9167f8e6f9fe2a7f8765ce261033c208f1810cb2 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Thu, 17 Oct 2013 22:43:27 +0200 Subject: gnu: Add shared-mime-info. * gnu/packages/gnome.scm (shared-mime-info): New variable. --- gnu/packages/gnome.scm | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm index 16e491d3ed..4ae2891f04 100644 --- a/gnu/packages/gnome.scm +++ b/gnu/packages/gnome.scm @@ -264,6 +264,37 @@ (define-public gnome-icon-theme "Icons for the GNOME desktop.") (license lgpl3))) ; or Creative Commons BY-SA 3.0 +(define-public shared-mime-info + (package + (name "shared-mime-info") + (version "1.2") + (source (origin + (method url-fetch) + (uri (string-append "http://freedesktop.org/~hadess/shared-mime-info-" + version ".tar.xz")) + (sha256 + (base32 + "0y5vi0vr6rbhvfzcfg57cfskn362bpvcpca9cy598nmr87i6lld5")))) + (build-system gnu-build-system) + (arguments + ;; The build system appears not to be parallel-safe. + '(#:parallel-build? #f)) + (inputs + `(("glib" ,glib) + ("libxml2" ,libxml2) + ("pkg-config" ,pkg-config))) + (native-inputs + `(("intltool" ,intltool))) + (home-page "http://freedesktop.org/wiki/Software/shared-mime-info") + (synopsis "Database of common MIME types") + (description + "The shared-mime-info package contains the core database of common types +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+))) + (define-public hicolor-icon-theme (package (name "hicolor-icon-theme") -- cgit v1.2.3 From 96e424672aa28cd603d94efd05f1fead152da0ee Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Thu, 17 Oct 2013 23:13:20 +0200 Subject: gnu: evince: Set search path for MIME info. * gnu/packages/gnome.scm (evince): Add #:phases argument. Remove "perl" and "perl-xml-parser" inputs since they are not directly needed; move "intltool" to 'native-inputs'. --- gnu/packages/gnome.scm | 29 +++++++++++++++++++---------- 1 file changed, 19 insertions(+), 10 deletions(-) diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm index 4ae2891f04..713b64fde6 100644 --- a/gnu/packages/gnome.scm +++ b/gnu/packages/gnome.scm @@ -137,10 +137,8 @@ (define-public evince (version "3.6.1") (source (origin (method url-fetch) - (uri (string-append - "mirror://gnome/sources/evince/3.6/evince-" - version - ".tar.xz")) + (uri (string-append "mirror://gnome/sources/evince/3.6/evince-" + version ".tar.xz")) (sha256 (base32 "1da1pij030dh8mb0pr0jnyszgsbjnh8lc17rj5ii52j3kmbv51qv")))) @@ -151,7 +149,19 @@ (define-public evince ;; FIXME: Tests fail with: ;; ImportError: No module named gi.repository ;; Where should that module come from? - #:tests? #f )) + #:tests? #f + + #:phases (alist-cons-after + 'install 'set-mime-search-path + (lambda* (#:key inputs outputs #:allow-other-keys) + ;; Wrap 'evince' so that it knows where MIME info is. + (let ((out (assoc-ref outputs "out")) + (mime (assoc-ref inputs "shared-mime-info"))) + (wrap-program (string-append out "/bin/evince") + `("XDG_DATA_DIRS" ":" prefix + ,(list (string-append mime "/share") + (string-append out "/share")))))) + %standard-phases))) (inputs `(("libspectre" ,libspectre) ;; ("djvulibre" ,djvulibre) @@ -167,15 +177,15 @@ (define-public evince ("gtk+" ,gtk+) ("glib" ,glib) ("libxml2" ,libxml2) - ("perl-xml-parser" ,perl-xml-parser) - ("perl" ,perl) - ("intltool" ,intltool) ("pkg-config" ,pkg-config) ("libsm" ,libsm) ("libice" ,libice) + ("shared-mime-info" ,shared-mime-info) ;; For tests. ("dogtail" ,python2-dogtail))) + (native-inputs + `(("intltool" ,intltool))) (home-page "http://www.gnome.org/projects/evince/") (synopsis "GNOME's document viewer") @@ -183,8 +193,7 @@ (define-public evince "Evince is a document viewer for multiple document formats. It 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. -") +on the GNOME Desktop with a single simple application.") (license gpl2+))) (define-public gsettings-desktop-schemas -- cgit v1.2.3 From 93a3d8f6099a733c05295a0e8d8358db1d930937 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Thu, 17 Oct 2013 23:50:11 +0200 Subject: gnu: glib: Work around test failure in 'gio/tests/network-address.c'. * gnu/packages/patches/glib-tests-newnet.patch: New file. * gnu/packages/glib.scm (glib): Use it. * gnu-system.am (dist_patch_DATA): Add it. --- gnu-system.am | 1 + gnu/packages/glib.scm | 3 ++- gnu/packages/patches/glib-tests-newnet.patch | 30 ++++++++++++++++++++++++++++ 3 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/glib-tests-newnet.patch diff --git a/gnu-system.am b/gnu-system.am index 076cd0da4e..4ba110624c 100644 --- a/gnu-system.am +++ b/gnu-system.am @@ -218,6 +218,7 @@ dist_patch_DATA = \ gnu/packages/patches/gcc-cross-environment-variables.patch \ gnu/packages/patches/glib-tests-desktop.patch \ gnu/packages/patches/glib-tests-homedir.patch \ + gnu/packages/patches/glib-tests-newnet.patch \ gnu/packages/patches/glib-tests-prlimit.patch \ gnu/packages/patches/glibc-bootstrap-system.patch \ gnu/packages/patches/glibc-ldd-x86_64.patch \ diff --git a/gnu/packages/glib.scm b/gnu/packages/glib.scm index 2fbc46892b..61ba0b944e 100644 --- a/gnu/packages/glib.scm +++ b/gnu/packages/glib.scm @@ -117,7 +117,8 @@ (define glib (base32 "0cpzqadqk6z6bmb79p04pykxc8x57rvshh33414cnk41bvgaf4vm")) (patches (list (search-patch "glib-tests-homedir.patch") (search-patch "glib-tests-desktop.patch") - (search-patch "glib-tests-prlimit.patch"))))) + (search-patch "glib-tests-prlimit.patch") + (search-patch "glib-tests-newnet.patch"))))) (build-system gnu-build-system) (outputs '("out" ; everything "doc")) ; 20 MiB of GTK-Doc reference diff --git a/gnu/packages/patches/glib-tests-newnet.patch b/gnu/packages/patches/glib-tests-newnet.patch new file mode 100644 index 0000000000..324b8ae68f --- /dev/null +++ b/gnu/packages/patches/glib-tests-newnet.patch @@ -0,0 +1,30 @@ +Since guix-daemon runs in a separate networking name space, the only +interface available is "lo". However its index is incremented by one +at each build, so it can end up being greater than 255, leading to an +assertion failure in 'find_ifname_and_index'. + +Work around that by directly querying the index of "lo". + +--- glib-2.38.0/gio/tests/network-address.c 2013-09-17 20:47:14.000000000 +0200 ++++ glib-2.38.0/gio/tests/network-address.c 2013-10-16 21:52:42.000000000 +0200 +@@ -117,7 +117,7 @@ test_parse_host (gconstpointer d) + #define SCOPE_ID_TEST_PORT 99 + + #ifdef HAVE_IF_INDEXTONAME +-static char SCOPE_ID_TEST_IFNAME[IF_NAMESIZE]; ++static char SCOPE_ID_TEST_IFNAME[] = "lo"; + static int SCOPE_ID_TEST_INDEX; + #else + #define SCOPE_ID_TEST_IFNAME "1" +@@ -131,11 +131,7 @@ find_ifname_and_index (void) + return; + + #ifdef HAVE_IF_INDEXTONAME +- for (SCOPE_ID_TEST_INDEX = 1; SCOPE_ID_TEST_INDEX < 255; SCOPE_ID_TEST_INDEX++) { +- if (if_indextoname (SCOPE_ID_TEST_INDEX, SCOPE_ID_TEST_IFNAME)) +- break; +- } +- g_assert_cmpstr (SCOPE_ID_TEST_IFNAME, !=, ""); ++ SCOPE_ID_TEST_INDEX = if_nametoindex (SCOPE_ID_TEST_IFNAME); + #endif + } -- cgit v1.2.3 From a433c52593b825e57edb96f88f49f05b07ca7d4a Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Fri, 18 Oct 2013 00:25:06 +0200 Subject: gnu: dfc: Add missing input. * gnu/packages/system.scm (dfc): Add 'native-inputs' field. --- gnu/packages/system.scm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gnu/packages/system.scm b/gnu/packages/system.scm index a5d2e67585..019af78024 100644 --- a/gnu/packages/system.scm +++ b/gnu/packages/system.scm @@ -28,6 +28,8 @@ (define-module (gnu packages system) #:use-module (gnu packages ncurses) #:use-module (gnu packages linux) #:use-module (gnu packages guile) + #:use-module ((gnu packages gettext) + #:renamer (symbol-prefix-proc 'g:)) #:use-module ((gnu packages base) #:select (tar)) #:use-module ((gnu packages compression) @@ -74,6 +76,7 @@ (define-public dfc "1b4hfqv23l87cb37fxwzfk2sgspkyxpr3ig2hsd23hr6mm982j7z")))) (build-system cmake-build-system) (arguments '(#:tests? #f)) ; There are no tests. + (native-inputs `(("gettext" ,g:gettext))) (home-page "http://projects.gw-computing.net/projects/dfc") (synopsis "Display file system space usage using graphs and colors") (description -- cgit v1.2.3 From 02c72d167116fb56360cbe7f9b80a8b33284ae6f Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Fri, 18 Oct 2013 22:05:39 +0200 Subject: build: Build the bootstrap-graph.{png,eps,pdf} under $(top_srcdir). Fixes . Reported by Eric Bavier . * doc.am (EXTRA_DIST): Add doc/images/bootstrap-graph.pdf to the distribution. (pdf-local, info-local, ps-local): Prepend $(top_srcdir) to the image file names. --- doc.am | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/doc.am b/doc.am index 226860b5a4..6cbc35a8cc 100644 --- a/doc.am +++ b/doc.am @@ -21,7 +21,8 @@ info_TEXINFOS = doc/guix.texi EXTRA_DIST += \ doc/fdl-1.3.texi \ doc/images/bootstrap-graph.dot \ - doc/images/bootstrap-graph.eps + doc/images/bootstrap-graph.eps \ + doc/images/bootstrap-graph.pdf infoimagedir = $(infodir)/images dist_infoimage_DATA = doc/images/bootstrap-graph.png @@ -47,6 +48,6 @@ DOT_OPTIONS = \ # We cannot add new dependencies to `doc/guix.pdf' & co. (info "(automake) # Extending"). Using the `-local' rules is imperfect, because they may be # triggered after the main rule. Oh, well. -pdf-local: doc/images/bootstrap-graph.pdf -info-local: doc/images/bootstrap-graph.png -ps-local: doc/images/bootstrap-graph.eps +pdf-local: $(top_srcdir)/doc/images/bootstrap-graph.pdf +info-local: $(top_srcdir)/doc/images/bootstrap-graph.png +ps-local: $(top_srcdir)/doc/images/bootstrap-graph.eps -- cgit v1.2.3 From d038cac12ac8d48a79b79653e8dd876a3fffae3c Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Sat, 19 Oct 2013 00:07:28 +0200 Subject: gnu: Add GNU Alive. * gnu/packages/system.scm (alive): New variable. --- gnu/packages/system.scm | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/gnu/packages/system.scm b/gnu/packages/system.scm index 019af78024..9c06e6b61e 100644 --- a/gnu/packages/system.scm +++ b/gnu/packages/system.scm @@ -321,3 +321,25 @@ (define-public netcat and exploration tool, since it can create almost any kind of connection you would need and has several interesting built-in capabilities.") (license gpl2+))) + +(define-public alive + (package + (name "alive") + (version "2.0.2") + (source (origin + (method url-fetch) + (uri (string-append "mirror://gnu/alive/alive-" + version ".tar.xz")) + (sha256 + (base32 + "1vrzg51ai68x9yld7vbgl58sxaw5qpx8rbakwcxn4cqq6vpxj38j")))) + (build-system gnu-build-system) + (arguments '(#:configure-flags '("alive_cv_nice_ping=yes"))) + (inputs `(("guile" ,guile-2.0) + ("inetutils" ,inetutils))) + (home-page "http://www.gnu.org/software/alive/") + (synopsis "Autologin and keep-alive daemon") + (description + "GNU Alive sends periodic pings to a server, generally to keep a +connection alive.") + (license gpl3+))) -- cgit v1.2.3 From b92eee75b15d872bd70ab4abaa04c2fe4b7d45c1 Mon Sep 17 00:00:00 2001 From: Andreas Enge Date: Tue, 22 Oct 2013 20:24:33 +0200 Subject: gnu: Add GLPK. * gnu/packages/maths.scm (glpk): New variable. --- gnu/packages/maths.scm | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm index a76220a052..ccbb57b90f 100644 --- a/gnu/packages/maths.scm +++ b/gnu/packages/maths.scm @@ -26,6 +26,7 @@ (define-module (gnu packages maths) #:use-module (gnu packages compression) #:use-module ((gnu packages gettext) #:renamer (symbol-prefix-proc 'gnu:)) + #:use-module (gnu packages multiprecision) #:use-module (gnu packages perl) #:use-module (gnu packages pkg-config) #:use-module (gnu packages readline) @@ -89,6 +90,33 @@ (define-public gsl numbers.") (license license:gpl3+))) +(define-public glpk + (package + (name "glpk") + (version "4.52.1") + (source + (origin + (method url-fetch) + (uri (string-append "mirror://gnu/glpk/glpk-" + version ".tar.gz")) + (sha256 + (base32 + "0nz9ngmx23c8gbjr8l8ygnfaanxj2mwbl8awpg630bgrkxdnhc9j")))) + (build-system gnu-build-system) + (inputs + `(("gmp" ,gmp))) + (arguments + `(#:configure-flags '("--with-gmp"))) + (home-page "http://www.gnu.org/software/glpk/") + (synopsis "NU Linear Programming Kit, supporting the MathProg language") + (description + "GLPK is a C library for solving large-scale linear programming (LP), +mixed integer programming (MIP), and other related problems. It supports the +GNU MathProg modeling language, a subset of the AMPL language, and features a +translator for the language. In addition to the C library, a stand-alone +LP/MIP solver is included in the package.") + (license license:gpl3+))) + (define-public pspp (package (name "pspp") -- cgit v1.2.3 From 89059aa193cb9541fabcf9e2128151f317df6a88 Mon Sep 17 00:00:00 2001 From: Andreas Enge Date: Wed, 23 Oct 2013 23:32:24 +0200 Subject: gnu: qt: Correct source uri. * gnu/packages/qt.scm (qt-4): Correct source uri (reported by Cyril Roelandt ). --- gnu/packages/qt.scm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm index 07bb4fdd39..2a0872bcdc 100644 --- a/gnu/packages/qt.scm +++ b/gnu/packages/qt.scm @@ -149,7 +149,7 @@ (define-public qt-4 (uri (string-append "http://download.qt-project.org/official_releases/qt/" (string-copy version 0 (string-rindex version #\.)) "/" version - "/single/qt-everywhere-opensource-src-" + "/qt-everywhere-opensource-src-" version ".tar.gz")) (sha256 (base32 -- cgit v1.2.3 From 13fbda90d96b9835ca40b7df647f99a3396754f5 Mon Sep 17 00:00:00 2001 From: Andreas Enge Date: Fri, 25 Oct 2013 22:44:51 +0200 Subject: gnu: rsync: Update to 3.1.0. * gnu/packages/rsync.scm (rsync): Update to 3.1.0. --- gnu/packages/rsync.scm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gnu/packages/rsync.scm b/gnu/packages/rsync.scm index 16e1a53cb2..c51d65c33e 100644 --- a/gnu/packages/rsync.scm +++ b/gnu/packages/rsync.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2012 Andreas Enge +;;; Copyright © 2012, 2013 Andreas Enge ;;; ;;; This file is part of GNU Guix. ;;; @@ -29,14 +29,14 @@ (define-module (gnu packages rsync) (define-public rsync (package (name "rsync") - (version "3.0.9") + (version "3.1.0") (source (origin (method url-fetch) - (uri (string-append "http://rsync.samba.org/ftp/rsync/rsync-" + (uri (string-append "http://rsync.samba.org/ftp/rsync/src/rsync-" version ".tar.gz")) (sha256 (base32 - "01bw4klqsrlhh3i9lazd485sd9qx5djvnwa21lj2h3a9sn6hzw9h")))) + "0kirw8wglqvwi1v8bwxp373g03xg857h59j5k3mmgff9gzvj7jl1")))) (build-system gnu-build-system) (inputs `(("perl" ,perl) ("acl" ,acl))) -- cgit v1.2.3 From b357faace7564e97b030ae7a9e295f2f84bd458c Mon Sep 17 00:00:00 2001 From: Andreas Enge Date: Sat, 26 Oct 2013 00:24:44 +0200 Subject: gnu: Add sharutils. * gnu/packages/compression.scm (sharutils): New variable. --- gnu/packages/compression.scm | 39 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 38 insertions(+), 1 deletion(-) diff --git a/gnu/packages/compression.scm b/gnu/packages/compression.scm index df0acd9cc2..056b117333 100644 --- a/gnu/packages/compression.scm +++ b/gnu/packages/compression.scm @@ -1,5 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2012, 2013 Ludovic Courtès +;;; Copyright © 2013 Andreas Enge ;;; ;;; This file is part of GNU Guix. ;;; @@ -21,7 +22,8 @@ (define-module (gnu packages compression) #:renamer (symbol-prefix-proc 'license:)) #:use-module (guix packages) #:use-module (guix download) - #:use-module (guix build-system gnu)) + #:use-module (guix build-system gnu) + #:use-module (gnu packages which)) (define-public zlib (package @@ -247,3 +249,38 @@ (define-public lzip more than bzip2, which makes it well suited for software distribution and data archiving. Lzip is a clean implementation of the LZMA algorithm.") (license license:gpl3+))) + +(define-public sharutils + (package + (name "sharutils") + (version "4.14") + (source + (origin + (method url-fetch) + (uri (string-append "mirror://gnu/sharutils/sharutils-" + version ".tar.xz")) + (sha256 + (base32 + "033sq1v0cp0bi1mp320xaqwd4fhakqc5747hh6qa1asjrzpqiqza")))) + (build-system gnu-build-system) + (inputs + `(("which" ,which))) + (arguments + `(#:phases + (alist-cons-after + 'patch-source-shebangs 'unpatch-source-shebang + ;; revert the patch-shebang phase on a script which is + ;; in fact test data + (lambda* (#:key #:allow-other-keys) + (substitute* "tests/shar-1.ok" + (((which "sh")) "/bin/sh"))) + %standard-phases))) + (home-page "http://www.gnu.org/software/sharutils/") + (synopsis "Archives in shell scripts, uuencode/uudecode") + (description + "GNU sharutils is a package for manipulating shell archives. Shell +archives are collections of files that can be unpacked using only the shell; +an archive is a self-extracting shell script. The tools in the Sharutils +package make working with shell archives more robust, offering compression, +file-splitting and simple checksums.") + (license license:gpl3+))) -- cgit v1.2.3 From fa58ca4376a696205c9039a2562217d1a418ef36 Mon Sep 17 00:00:00 2001 From: Eric Bavier Date: Mon, 21 Oct 2013 18:05:25 -0500 Subject: gnu: Add Pem. * gnu/packages/pem.scm: New file. * gnu-system.am (GNU_SYSTEM_MODULES): Add it. Signed-off-by: Andreas Enge --- gnu-system.am | 1 + gnu/packages/pem.scm | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 49 insertions(+) create mode 100644 gnu/packages/pem.scm diff --git a/gnu-system.am b/gnu-system.am index 4ba110624c..b26fcc9ec1 100644 --- a/gnu-system.am +++ b/gnu-system.am @@ -142,6 +142,7 @@ GNU_SYSTEM_MODULES = \ gnu/packages/patchelf.scm \ gnu/packages/pcre.scm \ gnu/packages/pdf.scm \ + gnu/packages/pem.scm \ gnu/packages/perl.scm \ gnu/packages/pkg-config.scm \ gnu/packages/plotutils.scm \ diff --git a/gnu/packages/pem.scm b/gnu/packages/pem.scm new file mode 100644 index 0000000000..324ed607c7 --- /dev/null +++ b/gnu/packages/pem.scm @@ -0,0 +1,48 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2013 Eric Bavier +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see . + +(define-module (gnu packages pem) + #:use-module (guix packages) + #:use-module (guix licenses) + #:use-module (guix download) + #:use-module (guix build-system gnu) + #:use-module (gnu packages perl)) + +(define-public pem + (package + (name "pem") + (version "0.7.9") + (source + (origin + (method url-fetch) + (uri (string-append "mirror://gnu/pem/pem-" + version ".tar.gz")) + (sha256 + (base32 + "03iqcki1lakkck1akdyvljjapgqda3l0rh38id7jhrac9kcxqgg2")))) + (build-system gnu-build-system) + (inputs `(("perl" ,perl))) + (home-page "http://www.gnu.org/software/pem/") + (synopsis "Personal expenses manager") + (description + "GNU Pem is a simple tool for tracking personal income and +expenses. It operates from the command line and it stores its data +in a basic text format in your home directory. It can easily print +reports of your spending on different expenses via a basic search +feature.") + (license gpl3+))) -- cgit v1.2.3 From c3c516ea00bf1abc4ce1f412eaa8e73fbed903a0 Mon Sep 17 00:00:00 2001 From: David Thompson Date: Mon, 21 Oct 2013 19:50:01 -0400 Subject: gnu: Add libmikmod. * gnu/packages/sdl.scm: New file. * gnu-system.am (GNU_SYSTEM_MODULES): Add it. Signed-off-by: Andreas Enge --- gnu-system.am | 1 + gnu/packages/sdl.scm | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 50 insertions(+) create mode 100644 gnu/packages/sdl.scm diff --git a/gnu-system.am b/gnu-system.am index b26fcc9ec1..3b5384f354 100644 --- a/gnu-system.am +++ b/gnu-system.am @@ -160,6 +160,7 @@ GNU_SYSTEM_MODULES = \ gnu/packages/samba.scm \ gnu/packages/scheme.scm \ gnu/packages/screen.scm \ + gnu/packages/sdl.scm \ gnu/packages/shishi.scm \ gnu/packages/skribilo.scm \ gnu/packages/smalltalk.scm \ diff --git a/gnu/packages/sdl.scm b/gnu/packages/sdl.scm new file mode 100644 index 0000000000..ceb21735bc --- /dev/null +++ b/gnu/packages/sdl.scm @@ -0,0 +1,49 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2013 David Thompson +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see . + +(define-module (gnu packages sdl) + #:use-module (gnu packages) + #:use-module (guix licenses) + #:use-module (guix packages) + #:use-module (guix download) + #:use-module (guix build-system gnu) + #:use-module (gnu packages linux) + #:use-module (gnu packages xorg) + #:export (libmikmod)) + +(define libmikmod + (package + (name "libmikmod") + (version "3.3.3") + (source (origin + (method url-fetch) + (uri (string-append "mirror://sourceforge/mikmod/libmikmod/" + version "/libmikmod-" version ".tar.gz")) + (sha256 + (base32 + "0dr4kgvhq9wf2riibh178c2al996spwwak6zffpv5n5bqmw29w3r")))) + (build-system gnu-build-system) + (inputs `(("alsa-lib" ,alsa-lib) + ("libx11" ,libx11))) + (synopsis "Library for module sound formats.") + (description + "MikMod is able to play a wide range of module formats, as well as +digital sound files. It can take advantage of particular features of your +system, such as sound redirection over the network.") + (license lgpl2.1) + (home-page "http://mikmod.sourceforge.net/"))) -- cgit v1.2.3 From 5f6265298e3ccdd503655c0b7d8a678b9928d0a3 Mon Sep 17 00:00:00 2001 From: Andreas Enge Date: Sat, 26 Oct 2013 15:03:27 +0200 Subject: gnu: lzip: Update to 1.15. * gnu/packages/compression.scm (lzip): Update to 1.15. --- gnu/packages/compression.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gnu/packages/compression.scm b/gnu/packages/compression.scm index 056b117333..4d66ff6de6 100644 --- a/gnu/packages/compression.scm +++ b/gnu/packages/compression.scm @@ -232,14 +232,14 @@ (define-public lzo (define-public lzip (package (name "lzip") - (version "1.14") + (version "1.15") (source (origin (method url-fetch) (uri (string-append "mirror://savannah/lzip/lzip-" version ".tar.gz")) (sha256 (base32 - "1rybhk2pxpfh2789ck9mrkdv3bpx7b7miwndlshb5vb02m9crxbz")))) + "1dh5vmj5apizfawnsm50y7z064yx7cz3313przph16gwd3dgrlvw")))) (build-system gnu-build-system) (home-page "http://www.nongnu.org/lzip/lzip.html") (synopsis "Lossless data compressor based on the LZMA algorithm") -- cgit v1.2.3 From fdf3cb4cc067e6e064d810488eedb7c390990de1 Mon Sep 17 00:00:00 2001 From: Andreas Enge Date: Sat, 26 Oct 2013 15:09:15 +0200 Subject: gnu: mesa: Update URI. * gnu/packages/xorg.scm (mesa): Update URI. --- gnu/packages/xorg.scm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gnu/packages/xorg.scm b/gnu/packages/xorg.scm index 42f2d18b83..8ff1532879 100644 --- a/gnu/packages/xorg.scm +++ b/gnu/packages/xorg.scm @@ -4180,7 +4180,8 @@ (define-public mesa (origin (method url-fetch) (uri (string-append - "ftp://ftp.freedesktop.org/pub/mesa/" version + "ftp://ftp.freedesktop.org/pub/mesa/older-versions/8.x/" + version "/MesaLib-" version ".tar.bz2")) (sha256 -- cgit v1.2.3 From 3220c2f41ef9d9f1f6bc0cff3b0ae879908d045d Mon Sep 17 00:00:00 2001 From: Nikita Karetnikov Date: Mon, 28 Oct 2013 16:44:26 +0000 Subject: gnu: gcc-4.8: Upgrade to 4.8.2. * gnu/packages/gcc.scm (gcc-4.8): Upgrade to 4.8.2. --- gnu/packages/gcc.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gnu/packages/gcc.scm b/gnu/packages/gcc.scm index cececcacd3..dde0f0d934 100644 --- a/gnu/packages/gcc.scm +++ b/gnu/packages/gcc.scm @@ -202,14 +202,14 @@ (define-public gcc-4.7 (define-public gcc-4.8 (package (inherit gcc-4.7) - (version "4.8.1") + (version "4.8.2") (source (origin (method url-fetch) (uri (string-append "mirror://gnu/gcc/gcc-" version "/gcc-" version ".tar.bz2")) (sha256 (base32 - "04sqn0ds17ys8l6zn7vyyvjz1a7hsk4zb0381vlw9wnr7az48nsl")))))) + "1j6dwgby4g3p3lz7zkss32ghr45zpdidrg8xvazvn91lqxv25p09")))))) (define-public isl (package -- cgit v1.2.3 From 758704102848fb930f4ebba5945784cd8a64668d Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Mon, 28 Oct 2013 22:54:27 +0100 Subject: build-system/{cmake,perl}: Don't use (guix build gnu-build-system). Previously references to '%standard-phases' in builder-side code would refer to the wrong one. * guix/build-system/cmake.scm (cmake-build): Remove (guix build gnu-build-system) from the default MODULES value. * guix/build-system/perl.scm (perl-build): Likewise. --- guix/build-system/cmake.scm | 1 - guix/build-system/perl.scm | 1 - 2 files changed, 2 deletions(-) diff --git a/guix/build-system/cmake.scm b/guix/build-system/cmake.scm index 9461b19a2e..38f11cb3c3 100644 --- a/guix/build-system/cmake.scm +++ b/guix/build-system/cmake.scm @@ -65,7 +65,6 @@ (define* (cmake-build store name source inputs (guix build gnu-build-system) (guix build utils))) (modules '((guix build cmake-build-system) - (guix build gnu-build-system) (guix build utils)))) "Build SOURCE using CMAKE, and with INPUTS. This assumes that SOURCE provides a 'CMakeLists.txt' file as its build system." diff --git a/guix/build-system/perl.scm b/guix/build-system/perl.scm index eac8f53d3e..5dc50d97f3 100644 --- a/guix/build-system/perl.scm +++ b/guix/build-system/perl.scm @@ -57,7 +57,6 @@ (define* (perl-build store name source inputs (guix build gnu-build-system) (guix build utils))) (modules '((guix build perl-build-system) - (guix build gnu-build-system) (guix build utils)))) "Build SOURCE using PERL, and with INPUTS. This assumes that SOURCE provides a `Makefile.PL' file as its build system." -- cgit v1.2.3 From 011b18c33298a71c6b29fe5bc6ec101fc512c6d8 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Mon, 28 Oct 2013 22:54:48 +0100 Subject: gnu: Add python2-empy. * gnu/packages/python.scm (python2-empy): New variable. --- gnu/packages/python.scm | 39 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 38 insertions(+), 1 deletion(-) diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index 5b37ff6687..6d2c940773 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -19,7 +19,8 @@ ;;; along with GNU Guix. If not, see . (define-module (gnu packages python) - #:use-module ((guix licenses) #:select (bsd-3 bsd-style psfl x11 gpl2+)) + #:use-module ((guix licenses) + #:select (bsd-3 bsd-style psfl x11 gpl2+ lgpl2.1+)) #:use-module ((guix licenses) #:select (zlib) #:renamer (symbol-prefix-proc 'license:)) #:use-module (gnu packages) @@ -465,6 +466,41 @@ (define-public python2-dogtail other Python program.") (license gpl2+))) +(define-public python2-empy + (package + (name "python2-empy") + (version "3.3") + (source (origin + (method url-fetch) + (uri (string-append "http://www.alcyone.com/software/empy/empy-" + version ".tar.gz")) + (sha256 + (base32 + "01g8mmkfnvjdmlhsihwyx56lrg7r5m5d2fg6mnxsvy6g0dnl69f6")))) + (build-system python-build-system) + (arguments + `(#:python ,python-2 + #:phases (alist-replace + 'check + (lambda _ + (zero? (system* "./test.sh"))) + %standard-phases))) + (home-page "http://www.alcyone.com/software/empy/") + (synopsis "Templating system for Python") + (description + "EmPy is a system for embedding Python expressions and statements in +template text; it takes an EmPy source file, processes it, and produces +output. This is accomplished via expansions, which are special signals to the +EmPy system and are set off by a special prefix (by default the at sign, @). +EmPy can expand arbitrary Python expressions and statements in this way, as +well as a variety of special forms. Textual data not explicitly delimited in +this way is sent unaffected to the output, allowing Python to be used in +effect as a markup language. Also supported are callbacks via hooks, +recording and playback via diversions, and dynamic, chainable filters. The +system is highly configurable via command line options and embedded +commands.") + (license lgpl2.1+))) + (define-public scons (package (name "scons") @@ -490,3 +526,4 @@ (define-public scons In short, SCons is an easier, more reliable and faster way to build software.") (license x11))) + -- cgit v1.2.3 From 72e25e35a53e2833ac1d1d9c312d36ed78b239d6 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Mon, 28 Oct 2013 22:59:57 +0100 Subject: doc: Augment the "Porting" section. Reported by Andreas Enge . * doc/guix.texi (Porting): Document needed changes to (gnu packages bootstrap) and (gnu packages linux). --- doc/guix.texi | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/doc/guix.texi b/doc/guix.texi index 5d92ed5255..054d0af467 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -2086,6 +2086,13 @@ one: guix build --target=armv5tel-linux-gnueabi bootstrap-tarballs @end example +Once these are built, the @code{(gnu packages bootstrap)} module needs +to be updated to refer to these binaries on the target platform. In +addition, the @code{glibc-dynamic-linker} procedure in that module must +be augmented to return the right file name for libc's dynamic linker on +that platform; likewise, @code{system->linux-architecture} in @code{(gnu +packages linux)} must be taught about the new platform. + In practice, there may be some complications. First, it may be that the extended GNU triplet that specifies an ABI (like the @code{eabi} suffix above) is not recognized by all the GNU tools. Typically, glibc -- cgit v1.2.3 From cb558fcd9c3818c20232305630acd6a18039318b Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Tue, 29 Oct 2013 00:08:15 +0100 Subject: list-runtime-roots: List files referenced by environment variables. Inspired by . * nix/scripts/list-runtime-roots.in (%store-directory): New variable. (proc-environ-roots): New procedure. (): Use it. --- nix/scripts/list-runtime-roots.in | 36 +++++++++++++++++++++++++++++++++--- 1 file changed, 33 insertions(+), 3 deletions(-) diff --git a/nix/scripts/list-runtime-roots.in b/nix/scripts/list-runtime-roots.in index 45fa0733d5..4d329c5ff5 100644 --- a/nix/scripts/list-runtime-roots.in +++ b/nix/scripts/list-runtime-roots.in @@ -1,7 +1,7 @@ #!@GUILE@ -ds !# ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2012 Ludovic Courtès +;;; Copyright © 2012, 2013 Ludovic Courtès ;;; ;;; This file is part of GNU Guix. ;;; @@ -28,12 +28,17 @@ (ice-9 rdelim) (ice-9 popen) (srfi srfi-1) - (srfi srfi-26)) + (srfi srfi-26) + (rnrs io ports)) (define %proc-directory ;; Mount point of Linuxish /proc file system. "/proc") +(define %store-directory + (or (getenv "NIX_STORE_DIR") + "@storedir@")) + (define (proc-file-roots dir file) "Return a one-element list containing the file pointed to by DIR/FILE, or the empty list." @@ -78,6 +83,30 @@ or the empty list." (else (loop (read-line maps) roots))))))) +(define (proc-environ-roots dir) + "Return the list of store files referenced by DIR/environ, where DIR is a +/proc/XYZ directory." + (define split-on-nul + (cute string-tokenize <> + (char-set-complement (char-set #\nul)))) + + (define (rhs-file-names str) + (let ((equal (string-index str #\=))) + (if equal + (let* ((str (substring str (+ 1 equal))) + (rx (string-append (regexp-quote %store-directory) + "/[0-9a-z]{32}-[a-zA-Z0-9\\._+-]+"))) + (map match:substring (list-matches rx str))) + '()))) + + (define environ + (string-append dir "/environ")) + + (append-map rhs-file-names + (split-on-nul + (call-with-input-file environ + get-string-all)))) + (define (lsof-roots) "Return the list of roots as found by calling `lsof'." (catch 'system @@ -111,6 +140,7 @@ or the empty list." (append (proc-exe-roots proc) (proc-cwd-roots proc) (proc-fd-roots proc) - (proc-maps-roots proc)) + (proc-maps-roots proc) + (proc-environ-roots proc)) '()))) (append proc-roots (lsof-roots)))))) -- cgit v1.2.3 From 2a8417ac443f92503aefadca3a97e87e370b4897 Mon Sep 17 00:00:00 2001 From: Mark H Weaver Date: Tue, 29 Oct 2013 12:19:44 -0400 Subject: Change indentation rule for 'package' for the common case. * .dir-locals.el: Change the indentation rule for 'package' to do the right thing for packages without an inherit clause. --- .dir-locals.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.dir-locals.el b/.dir-locals.el index b55ec7590e..dc1a3d724d 100644 --- a/.dir-locals.el +++ b/.dir-locals.el @@ -13,7 +13,7 @@ (eval . (put 'lambda* 'scheme-indent-function 1)) (eval . (put 'substitute* 'scheme-indent-function 1)) (eval . (put 'with-directory-excursion 'scheme-indent-function 1)) - (eval . (put 'package 'scheme-indent-function 1)) + (eval . (put 'package 'scheme-indent-function 0)) (eval . (put 'substitute-keyword-arguments 'scheme-indent-function 1)) (eval . (put 'with-error-handling 'scheme-indent-function 0)) (eval . (put 'with-mutex 'scheme-indent-function 1)) -- cgit v1.2.3 From d46d8794a1b9e2e6d1b55d8b141945a6d30b6a71 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Tue, 29 Oct 2013 22:03:02 +0100 Subject: guix package: Declutter the entry point. * guix/scripts/package.scm (newest-available-packages, find-best-packages-by-name, find-package, upgradeable?): New procedures, moved from... (guix-package): ... here. --- guix/scripts/package.scm | 134 ++++++++++++++++++++++++++--------------------- 1 file changed, 73 insertions(+), 61 deletions(-) diff --git a/guix/scripts/package.scm b/guix/scripts/package.scm index 0b9e0c4f6f..84a33782da 100644 --- a/guix/scripts/package.scm +++ b/guix/scripts/package.scm @@ -403,6 +403,74 @@ (define-syntax-rule (waiting exp fmt rest ...) (format (current-error-port) " interrupted by signal ~a~%" SIGINT) #f)))) + +;;; +;;; Package specifications. +;;; + +(define newest-available-packages + (memoize find-newest-available-packages)) + +(define (find-best-packages-by-name name version) + "If version is #f, return the list of packages named NAME with the highest +version numbers; otherwise, return the list of packages named NAME and at +VERSION." + (if version + (find-packages-by-name name version) + (match (vhash-assoc name (newest-available-packages)) + ((_ version pkgs ...) pkgs) + (#f '())))) + +(define* (find-package name #:optional (output "out")) + "Find the package NAME; NAME may contain a version number and a +sub-derivation name. If the version number is not present, return the +preferred newest version. If the sub-derivation name is not present, use +OUTPUT." + (define request name) + + (define (ensure-output p sub-drv) + (if (member sub-drv (package-outputs p)) + p + (leave (_ "package `~a' lacks output `~a'~%") + (package-full-name p) + sub-drv))) + + (let*-values (((name sub-drv) + (match (string-rindex name #\:) + (#f (values name output)) + (colon (values (substring name 0 colon) + (substring name (+ 1 colon)))))) + ((name version) + (package-name->name+version name))) + (match (find-best-packages-by-name name version) + ((p) + (list name (package-version p) sub-drv (ensure-output p sub-drv) + (package-transitive-propagated-inputs p))) + ((p p* ...) + (warning (_ "ambiguous package specification `~a'~%") + request) + (warning (_ "choosing ~a from ~a~%") + (package-full-name p) + (location->string (package-location p))) + (list name (package-version p) sub-drv (ensure-output p sub-drv) + (package-transitive-propagated-inputs p))) + (() + (leave (_ "~a: package not found~%") request))))) + +(define (upgradeable? name current-version current-path) + "Return #t if there's a version of package NAME newer than CURRENT-VERSION, +or if the newest available version is equal to CURRENT-VERSION but would have +an output path different than CURRENT-PATH." + (match (vhash-assoc name (newest-available-packages)) + ((_ candidate-version pkg . rest) + (case (version-compare candidate-version current-version) + ((>) #t) + ((<) #f) + ((=) (let ((candidate-path (derivation->output-path + (package-derivation (%store) pkg)))) + (not (string=? current-path candidate-path)))))) + (#f #f))) + (define ftp-open* ;; Memoizing version of `ftp-open'. The goal is to avoid initiating a new ;; FTP connection for each package, esp. since most of them are to the same @@ -438,6 +506,11 @@ (define (check-package-freshness package) ((getaddrinfo-error ftp-error) #f) (else (apply throw key args)))))) + +;;; +;;; Search paths. +;;; + (define* (search-path-environment-variables packages profile #:optional (getenv getenv)) "Return environment variable definitions that may be needed for the use of @@ -654,67 +727,6 @@ (define (guile-missing?) (let ((out (derivation->output-path (%guile-for-build)))) (not (valid-path? (%store) out)))) - (define newest-available-packages - (memoize find-newest-available-packages)) - - (define (find-best-packages-by-name name version) - (if version - (find-packages-by-name name version) - (match (vhash-assoc name (newest-available-packages)) - ((_ version pkgs ...) pkgs) - (#f '())))) - - (define* (find-package name #:optional (output "out")) - ;; Find the package NAME; NAME may contain a version number and a - ;; sub-derivation name. If the version number is not present, - ;; return the preferred newest version. If the sub-derivation name is not - ;; present, use OUTPUT. - (define request name) - - (define (ensure-output p sub-drv) - (if (member sub-drv (package-outputs p)) - p - (leave (_ "package `~a' lacks output `~a'~%") - (package-full-name p) - sub-drv))) - - (let*-values (((name sub-drv) - (match (string-rindex name #\:) - (#f (values name output)) - (colon (values (substring name 0 colon) - (substring name (+ 1 colon)))))) - ((name version) - (package-name->name+version name))) - (match (find-best-packages-by-name name version) - ((p) - (list name (package-version p) sub-drv (ensure-output p sub-drv) - (package-transitive-propagated-inputs p))) - ((p p* ...) - (warning (_ "ambiguous package specification `~a'~%") - request) - (warning (_ "choosing ~a from ~a~%") - (package-full-name p) - (location->string (package-location p))) - (list name (package-version p) sub-drv (ensure-output p sub-drv) - (package-transitive-propagated-inputs p))) - (() - (leave (_ "~a: package not found~%") request))))) - - (define (upgradeable? name current-version current-path) - ;; Return #t if there's a version of package NAME newer than - ;; CURRENT-VERSION, or if the newest available version is equal to - ;; CURRENT-VERSION but would have an output path different than - ;; CURRENT-PATH. - (match (vhash-assoc name (newest-available-packages)) - ((_ candidate-version pkg . rest) - (case (version-compare candidate-version current-version) - ((>) #t) - ((<) #f) - ((=) (let ((candidate-path (derivation->output-path - (package-derivation (%store) pkg)))) - (not (string=? current-path candidate-path)))))) - (#f #f))) - (define (ensure-default-profile) ;; Ensure the default profile symlink and directory exist and are ;; writable. -- cgit v1.2.3 From 94f48f98f05239c4bd5b8281042452e68d8f99b2 Mon Sep 17 00:00:00 2001 From: Andreas Enge Date: Tue, 29 Oct 2013 23:41:49 +0100 Subject: gnu: mit-krb5: Update to 1.11.3. * gnu/packages/mit-krb5.scm (mit-krb5): Update to 1.11.3. --- gnu/packages/mit-krb5.scm | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/gnu/packages/mit-krb5.scm b/gnu/packages/mit-krb5.scm index fe1170721e..8222212d95 100644 --- a/gnu/packages/mit-krb5.scm +++ b/gnu/packages/mit-krb5.scm @@ -28,19 +28,17 @@ (define-module (gnu packages mit-krb5) (define-public mit-krb5 (package (name "mit-krb5") - (version "1.11") + (version "1.11.3") (source (origin (method url-fetch) (uri (string-append "http://web.mit.edu/kerberos/www/dist/krb5/" - version - "/krb5-" version - "-signed.tar")) + (string-copy version 0 (string-rindex version #\.)) + "/krb5-" version "-signed.tar")) (sha256 (base32 - "0lc6lxb98qzg4x01lppq700vkr1ax9rld09znahrinwqnf9zndzy")))) + "1daiaxgkxcryqs37w28v4x1vajqmay4l144d1zd9c2d7jjxr9gcs")))) (build-system gnu-build-system) (inputs `(("bison" ,bison) - ("perl" ,perl) - )) + ("perl" ,perl))) (arguments '(#:phases (alist-replace -- cgit v1.2.3 From f506ed920cdc105f090507e3cf8fc447f61756dc Mon Sep 17 00:00:00 2001 From: Andreas Enge Date: Wed, 30 Oct 2013 22:06:57 +0100 Subject: gnu: Add gstreamer-0.10. * gnu/packages/gstreamer.scm (gstreamer-0.10): New variable. * gnu/packages/patches/gstreamer-0.10-bison3.patch, gnu/packages/patches/gstreamer-0.10-silly-test.patch: New files. * gnu-system.am (dist_patch_DATA): Add patches. --- gnu-system.am | 2 ++ gnu/packages/gstreamer.scm | 27 +++++++++++++++++- gnu/packages/patches/gstreamer-0.10-bison3.patch | 32 ++++++++++++++++++++++ .../patches/gstreamer-0.10-silly-test.patch | 14 ++++++++++ 4 files changed, 74 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/gstreamer-0.10-bison3.patch create mode 100644 gnu/packages/patches/gstreamer-0.10-silly-test.patch diff --git a/gnu-system.am b/gnu-system.am index 3b5384f354..f77bb03da7 100644 --- a/gnu-system.am +++ b/gnu-system.am @@ -226,6 +226,8 @@ dist_patch_DATA = \ gnu/packages/patches/glibc-ldd-x86_64.patch \ gnu/packages/patches/glibc-no-ld-so-cache.patch \ gnu/packages/patches/grub-gets-undeclared.patch \ + gnu/packages/patches/gstreamer-0.10-bison3.patch \ + gnu/packages/patches/gstreamer-0.10-silly-test.patch \ gnu/packages/patches/guile-1.8-cpp-4.5.patch \ gnu/packages/patches/guile-default-utf8.patch \ gnu/packages/patches/guile-linux-syscalls.patch \ diff --git a/gnu/packages/gstreamer.scm b/gnu/packages/gstreamer.scm index 7478dc3188..ffdb4b83ad 100644 --- a/gnu/packages/gstreamer.scm +++ b/gnu/packages/gstreamer.scm @@ -21,12 +21,14 @@ (define-module (gnu packages gstreamer) #: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 perl) #:use-module (gnu packages pkg-config) - #:use-module (gnu packages python)) + #:use-module (gnu packages python) + #:use-module (gnu packages xml)) (define-public gstreamer (package @@ -64,6 +66,29 @@ (define-public gstreamer This package provides the core library and elements.") (license lgpl2.0+))) +(define-public gstreamer-0.10 + (package (inherit gstreamer) + (version "0.10.36") + (source + (origin + (method url-fetch) + (uri (string-append "http://gstreamer.freedesktop.org/src/gstreamer/gstreamer-" + version ".tar.xz")) + (sha256 + (base32 + "1nkid1n2l3rrlmq5qrf5yy06grrkwjh3yxl5g0w58w0pih8allci")) + (patches + (list (search-patch "gstreamer-0.10-bison3.patch") + (search-patch "gstreamer-0.10-silly-test.patch"))))) + (inputs + `(("bison" ,bison) + ("flex" ,flex) + ("glib" ,glib) + ("libxml2" ,libxml2) + ("perl" ,perl) + ("pkg-config" ,pkg-config) + ("python" ,python-2))))) + (define-public gst-plugins-base (package (name "gst-plugins-base") diff --git a/gnu/packages/patches/gstreamer-0.10-bison3.patch b/gnu/packages/patches/gstreamer-0.10-bison3.patch new file mode 100644 index 0000000000..f6eb90cb02 --- /dev/null +++ b/gnu/packages/patches/gstreamer-0.10-bison3.patch @@ -0,0 +1,32 @@ +See https://bugzilla.gnome.org/show_bug.cgi?id=706462 + +Subject: [PATCH] Make grammar.y work with Bison 3 + +YYLEX_PARAM is no longer supported in Bison 3. +--- + gst/parse/grammar.y | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/gst/parse/grammar.y b/gst/parse/grammar.y +index 8a9019c..f533389 100644 +--- a/gst/parse/grammar.y ++++ b/gst/parse/grammar.y +@@ -26,7 +26,6 @@ + */ + + #define YYERROR_VERBOSE 1 +-#define YYLEX_PARAM scanner + + #define YYENABLE_NLS 0 + +@@ -659,6 +658,7 @@ static int yyerror (void *scanner, graph_t *graph, const char *s); + %right '.' + %left '!' '=' + ++%lex-param { void *scanner } + %parse-param { void *scanner } + %parse-param { graph_t *graph } + %pure-parser +-- +1.8.3.4 + diff --git a/gnu/packages/patches/gstreamer-0.10-silly-test.patch b/gnu/packages/patches/gstreamer-0.10-silly-test.patch new file mode 100644 index 0000000000..678dd7b122 --- /dev/null +++ b/gnu/packages/patches/gstreamer-0.10-silly-test.patch @@ -0,0 +1,14 @@ +See http://lists.freedesktop.org/archives/gstreamer-bugs/2013-January/098461.html + +diff -ru gstreamer-0.10.36.orig/tests/check/Makefile.in gstreamer-0.10.36/tests/check/Makefile.in +--- gstreamer-0.10.36.orig/tests/check/Makefile.in 2012-02-20 23:48:29.000000000 +0100 ++++ gstreamer-0.10.36/tests/check/Makefile.in 2013-10-30 21:55:48.000000000 +0100 +@@ -42,7 +42,7 @@ + gst/gstbus$(EXEEXT) gst/gstcaps$(EXEEXT) $(am__EXEEXT_2) \ + gst/gstdatetime$(EXEEXT) gst/gstinfo$(EXEEXT) \ + gst/gstiterator$(EXEEXT) gst/gstmessage$(EXEEXT) \ +- gst/gstminiobject$(EXEEXT) gst/gstobject$(EXEEXT) \ ++ gst/gstminiobject$(EXEEXT) \ + gst/gstpad$(EXEEXT) gst/gstparamspecs$(EXEEXT) \ + gst/gstpoll$(EXEEXT) gst/gstsegment$(EXEEXT) \ + gst/gstsystemclock$(EXEEXT) gst/gstclock$(EXEEXT) \ -- cgit v1.2.3 From edac8846244437ea6566463090d26e7868069ef2 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Wed, 30 Oct 2013 15:26:14 +0100 Subject: guix package: Better separate option processing. * guix/scripts/package.scm (find-package): Rename to... (specification->package+output): ... this. Rename 'name' parmameter to 'spec'. Return a package and output name instead of a tuple. (options->installable): New procedure (guix-package)[process-actions]: Use it, and remove corresponding code. --- guix/scripts/package.scm | 357 +++++++++++++++++++++++++---------------------- 1 file changed, 189 insertions(+), 168 deletions(-) diff --git a/guix/scripts/package.scm b/guix/scripts/package.scm index 84a33782da..c71cf8e76c 100644 --- a/guix/scripts/package.scm +++ b/guix/scripts/package.scm @@ -421,41 +421,43 @@ (define (find-best-packages-by-name name version) ((_ version pkgs ...) pkgs) (#f '())))) -(define* (find-package name #:optional (output "out")) - "Find the package NAME; NAME may contain a version number and a -sub-derivation name. If the version number is not present, return the -preferred newest version. If the sub-derivation name is not present, use -OUTPUT." - (define request name) +(define* (specification->package+output spec #:optional (output "out")) + "Find the package and output specified by SPEC, or #f and #f; SPEC may +optionally contain a version number and an output name, as in these examples: + guile + guile-2.0.9 + guile:debug + guile-2.0.9:debug + +If SPEC does not specify a version number, return the preferred newest +version; if SPEC does not specify an output, return OUTPUT." (define (ensure-output p sub-drv) (if (member sub-drv (package-outputs p)) - p + sub-drv (leave (_ "package `~a' lacks output `~a'~%") (package-full-name p) sub-drv))) (let*-values (((name sub-drv) - (match (string-rindex name #\:) - (#f (values name output)) - (colon (values (substring name 0 colon) - (substring name (+ 1 colon)))))) + (match (string-rindex spec #\:) + (#f (values spec output)) + (colon (values (substring spec 0 colon) + (substring spec (+ 1 colon)))))) ((name version) (package-name->name+version name))) (match (find-best-packages-by-name name version) ((p) - (list name (package-version p) sub-drv (ensure-output p sub-drv) - (package-transitive-propagated-inputs p))) + (values p (ensure-output p sub-drv))) ((p p* ...) (warning (_ "ambiguous package specification `~a'~%") - request) + spec) (warning (_ "choosing ~a from ~a~%") (package-full-name p) (location->string (package-location p))) - (list name (package-version p) sub-drv (ensure-output p sub-drv) - (package-transitive-propagated-inputs p))) + (values p (ensure-output p sub-drv))) (() - (leave (_ "~a: package not found~%") request))))) + (leave (_ "~a: package not found~%") spec))))) (define (upgradeable? name current-version current-path) "Return #t if there's a version of package NAME newer than CURRENT-VERSION, @@ -707,6 +709,112 @@ (define %options (cons `(query list-available ,(or arg "")) result))))) +(define (options->installable opts installed) + "Given INSTALLED, the set of currently installed packages, and OPTS, the +result of 'args-fold', return two values: the new list of manifest entries, +and the list of derivations that need to be built." + (define (canonicalize-deps deps) + ;; Remove duplicate entries from DEPS, a list of propagated inputs, + ;; where each input is a name/path tuple. + (define (same? d1 d2) + (match d1 + ((_ p1) + (match d2 + ((_ p2) (eq? p1 p2)) + (_ #f))) + ((_ p1 out1) + (match d2 + ((_ p2 out2) + (and (string=? out1 out2) + (eq? p1 p2))) + (_ #f))))) + + (delete-duplicates deps same?)) + + (define* (package->tuple p #:optional output) + ;; Convert package P to a manifest tuple. + ;; When given a package via `-e', install the first of its + ;; outputs (XXX). + (check-package-freshness p) + (let* ((output (or output (car (package-outputs p)))) + (path (package-output (%store) p output)) + (deps (package-transitive-propagated-inputs p))) + `(,(package-name p) + ,(package-version p) + ,output + ,path + ,(canonicalize-deps deps)))) + + (define upgrade-regexps + (filter-map (match-lambda + (('upgrade . regexp) + (make-regexp (or regexp ""))) + (_ #f)) + opts)) + + (define packages-to-upgrade + (match upgrade-regexps + (() + '()) + ((_ ...) + (let ((newest (find-newest-available-packages))) + (filter-map (match-lambda + ((name version output path _) + (and (any (cut regexp-exec <> name) + upgrade-regexps) + (upgradeable? name version path) + (let ((output (or output "out"))) + (call-with-values + (lambda () + (specification->package+output name output)) + list)))) + (_ #f)) + installed))))) + + (define to-upgrade + (map (match-lambda + ((package output) + (package->tuple package output))) + packages-to-upgrade)) + + (define packages-to-install + (filter-map (match-lambda + (('install . (? package? p)) + (list p "out")) + (('install . (? string? spec)) + (and (not (store-path? spec)) + (let-values (((package output) + (specification->package+output spec))) + (and package (list package output))))) + (_ #f)) + opts)) + + (define to-install + (append (map (match-lambda + ((package output) + (package->tuple package output))) + packages-to-install) + (filter-map (match-lambda + (('install . (? package?)) + #f) + (('install . (? store-path? path)) + (let-values (((name version) + (package-name->name+version + (store-path-package-name path)))) + `(,name ,version #f ,path ()))) + (_ #f)) + opts))) + + (define derivations + (map (match-lambda + ((package output) + ;; FIXME: We should really depend on just OUTPUT rather than on all + ;; the outputs of PACKAGE. + (package-derivation (%store) package))) + (append packages-to-install packages-to-upgrade))) + + (values (append to-upgrade to-install) derivations)) + ;;; ;;; Entry point. @@ -780,43 +888,12 @@ (define dry-run? (assoc-ref opts 'dry-run?)) (define verbose? (assoc-ref opts 'verbose?)) (define profile (assoc-ref opts 'profile)) - (define (canonicalize-deps deps) - ;; Remove duplicate entries from DEPS, a list of propagated inputs, - ;; where each input is a name/path tuple. - (define (same? d1 d2) - (match d1 - ((_ p1) - (match d2 - ((_ p2) (eq? p1 p2)) - (_ #f))) - ((_ p1 out1) - (match d2 - ((_ p2 out2) - (and (string=? out1 out2) - (eq? p1 p2))) - (_ #f))))) - - (delete-duplicates deps same?)) - (define (same-package? tuple name out) (match tuple ((tuple-name _ tuple-output _ ...) (and (equal? name tuple-name) (equal? out tuple-output))))) - (define (package->tuple p) - ;; Convert package P to a tuple. - ;; When given a package via `-e', install the first of its - ;; outputs (XXX). - (let* ((out (car (package-outputs p))) - (path (package-output (%store) p out)) - (deps (package-transitive-propagated-inputs p))) - `(,(package-name p) - ,(package-version p) - ,out - ,p - ,(canonicalize-deps deps)))) - (define (show-what-to-remove/install remove install dry-run?) ;; Tell the user what's going to happen in high-level terms. ;; TODO: Report upgrades more clearly. @@ -922,127 +999,71 @@ (define (delete-generation number) (_ #f)) opts)) (else - (let* ((installed (manifest-packages (profile-manifest profile))) - (upgrade-regexps (filter-map (match-lambda - (('upgrade . regexp) - (make-regexp (or regexp ""))) - (_ #f)) - opts)) - (upgrade (if (null? upgrade-regexps) - '() - (let ((newest (find-newest-available-packages))) - (filter-map - (match-lambda - ((name version output path _) - (and (any (cut regexp-exec <> name) - upgrade-regexps) - (upgradeable? name version path) - (find-package name - (or output "out")))) - (_ #f)) - installed)))) - (install (append - upgrade - (filter-map (match-lambda - (('install . (? package? p)) - (package->tuple p)) - (('install . (? store-path?)) - #f) - (('install . package) - (find-package package)) + (let*-values (((installed) + (manifest-packages (profile-manifest profile))) + ((install* drv) + (options->installable opts installed))) + (let* ((remove (filter-map (match-lambda + (('remove . package) + package) (_ #f)) - opts))) - (drv (filter-map (match-lambda - ((name version sub-drv - (? package? package) - (deps ...)) - (check-package-freshness package) - (package-derivation (%store) package)) - (_ #f)) - install)) - (install* - (append - (filter-map (match-lambda - (('install . (? package? p)) - #f) - (('install . (? store-path? path)) - (let-values (((name version) - (package-name->name+version - (store-path-package-name - path)))) - `(,name ,version #f ,path ()))) - (_ #f)) - opts) - (map (lambda (tuple drv) - (match tuple - ((name version sub-drv _ (deps ...)) - (let ((output-path - (derivation->output-path - drv sub-drv))) - `(,name ,version ,sub-drv ,output-path - ,(canonicalize-deps deps)))))) - install drv))) - (remove (filter-map (match-lambda - (('remove . package) - package) - (_ #f)) - opts)) - (remove* (filter-map (cut assoc <> installed) remove)) - (packages - (append install* - (fold (lambda (package result) - (match package - ((name _ out _ ...) - (filter (negate - (cut same-package? <> - name out)) - result)))) - (fold alist-delete installed remove) - install*)))) - - (when (equal? profile %current-profile) - (ensure-default-profile)) - - (show-what-to-remove/install remove* install* dry-run?) - (show-what-to-build (%store) drv - #:use-substitutes? (assoc-ref opts 'substitutes?) - #:dry-run? dry-run?) - - (or dry-run? - (and (build-derivations (%store) drv) - (let* ((prof-drv (profile-derivation (%store) packages)) - (prof (derivation->output-path prof-drv)) - (old-drv (profile-derivation - (%store) (manifest-packages - (profile-manifest profile)))) - (old-prof (derivation->output-path old-drv)) - (number (generation-number profile)) - - ;; Always use NUMBER + 1 for the new profile, - ;; possibly overwriting a "previous future - ;; generation". - (name (format #f "~a-~a-link" - profile (+ 1 number)))) - (if (string=? old-prof prof) - (when (or (pair? install) (pair? remove)) - (format (current-error-port) - (_ "nothing to be done~%"))) - (and (parameterize ((current-build-output-port - ;; Output something when Guile - ;; needs to be built. - (if (or verbose? (guile-missing?)) - (current-error-port) - (%make-void-port "w")))) - (build-derivations (%store) (list prof-drv))) - (let ((count (length packages))) - (switch-symlinks name prof) - (switch-symlinks profile name) - (format #t (N_ "~a package in profile~%" - "~a packages in profile~%" - count) - count) - (display-search-paths packages - profile))))))))))) + opts)) + (remove* (filter-map (cut assoc <> installed) remove)) + (packages + (append install* + (fold (lambda (package result) + (match package + ((name _ out _ ...) + (filter (negate + (cut same-package? <> + name out)) + result)))) + (fold alist-delete installed remove) + install*)))) + + (when (equal? profile %current-profile) + (ensure-default-profile)) + + (show-what-to-remove/install remove* install* dry-run?) + (show-what-to-build (%store) drv + #:use-substitutes? (assoc-ref opts 'substitutes?) + #:dry-run? dry-run?) + + (or dry-run? + (and (build-derivations (%store) drv) + (let* ((prof-drv (profile-derivation (%store) packages)) + (prof (derivation->output-path prof-drv)) + (old-drv (profile-derivation + (%store) (manifest-packages + (profile-manifest profile)))) + (old-prof (derivation->output-path old-drv)) + (number (generation-number profile)) + + ;; Always use NUMBER + 1 for the new profile, + ;; possibly overwriting a "previous future + ;; generation". + (name (format #f "~a-~a-link" + profile (+ 1 number)))) + (if (string=? old-prof prof) + (when (or (pair? install*) (pair? remove)) + (format (current-error-port) + (_ "nothing to be done~%"))) + (and (parameterize ((current-build-output-port + ;; Output something when Guile + ;; needs to be built. + (if (or verbose? (guile-missing?)) + (current-error-port) + (%make-void-port "w")))) + (build-derivations (%store) (list prof-drv))) + (let ((count (length packages))) + (switch-symlinks name prof) + (switch-symlinks profile name) + (format #t (N_ "~a package in profile~%" + "~a packages in profile~%" + count) + count) + (display-search-paths packages + profile)))))))))))) (define (process-query opts) ;; Process any query specified by OPTS. Return #t when a query was -- cgit v1.2.3 From f067fc3e77a9e39aec137d02e3c4154bfbecaf70 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Wed, 30 Oct 2013 17:13:27 +0100 Subject: guix package: Introduce and types. * guix/scripts/package.scm (, ): New record types. (make-manifest, read-manifest, manifest->sexp, sexp->manifest, read-manifest, write-manifest, remove-manifest-entry, manifest-remove, manifest-installed?): New procedures. (profile-derivation): Take a manifest as the second parameter. Use 'manifest->sexp'. Expect objects instead of "tuples". Adjust callers accordingly. (search-path-environment-variables): Changes 'packages' parameter to 'entries'. Rename 'package-in-manifest->package' to 'manifest-entry->package'; expect objects. (display-search-paths): Rename 'packages' to 'entries'. (options->installable): Change 'installed' to 'manifest'. Have 'canonicalize-deps' return name/path tuples instead of raw packages. Rename 'package->tuple' to 'package->manifest-entry'. Use objects instead of tuples. (guix-package)[process-actions]: Likewise. Rename 'packages' to 'entries'. [process-query]: Use 'manifest-entries' instead of 'manifest-packages'. --- guix/scripts/package.scm | 267 ++++++++++++++++++++++++++++++++--------------- 1 file changed, 180 insertions(+), 87 deletions(-) diff --git a/guix/scripts/package.scm b/guix/scripts/package.scm index c71cf8e76c..c67c682108 100644 --- a/guix/scripts/package.scm +++ b/guix/scripts/package.scm @@ -25,6 +25,7 @@ (define-module (guix scripts package) #:use-module (guix packages) #:use-module (guix utils) #:use-module (guix config) + #:use-module (guix records) #:use-module ((guix build utils) #:select (directory-exists? mkdir-p)) #:use-module ((guix ftp-client) #:select (ftp-open)) #:use-module (ice-9 ftw) @@ -33,6 +34,7 @@ (define-module (guix scripts package) #:use-module (ice-9 regex) #:use-module (ice-9 vlist) #:use-module (srfi srfi-1) + #:use-module (srfi srfi-9) #:use-module (srfi srfi-11) #:use-module (srfi srfi-19) #:use-module (srfi srfi-26) @@ -67,30 +69,116 @@ (define %current-profile ;; coexist with Nix profiles. (string-append %profile-directory "/guix-profile")) + +;;; +;;; Manifests. +;;; + +(define-record-type + (manifest entries) + manifest? + (entries manifest-entries)) ; list of + +;; Convenient alias, to avoid name clashes. +(define make-manifest manifest) + +(define-record-type* manifest-entry + make-manifest-entry + manifest-entry? + (name manifest-entry-name) ; string + (version manifest-entry-version) ; string + (output manifest-entry-output ; string + (default "out")) + (path manifest-entry-path) ; store path + (dependencies manifest-entry-dependencies ; list of store paths + (default '()))) + (define (profile-manifest profile) "Return the PROFILE's manifest." - (let ((manifest (string-append profile "/manifest"))) - (if (file-exists? manifest) - (call-with-input-file manifest read) - '(manifest (version 1) (packages ()))))) + (let ((file (string-append profile "/manifest"))) + (if (file-exists? file) + (call-with-input-file file read-manifest) + (manifest '())))) + +(define (manifest->sexp manifest) + "Return a representation of MANIFEST as an sexp." + (define (entry->sexp entry) + (match entry + (($ name version path output (deps ...)) + (list name version path output deps)))) -(define (manifest-packages manifest) - "Return the packages listed in MANIFEST." (match manifest + (($ (entries ...)) + `(manifest (version 1) + (packages ,(map entry->sexp entries)))))) + +(define (sexp->manifest sexp) + "Parse SEXP as a manifest." + (match sexp (('manifest ('version 0) ('packages ((name version output path) ...))) - (zip name version output path - (make-list (length name) '()))) + (manifest + (map (lambda (name version output path) + (manifest-entry + (name name) + (version version) + (output output) + (path path))) + name version output path))) ;; Version 1 adds a list of propagated inputs to the ;; name/version/output/path tuples. (('manifest ('version 1) - ('packages (packages ...))) - packages) + ('packages ((name version output path deps) ...))) + (manifest + (map (lambda (name version output path deps) + (manifest-entry + (name name) + (version version) + (output output) + (path path) + (dependencies deps))) + name version output path deps))) (_ (error "unsupported manifest format" manifest)))) +(define (read-manifest port) + "Return the packages listed in MANIFEST." + (sexp->manifest (read port))) + +(define (write-manifest manifest port) + "Write MANIFEST to PORT." + (write (manifest->sexp manifest) port)) + +(define (remove-manifest-entry name lst) + "Remove the manifest entry named NAME from LST." + (remove (match-lambda + (($ entry-name) + (string=? name entry-name))) + lst)) + +(define (manifest-remove manifest names) + "Remove entries for each of NAMES from MANIFEST." + (make-manifest (fold remove-manifest-entry + (manifest-entries manifest) + names))) + +(define (manifest-installed? manifest name) + "Return #t if MANIFEST has an entry for NAME, #f otherwise." + (define (->bool x) + (not (not x))) + + (->bool (find (match-lambda + (($ entry-name) + (string=? entry-name name))) + (manifest-entries manifest)))) + + +;;; +;;; Profiles. +;;; + (define (profile-regexp profile) "Return a regular expression that matches PROFILE's name and number." (make-regexp (string-append "^" (regexp-quote (basename profile)) @@ -157,17 +245,9 @@ (define (previous-generation-number profile number) 0 (generation-numbers profile))) -(define (profile-derivation store packages) - "Return a derivation that builds a profile (a user environment) with -all of PACKAGES, a list of name/version/output/path/deps tuples." - (define packages* - ;; Turn any package object in PACKAGES into its output path. - (map (match-lambda - ((name version output path (deps ...)) - `(,name ,version ,output ,path - ,(map input->name+path deps)))) - packages)) - +(define (profile-derivation store manifest) + "Return a derivation that builds a profile (a user environment) with the +given MANIFEST." (define builder `(begin (use-modules (ice-9 pretty-print) @@ -183,9 +263,7 @@ (define builder (union-build output inputs) (call-with-output-file (string-append output "/manifest") (lambda (p) - (pretty-print '(manifest (version 1) - (packages ,packages*)) - p)))))) + (pretty-print ',(manifest->sexp manifest) p)))))) (define ensure-valid-input ;; If a package object appears in the given input, turn it into a @@ -200,11 +278,12 @@ (define ensure-valid-input (%current-system) builder (append-map (match-lambda - ((name version output path deps) + (($ name version + output path deps) `((,name ,path) ,@(map ensure-valid-input deps)))) - packages) + (manifest-entries manifest)) #:modules '((guix build union)))) (define (generation-number profile) @@ -216,7 +295,7 @@ (define (generation-number profile) (define (link-to-empty-profile generation) "Link GENERATION, a string, to the empty profile." - (let* ((drv (profile-derivation (%store) '())) + (let* ((drv (profile-derivation (%store) (manifest '()))) (prof (derivation->output-path drv "out"))) (when (not (build-derivations (%store) (list drv))) (leave (_ "failed to build the empty profile~%"))) @@ -513,11 +592,11 @@ (define (check-package-freshness package) ;;; Search paths. ;;; -(define* (search-path-environment-variables packages profile +(define* (search-path-environment-variables entries profile #:optional (getenv getenv)) "Return environment variable definitions that may be needed for the use of -PACKAGES in PROFILE. Use GETENV to determine the current settings and report -only settings not already effective." +ENTRIES, a list of manifest entries, in PROFILE. Use GETENV to determine the +current settings and report only settings not already effective." ;; Prefer ~/.guix-profile to the real profile directory name. (let ((profile (if (and %user-environment-directory @@ -530,9 +609,9 @@ (define* (search-path-environment-variables packages profile ;; The search path info is not stored in the manifest. Thus, we infer the ;; search paths from same-named packages found in the distro. - (define package-in-manifest->package + (define manifest-entry->package (match-lambda - ((name version _ ...) + (($ name version) (match (append (find-packages-by-name name version) (find-packages-by-name name)) ((p _ ...) p) @@ -554,16 +633,16 @@ (define search-path-definition variable (string-join directories separator))))))) - (let* ((packages (filter-map package-in-manifest->package packages)) + (let* ((packages (filter-map manifest-entry->package entries)) (search-paths (delete-duplicates (append-map package-native-search-paths packages)))) (filter-map search-path-definition search-paths)))) -(define (display-search-paths packages profile) +(define (display-search-paths entries profile) "Display the search path environment variables that may need to be set for -PACKAGES, in the context of PROFILE." - (let ((settings (search-path-environment-variables packages profile))) +ENTRIES, a list of manifest entries, in the context of PROFILE." + (let ((settings (search-path-environment-variables entries profile))) (unless (null? settings) (format #t (_ "The following environment variable definitions may be needed:~%")) (format #t "~{ ~a~%~}" settings)))) @@ -709,13 +788,14 @@ (define %options (cons `(query list-available ,(or arg "")) result))))) -(define (options->installable opts installed) - "Given INSTALLED, the set of currently installed packages, and OPTS, the -result of 'args-fold', return two values: the new list of manifest entries, -and the list of derivations that need to be built." +(define (options->installable opts manifest) + "Given MANIFEST, the current manifest, and OPTS, the result of 'args-fold', +return two values: the new list of manifest entries, and the list of +derivations that need to be built." (define (canonicalize-deps deps) ;; Remove duplicate entries from DEPS, a list of propagated inputs, - ;; where each input is a name/path tuple. + ;; where each input is a name/path tuple, and replace package objects with + ;; store paths. (define (same? d1 d2) (match d1 ((_ p1) @@ -729,21 +809,27 @@ (define (same? d1 d2) (eq? p1 p2))) (_ #f))))) - (delete-duplicates deps same?)) - - (define* (package->tuple p #:optional output) - ;; Convert package P to a manifest tuple. + (map (match-lambda + ((name package) + (list name (package-output (%store) package))) + ((name package output) + (list name (package-output (%store) package output)))) + (delete-duplicates deps same?))) + + (define (package->manifest-entry p output) + ;; Return a manifest entry for the OUTPUT of package P. + (check-package-freshness p) ;; When given a package via `-e', install the first of its ;; outputs (XXX). - (check-package-freshness p) (let* ((output (or output (car (package-outputs p)))) (path (package-output (%store) p output)) (deps (package-transitive-propagated-inputs p))) - `(,(package-name p) - ,(package-version p) - ,output - ,path - ,(canonicalize-deps deps)))) + (manifest-entry + (name (package-name p)) + (version (package-version p)) + (output output) + (path path) + (dependencies (canonicalize-deps deps))))) (define upgrade-regexps (filter-map (match-lambda @@ -759,7 +845,7 @@ (define packages-to-upgrade ((_ ...) (let ((newest (find-newest-available-packages))) (filter-map (match-lambda - ((name version output path _) + (($ name version output path _) (and (any (cut regexp-exec <> name) upgrade-regexps) (upgradeable? name version path) @@ -769,12 +855,12 @@ (define packages-to-upgrade (specification->package+output name output)) list)))) (_ #f)) - installed))))) + (manifest-entries manifest)))))) (define to-upgrade (map (match-lambda ((package output) - (package->tuple package output))) + (package->manifest-entry package output))) packages-to-upgrade)) (define packages-to-install @@ -792,7 +878,7 @@ (define packages-to-install (define to-install (append (map (match-lambda ((package output) - (package->tuple package output))) + (package->manifest-entry package output))) packages-to-install) (filter-map (match-lambda (('install . (? package?)) @@ -801,7 +887,11 @@ (define to-install (let-values (((name version) (package-name->name+version (store-path-package-name path)))) - `(,name ,version #f ,path ()))) + (manifest-entry + (name name) + (version version) + (output #f) + (path path)))) (_ #f)) opts))) @@ -888,17 +978,17 @@ (define dry-run? (assoc-ref opts 'dry-run?)) (define verbose? (assoc-ref opts 'verbose?)) (define profile (assoc-ref opts 'profile)) - (define (same-package? tuple name out) - (match tuple - ((tuple-name _ tuple-output _ ...) - (and (equal? name tuple-name) - (equal? out tuple-output))))) + (define (same-package? entry name output) + (match entry + (($ entry-name _ entry-output _ ...) + (and (equal? name entry-name) + (equal? output entry-output))))) (define (show-what-to-remove/install remove install dry-run?) ;; Tell the user what's going to happen in high-level terms. ;; TODO: Report upgrades more clearly. (match remove - (((name version _ path _) ..1) + ((($ name version _ path _) ..1) (let ((len (length name)) (remove (map (cut format #f " ~a-~a\t~a" <> <> <>) name version path))) @@ -915,7 +1005,7 @@ (define (show-what-to-remove/install remove install dry-run?) remove)))) (_ #f)) (match install - (((name version output path _) ..1) + ((($ name version output path _) ..1) (let ((len (length name)) (install (map (cut format #f " ~a-~a\t~a\t~a" <> <> <> <>) name version output path))) @@ -999,26 +1089,28 @@ (define (delete-generation number) (_ #f)) opts)) (else - (let*-values (((installed) - (manifest-packages (profile-manifest profile))) + (let*-values (((manifest) + (profile-manifest profile)) ((install* drv) - (options->installable opts installed))) - (let* ((remove (filter-map (match-lambda - (('remove . package) - package) - (_ #f)) - opts)) - (remove* (filter-map (cut assoc <> installed) remove)) - (packages + (options->installable opts manifest))) + (let* ((remove (filter-map (match-lambda + (('remove . package) + package) + (_ #f)) + opts)) + (remove* (filter (cut manifest-installed? manifest <>) + remove)) + (entries (append install* (fold (lambda (package result) (match package - ((name _ out _ ...) + (($ name _ out _ ...) (filter (negate (cut same-package? <> name out)) result)))) - (fold alist-delete installed remove) + (manifest-entries + (manifest-remove manifest remove)) install*)))) (when (equal? profile %current-profile) @@ -1031,11 +1123,12 @@ (define (delete-generation number) (or dry-run? (and (build-derivations (%store) drv) - (let* ((prof-drv (profile-derivation (%store) packages)) + (let* ((prof-drv (profile-derivation (%store) + (make-manifest + entries))) (prof (derivation->output-path prof-drv)) (old-drv (profile-derivation - (%store) (manifest-packages - (profile-manifest profile)))) + (%store) (profile-manifest profile))) (old-prof (derivation->output-path old-drv)) (number (generation-number profile)) @@ -1055,14 +1148,14 @@ (define (delete-generation number) (current-error-port) (%make-void-port "w")))) (build-derivations (%store) (list prof-drv))) - (let ((count (length packages))) + (let ((count (length entries))) (switch-symlinks name prof) (switch-symlinks profile name) (format #t (N_ "~a package in profile~%" "~a packages in profile~%" count) count) - (display-search-paths packages + (display-search-paths entries profile)))))))))))) (define (process-query opts) @@ -1083,13 +1176,13 @@ (define (list-generation number) (format #t (_ "~a\t(current)~%") header) (format #t "~a~%" header))) (for-each (match-lambda - ((name version output location _) + (($ name version output location _) (format #t " ~a\t~a\t~a\t~a~%" name version output location))) ;; Show most recently installed packages last. (reverse - (manifest-packages + (manifest-entries (profile-manifest (format #f "~a-~a-link" profile number))))) (newline))) @@ -1116,9 +1209,9 @@ (define (list-generation number) (('list-installed regexp) (let* ((regexp (and regexp (make-regexp regexp))) (manifest (profile-manifest profile)) - (installed (manifest-packages manifest))) + (installed (manifest-entries manifest))) (for-each (match-lambda - ((name version output path _) + (($ name version output path _) (when (or (not regexp) (regexp-exec regexp name)) (format #t "~a\t~a\t~a\t~a~%" @@ -1159,9 +1252,9 @@ (define (list-generation number) (('search-paths) (let* ((manifest (profile-manifest profile)) - (packages (manifest-packages manifest)) - (settings (search-path-environment-variables packages - profile + (entries (manifest-entries manifest)) + (packages (map manifest-entry-name entries)) + (settings (search-path-environment-variables entries profile (const #f)))) (format #t "~{~a~%~}" settings) #t)) -- cgit v1.2.3 From d595e456c1555de5a4ffdbcd7cf99e07b06e2a4f Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Wed, 30 Oct 2013 17:31:05 +0100 Subject: guix package: Always use the term "profile", not "user environment". * guix/scripts/package.scm (%user-environment-directory): Rename to... (%user-profile-directory): ... this. Update users accordingly. (profile-derivation): Use the term "profile" instead of "user environment", and use "profile" as the derivation name. --- guix/scripts/package.scm | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/guix/scripts/package.scm b/guix/scripts/package.scm index c67c682108..750b69beba 100644 --- a/guix/scripts/package.scm +++ b/guix/scripts/package.scm @@ -51,10 +51,10 @@ (define %store ;;; -;;; User environment. +;;; User profile. ;;; -(define %user-environment-directory +(define %user-profile-directory (and=> (getenv "HOME") (cut string-append <> "/.guix-profile"))) @@ -246,8 +246,8 @@ (define (previous-generation-number profile number) (generation-numbers profile))) (define (profile-derivation store manifest) - "Return a derivation that builds a profile (a user environment) with the -given MANIFEST." + "Return a derivation that builds a profile (aka. 'user environment') with +the given MANIFEST." (define builder `(begin (use-modules (ice-9 pretty-print) @@ -258,7 +258,7 @@ (define builder (let ((output (assoc-ref %outputs "out")) (inputs (map cdr %build-inputs))) - (format #t "building user environment `~a' with ~a packages...~%" + (format #t "building profile `~a' with ~a packages...~%" output (length inputs)) (union-build output inputs) (call-with-output-file (string-append output "/manifest") @@ -274,7 +274,7 @@ (define ensure-valid-input (input input))) - (build-expression->derivation store "user-environment" + (build-expression->derivation store "profile" (%current-system) builder (append-map (match-lambda @@ -599,11 +599,11 @@ (define* (search-path-environment-variables entries profile current settings and report only settings not already effective." ;; Prefer ~/.guix-profile to the real profile directory name. - (let ((profile (if (and %user-environment-directory + (let ((profile (if (and %user-profile-directory (false-if-exception - (string=? (readlink %user-environment-directory) + (string=? (readlink %user-profile-directory) profile))) - %user-environment-directory + %user-profile-directory profile))) ;; The search path info is not stored in the manifest. Thus, we infer the @@ -936,11 +936,11 @@ (define (rtfm) (exit 1)) ;; Create ~/.guix-profile if it doesn't exist yet. - (when (and %user-environment-directory + (when (and %user-profile-directory %current-profile (not (false-if-exception - (lstat %user-environment-directory)))) - (symlink %current-profile %user-environment-directory)) + (lstat %user-profile-directory)))) + (symlink %current-profile %user-profile-directory)) (let ((s (stat %profile-directory #f))) ;; Attempt to create /…/profiles/per-user/$USER if needed. -- cgit v1.2.3 From d0dc4907d6dac82ba482472845e83d7411c74ed5 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Wed, 30 Oct 2013 19:09:32 +0100 Subject: derivations: 'derivation-path->output-path' honors the 'output' parameter. * guix/derivations.scm (derivation-path->output-path): Pass OUTPUT. * tests/derivations.scm ("multiple-output derivation, derivation-path->output-path"): New test. --- guix/derivations.scm | 3 ++- tests/derivations.scm | 17 +++++++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/guix/derivations.scm b/guix/derivations.scm index 433a8f145e..48e9d5ec05 100644 --- a/guix/derivations.scm +++ b/guix/derivations.scm @@ -441,7 +441,8 @@ (define derivation-path->output-path (lambda* (path #:optional (output "out")) "Read the derivation from PATH (`/nix/store/xxx.drv'), and return the store path of its output OUTPUT." - (derivation->output-path (call-with-input-file path read-derivation))))) + (derivation->output-path (call-with-input-file path read-derivation) + output)))) (define (derivation-path->output-paths path) "Read the derivation from PATH (`/nix/store/xxx.drv'), and return the diff --git a/tests/derivations.scm b/tests/derivations.scm index 4756fb9cba..1b32ab5ffd 100644 --- a/tests/derivations.scm +++ b/tests/derivations.scm @@ -260,6 +260,23 @@ (define prefix-len (string-length dir)) (and (eq? 'one (call-with-input-file one read)) (eq? 'two (call-with-input-file two read))))))) +(test-assert "multiple-output derivation, derivation-path->output-path" + (let* ((builder (add-text-to-store %store "builder.sh" + "echo one > $out ; echo two > $second" + '())) + (drv (derivation %store "multiple" + %bash `(,builder) + #:outputs '("out" "second"))) + (drv-file (derivation-file-name drv)) + (one (derivation->output-path drv "out")) + (two (derivation->output-path drv "second")) + (first (derivation-path->output-path drv-file "out")) + (second (derivation-path->output-path drv-file "second"))) + (and (not (string=? one two)) + (string-suffix? "-second" two) + (string=? first one) + (string=? second two)))) + (test-assert "user of multiple-output derivation" ;; Check whether specifying several inputs coming from the same ;; multiple-output derivation works. -- cgit v1.2.3 From c065c443a03960b6d535783ac68f9cff3236d262 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Wed, 30 Oct 2013 21:43:37 +0100 Subject: union: Make the log port a parameter. * guix/build/union.scm (union-build): Add 'log-port' keyword parameter; use it. --- guix/build/union.scm | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/guix/build/union.scm b/guix/build/union.scm index 077b7fe530..0f8c87e171 100644 --- a/guix/build/union.scm +++ b/guix/build/union.scm @@ -100,7 +100,8 @@ (define non-collisions ,@(map loop dirs)))) (leaf leaf)))) -(define* (union-build output directories) +(define* (union-build output directories + #:key (log-port (current-error-port))) "Build in the OUTPUT directory a symlink tree that is the union of all the DIRECTORIES." (define (file-tree dir) @@ -174,6 +175,8 @@ (define (resolve-collision leaves) (setvbuf (current-output-port) _IOLBF) (setvbuf (current-error-port) _IOLBF) + (when (file-port? log-port) + (setvbuf log-port _IOLBF)) (mkdir output) (let loop ((tree (delete-duplicate-leaves @@ -189,8 +192,7 @@ (define (resolve-collision leaves) ;; A leaf: create a symlink. (let* ((dir (string-join dir "/")) (target (string-append output "/" dir "/" (basename tree)))) - (format (current-error-port) "`~a' ~~> `~a'~%" - tree target) + (format log-port "`~a' ~~> `~a'~%" tree target) (symlink tree target))) (((? string? subdir) leaves ...) ;; A sub-directory: create it in OUTPUT, and iterate over LEAVES. -- cgit v1.2.3 From 1fcc3ba3090a1369afd50c47dc50c17695672120 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Wed, 30 Oct 2013 22:01:43 +0100 Subject: guix package: Specify inputs for each manifest entry. * guix/scripts/package.scm (): Add 'inputs' field. (manifest=?, lower-input): New procedure. (profile-derivation)[builder]: Add #:log-port argument to 'union-build'. [ensure-valid-input]: Remove. Add each entry's inputs to the input list. (options->installable): Return just the list of entries. [package->manifest-entry]: Set 'inputs' field. [canonicalize-deps]: Rename to... [deduplicate]: ... this. Remove input fiddling. (guix-package)[process-actions]: Use 'manifest=?' to compare the new and old manifests. Pass directly PROF-DRV to 'show-what-to-build'. Pass #:print-build-trace #f to 'set-build-options'. --- guix/scripts/package.scm | 202 ++++++++++++++++++++++------------------------- 1 file changed, 96 insertions(+), 106 deletions(-) diff --git a/guix/scripts/package.scm b/guix/scripts/package.scm index 750b69beba..339d1afd36 100644 --- a/guix/scripts/package.scm +++ b/guix/scripts/package.scm @@ -91,7 +91,9 @@ (define-record-type* manifest-entry (default "out")) (path manifest-entry-path) ; store path (dependencies manifest-entry-dependencies ; list of store paths - (default '()))) + (default '())) + (inputs manifest-entry-inputs ; list of inputs to build + (default '()))) ; this entry (define (profile-manifest profile) "Return the PROFILE's manifest." @@ -174,6 +176,13 @@ (define (->bool x) (string=? entry-name name))) (manifest-entries manifest)))) +(define (manifest=? m1 m2) + "Return #t if manifests M1 and M2 are equal. This differs from 'equal?' in +that the 'inputs' field is ignored for the comparison, since it is know to +have no effect on the manifest contents." + (equal? (manifest->sexp m1) + (manifest->sexp m2))) + ;;; ;;; Profiles. @@ -258,31 +267,28 @@ (define builder (let ((output (assoc-ref %outputs "out")) (inputs (map cdr %build-inputs))) - (format #t "building profile `~a' with ~a packages...~%" + (format #t "building profile '~a' with ~a packages...~%" output (length inputs)) - (union-build output inputs) + (union-build output inputs + #:log-port (%make-void-port "w")) (call-with-output-file (string-append output "/manifest") (lambda (p) (pretty-print ',(manifest->sexp manifest) p)))))) - (define ensure-valid-input - ;; If a package object appears in the given input, turn it into a - ;; derivation path. - (match-lambda - ((name (? package? p) sub-drv ...) - `(,name ,(package-derivation (%store) p) ,@sub-drv)) - (input - input))) - (build-expression->derivation store "profile" (%current-system) builder (append-map (match-lambda + (($ name version + output path deps (inputs ..1)) + (map (cute lower-input + (%store) <>) + inputs)) (($ name version output path deps) - `((,name ,path) - ,@(map ensure-valid-input - deps)))) + ;; Assume PATH and DEPS are + ;; already valid. + `((,name ,path) ,@deps))) (manifest-entries manifest)) #:modules '((guix build union)))) @@ -429,6 +435,16 @@ (define matches? (package-name p2)))) same-location?)) +(define* (lower-input store input #:optional (system (%current-system))) + "Lower INPUT so that it contains derivations instead of packages." + (match input + ((name (? package? package)) + `(,name ,(package-derivation store package system))) + ((name (? package? package) output) + `(,name ,(package-derivation store package system) + ,output)) + (_ input))) + (define (input->name+path input) "Convert the name/package/sub-drv tuple INPUT to a name/store-path tuple." (let loop ((input input)) @@ -790,12 +806,10 @@ (define %options (define (options->installable opts manifest) "Given MANIFEST, the current manifest, and OPTS, the result of 'args-fold', -return two values: the new list of manifest entries, and the list of -derivations that need to be built." - (define (canonicalize-deps deps) - ;; Remove duplicate entries from DEPS, a list of propagated inputs, - ;; where each input is a name/path tuple, and replace package objects with - ;; store paths. +return the new list of manifest entries." + (define (deduplicate deps) + ;; Remove duplicate entries from DEPS, a list of propagated inputs, where + ;; each input is a name/path tuple. (define (same? d1 d2) (match d1 ((_ p1) @@ -809,12 +823,7 @@ (define (same? d1 d2) (eq? p1 p2))) (_ #f))))) - (map (match-lambda - ((name package) - (list name (package-output (%store) package))) - ((name package output) - (list name (package-output (%store) package output)))) - (delete-duplicates deps same?))) + (delete-duplicates deps same?)) (define (package->manifest-entry p output) ;; Return a manifest entry for the OUTPUT of package P. @@ -823,13 +832,15 @@ (define (package->manifest-entry p output) ;; outputs (XXX). (let* ((output (or output (car (package-outputs p)))) (path (package-output (%store) p output)) - (deps (package-transitive-propagated-inputs p))) + (deps (deduplicate (package-transitive-propagated-inputs p)))) (manifest-entry (name (package-name p)) (version (package-version p)) (output output) (path path) - (dependencies (canonicalize-deps deps))))) + (dependencies (map input->name+path deps)) + (inputs (cons (list (package-name p) p output) + deps))))) (define upgrade-regexps (filter-map (match-lambda @@ -895,15 +906,7 @@ (define to-install (_ #f)) opts))) - (define derivations - (map (match-lambda - ((package output) - ;; FIXME: We should really depend on just OUTPUT rather than on all - ;; the outputs of PACKAGE. - (package-derivation (%store) package))) - (append packages-to-install packages-to-upgrade))) - - (values (append to-upgrade to-install) derivations)) + (append to-upgrade to-install)) ;;; @@ -1089,74 +1092,60 @@ (define (delete-generation number) (_ #f)) opts)) (else - (let*-values (((manifest) - (profile-manifest profile)) - ((install* drv) - (options->installable opts manifest))) - (let* ((remove (filter-map (match-lambda - (('remove . package) - package) - (_ #f)) - opts)) - (remove* (filter (cut manifest-installed? manifest <>) - remove)) - (entries - (append install* - (fold (lambda (package result) - (match package - (($ name _ out _ ...) - (filter (negate - (cut same-package? <> - name out)) - result)))) - (manifest-entries - (manifest-remove manifest remove)) - install*)))) - - (when (equal? profile %current-profile) - (ensure-default-profile)) - - (show-what-to-remove/install remove* install* dry-run?) - (show-what-to-build (%store) drv - #:use-substitutes? (assoc-ref opts 'substitutes?) - #:dry-run? dry-run?) - - (or dry-run? - (and (build-derivations (%store) drv) - (let* ((prof-drv (profile-derivation (%store) - (make-manifest - entries))) - (prof (derivation->output-path prof-drv)) - (old-drv (profile-derivation - (%store) (profile-manifest profile))) - (old-prof (derivation->output-path old-drv)) - (number (generation-number profile)) - - ;; Always use NUMBER + 1 for the new profile, - ;; possibly overwriting a "previous future - ;; generation". - (name (format #f "~a-~a-link" - profile (+ 1 number)))) - (if (string=? old-prof prof) - (when (or (pair? install*) (pair? remove)) - (format (current-error-port) - (_ "nothing to be done~%"))) - (and (parameterize ((current-build-output-port - ;; Output something when Guile - ;; needs to be built. - (if (or verbose? (guile-missing?)) - (current-error-port) - (%make-void-port "w")))) - (build-derivations (%store) (list prof-drv))) - (let ((count (length entries))) - (switch-symlinks name prof) - (switch-symlinks profile name) - (format #t (N_ "~a package in profile~%" - "~a packages in profile~%" - count) - count) - (display-search-paths entries - profile)))))))))))) + (let* ((manifest (profile-manifest profile)) + (install* (options->installable opts manifest)) + (remove (filter-map (match-lambda + (('remove . package) + package) + (_ #f)) + opts)) + (remove* (filter (cut manifest-installed? manifest <>) + remove)) + (entries + (append install* + (fold (lambda (package result) + (match package + (($ name _ out _ ...) + (filter (negate + (cut same-package? <> + name out)) + result)))) + (manifest-entries + (manifest-remove manifest remove)) + install*))) + (new (make-manifest entries))) + + (when (equal? profile %current-profile) + (ensure-default-profile)) + + (if (manifest=? new manifest) + (format (current-error-port) (_ "nothing to be done~%")) + (let ((prof-drv (profile-derivation (%store) new))) + (show-what-to-remove/install remove* install* dry-run?) + (show-what-to-build (%store) (list prof-drv) + #:use-substitutes? + (assoc-ref opts 'substitutes?) + #:dry-run? dry-run?) + + (or dry-run? + (let* ((prof (derivation->output-path prof-drv)) + (number (generation-number profile)) + + ;; Always use NUMBER + 1 for the new profile, + ;; possibly overwriting a "previous future + ;; generation". + (name (format #f "~a-~a-link" + profile (+ 1 number)))) + (and (build-derivations (%store) (list prof-drv)) + (let ((count (length entries))) + (switch-symlinks name prof) + (switch-symlinks profile name) + (format #t (N_ "~a package in profile~%" + "~a packages in profile~%" + count) + count) + (display-search-paths entries + profile))))))))))) (define (process-query opts) ;; Process any query specified by OPTS. Return #t when a query was @@ -1266,6 +1255,7 @@ (define (list-generation number) (with-error-handling (parameterize ((%store (open-connection))) (set-build-options (%store) + #:print-build-trace #f #:fallback? (assoc-ref opts 'fallback?) #:use-substitutes? (assoc-ref opts 'substitutes?) -- cgit v1.2.3 From 477d30d0d8dddf1f92e4a2730cbc4434d8f81c0c Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Wed, 30 Oct 2013 22:08:35 +0100 Subject: guix package: Factorize generation file name computation. * guix/scripts/package.scm (generation-file-name): New procedure. Change all occurrences of (format #f "~a-~a-link" profile number) to use it. --- guix/scripts/package.scm | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/guix/scripts/package.scm b/guix/scripts/package.scm index 339d1afd36..008ae53b47 100644 --- a/guix/scripts/package.scm +++ b/guix/scripts/package.scm @@ -299,6 +299,10 @@ (define (generation-number profile) (compose string->number (cut match:substring <> 1))) 0)) +(define (generation-file-name profile generation) + "Return the file name for PROFILE's GENERATION." + (format #f "~a-~a-link" profile generation)) + (define (link-to-empty-profile generation) "Link GENERATION, a string, to the empty profile." (let* ((drv (profile-derivation (%store) (manifest '()))) @@ -312,8 +316,7 @@ (define (switch-to-previous-generation profile) "Atomically switch PROFILE to the previous generation." (let* ((number (generation-number profile)) (previous-number (previous-generation-number profile number)) - (previous-generation (format #f "~a-~a-link" - profile previous-number))) + (previous-generation (generation-file-name profile previous-number))) (format #t (_ "switching from generation ~a to ~a~%") number previous-number) (switch-symlinks profile previous-generation))) @@ -322,8 +325,7 @@ (define (roll-back profile) "Roll back to the previous generation of PROFILE." (let* ((number (generation-number profile)) (previous-number (previous-generation-number profile number)) - (previous-generation (format #f "~a-~a-link" - profile previous-number)) + (previous-generation (generation-file-name profile previous-number)) (manifest (string-append previous-generation "/manifest"))) (cond ((not (file-exists? profile)) ; invalid profile (leave (_ "profile '~a' does not exist~%") @@ -341,7 +343,7 @@ (define (roll-back profile) (define (generation-time profile number) "Return the creation time of a generation in the UTC format." (make-time time-utc 0 - (stat:ctime (stat (format #f "~a-~a-link" profile number))))) + (stat:ctime (stat (generation-file-name profile number))))) (define* (matching-generations str #:optional (profile %current-profile) #:key (duration-relation <=)) @@ -1029,15 +1031,15 @@ (define current-generation-number (generation-number profile)) (define (display-and-delete number) - (let ((generation (format #f "~a-~a-link" profile number))) + (let ((generation (generation-file-name profile number))) (unless (zero? number) (format #t (_ "deleting ~a~%") generation) (delete-file generation)))) (define (delete-generation number) (let* ((previous-number (previous-generation-number profile number)) - (previous-generation (format #f "~a-~a-link" - profile previous-number))) + (previous-generation + (generation-file-name profile previous-number))) (cond ((zero? number)) ; do not delete generation 0 ((and (= number current-generation-number) (not (file-exists? previous-generation))) @@ -1128,14 +1130,14 @@ (define (delete-generation number) #:dry-run? dry-run?) (or dry-run? - (let* ((prof (derivation->output-path prof-drv)) - (number (generation-number profile)) + (let* ((prof (derivation->output-path prof-drv)) + (number (generation-number profile)) ;; Always use NUMBER + 1 for the new profile, ;; possibly overwriting a "previous future ;; generation". - (name (format #f "~a-~a-link" - profile (+ 1 number)))) + (name (generation-file-name profile + (+ 1 number)))) (and (build-derivations (%store) (list prof-drv)) (let ((count (length entries))) (switch-symlinks name prof) @@ -1173,7 +1175,7 @@ (define (list-generation number) (reverse (manifest-entries (profile-manifest - (format #f "~a-~a-link" profile number))))) + (generation-file-name profile number))))) (newline))) (cond ((not (file-exists? profile)) ; XXX: race condition -- cgit v1.2.3 From cedf081abb6e3bd0bcf0cdab6000cd011ad7b52b Mon Sep 17 00:00:00 2001 From: Andreas Enge Date: Wed, 30 Oct 2013 22:57:52 +0100 Subject: gnu: gstreamer-0.10: Propagate input libxml2. * gnu/packages/gstreamer.scm (gstreamer-0.10): Propagate input libxml2. --- gnu/packages/gstreamer.scm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gnu/packages/gstreamer.scm b/gnu/packages/gstreamer.scm index ffdb4b83ad..c32e480063 100644 --- a/gnu/packages/gstreamer.scm +++ b/gnu/packages/gstreamer.scm @@ -80,11 +80,12 @@ (define-public gstreamer-0.10 (patches (list (search-patch "gstreamer-0.10-bison3.patch") (search-patch "gstreamer-0.10-silly-test.patch"))))) + (propagated-inputs + `(("libxml2" ,libxml2))) (inputs `(("bison" ,bison) ("flex" ,flex) ("glib" ,glib) - ("libxml2" ,libxml2) ("perl" ,perl) ("pkg-config" ,pkg-config) ("python" ,python-2))))) -- cgit v1.2.3 From 4e9b38ebf7407e49da28d66739089be18be37164 Mon Sep 17 00:00:00 2001 From: Andreas Enge Date: Wed, 30 Oct 2013 22:58:39 +0100 Subject: gnu: Add gst-plugins-base-0.10. * gnu/packages/gstreamer.scm (gst-plugins-base-0.10): New variable. --- gnu/packages/gstreamer.scm | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/gnu/packages/gstreamer.scm b/gnu/packages/gstreamer.scm index c32e480063..58625be073 100644 --- a/gnu/packages/gstreamer.scm +++ b/gnu/packages/gstreamer.scm @@ -133,3 +133,20 @@ (define-public gst-plugins-base This package provides an essential exemplary set of elements.") (license lgpl2.0+))) + +(define-public gst-plugins-base-0.10 + (package (inherit gst-plugins-base) + (version "0.10.36") + (source + (origin + (method url-fetch) + (uri (string-append "http://gstreamer.freedesktop.org/src/gst-plugins-base/gst-plugins-base-" + version ".tar.xz")) + (sha256 + (base32 + "0jp6hjlra98cnkal4n6bdmr577q8mcyp3c08s3a02c4hjhw5rr0z")))) + (inputs + `(("glib" ,glib) + ("gstreamer" ,gstreamer-0.10) + ("pkg-config" ,pkg-config) + ("python" ,python-2))))) -- cgit v1.2.3 From dce172273928f2ee6ac494725142ea5cd505002b Mon Sep 17 00:00:00 2001 From: Andreas Enge Date: Wed, 30 Oct 2013 23:07:50 +0100 Subject: gnu: libmicrohttpd: Update to 0.9.31. * gnu/packages/gnunet.scm (libmicrohttpd): Update to 0.9.31, synchronise the description with GNU SRC. --- gnu/packages/gnunet.scm | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/gnu/packages/gnunet.scm b/gnu/packages/gnunet.scm index 86abb7b5bf..83278583b7 100644 --- a/gnu/packages/gnunet.scm +++ b/gnu/packages/gnunet.scm @@ -91,14 +91,14 @@ (define-public libextractor (define-public libmicrohttpd (package (name "libmicrohttpd") - (version "0.9.30") + (version "0.9.31") (source (origin (method url-fetch) (uri (string-append "mirror://gnu/libmicrohttpd/libmicrohttpd-" version ".tar.gz")) (sha256 (base32 - "0v30w90qx8wpg5ksy97f5r4acpwd4q7q2v508mcss00vzj18rx40")))) + "06sxxial1794589k0ahi7nhhyfp14jf4jwirf6bkxqhs138pghfa")))) (build-system gnu-build-system) (inputs `(("curl" ,curl) @@ -106,13 +106,16 @@ (define-public libmicrohttpd ("libgcrypt" ,libgcrypt) ("openssl" ,openssl) ("zlib" ,zlib))) + (arguments + `(#:parallel-tests? #f)) (synopsis "C library implementing an HTTP 1.1 server") (description - "Libmicrohttpd is a small, embeddable HTTP server implemented as a C -library. It makes it easy to run an HTTP server as part of another + "GNU libmicrohttpd is a small, embeddable HTTP server implemented as a +C library. It makes it easy to run an HTTP server as part of another application. The library is fully HTTP 1.1 compliant. It can listen on -multiple ports, supports four different threading models, and supports IPv6. - It also features security features such as basic and digest authentication +multiple ports, supports four different threading models, and supports +IPv6. It +also features security features such as basic and digest authentication and support for SSL3 and TLS.") (license license:lgpl2.1+) (home-page "http://www.gnu.org/software/libmicrohttpd/"))) -- cgit v1.2.3 From 215b643150c741f8d231daec510046b4f60c110a Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Thu, 31 Oct 2013 23:29:25 +0100 Subject: gnu: Add bridge-utils. * gnu/packages/linux.scm (bridge-utils): New variable. --- gnu/packages/linux.scm | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm index 1402f05974..cd1c921626 100644 --- a/gnu/packages/linux.scm +++ b/gnu/packages/linux.scm @@ -35,6 +35,7 @@ (define-module (gnu packages linux) #:use-module (gnu packages pulseaudio) #:use-module (gnu packages attr) #:use-module (gnu packages xml) + #:use-module (gnu packages autotools) #:use-module (guix packages) #:use-module (guix download) #:use-module (guix build-system gnu)) @@ -719,3 +720,38 @@ (define-public libcap ;; License is BSD-3 or GPLv2, at the user's choice. (license gpl2))) + +(define-public bridge-utils + (package + (name "bridge-utils") + (version "1.5") + (source (origin + (method url-fetch) + (uri (string-append "mirror://sourceforge/bridge/bridge-utils-" + version ".tar.gz")) + (sha256 + (base32 + "12367cwqmi0yqphi6j8rkx97q8hw52yq2fx4k0xfclkcizxybya2")))) + (build-system gnu-build-system) + + ;; The tarball lacks all the generated files. + (native-inputs `(("autoconf" ,autoconf) + ("automake" ,automake))) + (arguments + '(#:phases (alist-cons-before + 'configure 'bootstrap + (lambda _ + (zero? (system* "autoreconf" "-vf"))) + %standard-phases) + #:tests? #f)) ; no 'check' target + + (home-page + "http://www.linuxfoundation.org/collaborate/workgroups/networking/bridge") + (synopsis "Manipulate Ethernet bridges") + (description + "Utilities for Linux's Ethernet bridging facilities. A bridge is a way +to connect two Ethernet segments together in a protocol independent way. +Packets are forwarded based on Ethernet address, rather than IP address (like +a router). Since forwarding is done at Layer 2, all protocols can go +transparently through a bridge.") + (license gpl2+))) -- cgit v1.2.3 From cdbca518ca797cae61c7829e51649b55c47f6a2f Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Thu, 31 Oct 2013 23:31:00 +0100 Subject: union: Do not warn when identical files collide. * guix/build/union.scm (file=?): New procedure. (union-build)[resolve-collision]: Do not warn when identical files collide. --- guix/build/union.scm | 36 ++++++++++++++++++++++++++++-------- 1 file changed, 28 insertions(+), 8 deletions(-) diff --git a/guix/build/union.scm b/guix/build/union.scm index 0f8c87e171..1b09da45c7 100644 --- a/guix/build/union.scm +++ b/guix/build/union.scm @@ -22,6 +22,8 @@ (define-module (guix build union) #:use-module (ice-9 format) #:use-module (srfi srfi-1) #:use-module (srfi srfi-26) + #:use-module (rnrs bytevectors) + #:use-module (rnrs io ports) #:export (tree-union delete-duplicate-leaves union-build)) @@ -100,6 +102,23 @@ (define non-collisions ,@(map loop dirs)))) (leaf leaf)))) +(define (file=? file1 file2) + "Return #t if the contents of FILE1 and FILE2 are identical, #f otherwise." + (and (= (stat:size (stat file1)) (stat:size (stat file2))) + (call-with-input-file file1 + (lambda (port1) + (call-with-input-file file2 + (lambda (port2) + (define len 8192) + (define buf1 (make-bytevector len)) + (define buf2 (make-bytevector len)) + (let loop () + (let ((n1 (get-bytevector-n! port1 buf1 0 len)) + (n2 (get-bytevector-n! port2 buf2 0 len))) + (and (equal? n1 n2) + (or (eof-object? n1) + (loop))))))))))) + (define* (union-build output directories #:key (log-port (current-error-port))) "Build in the OUTPUT directory a symlink tree that is the union of all @@ -163,14 +182,15 @@ (define (resolve-collision leaves) ;; LEAVES all actually point to the same file, so nothing to worry ;; about. one-and-the-same) - ((and lst (head _ ...)) - ;; A real collision. - (format (current-error-port) "warning: collision encountered: ~{~a ~}~%" - lst) - - ;; TODO: Implement smarter strategies. - (format (current-error-port) "warning: arbitrarily choosing ~a~%" - head) + ((and lst (head rest ...)) + ;; A real collision, unless those files are all identical. + (unless (every (cut file=? head <>) rest) + (format (current-error-port) "warning: collision encountered: ~{~a ~}~%" + lst) + + ;; TODO: Implement smarter strategies. + (format (current-error-port) "warning: arbitrarily choosing ~a~%" + head)) head))) (setvbuf (current-output-port) _IOLBF) -- cgit v1.2.3 From b645425f71a5a777e7658bbdac0e22e134d44db5 Mon Sep 17 00:00:00 2001 From: Mark H Weaver Date: Thu, 31 Oct 2013 23:05:27 -0400 Subject: gnu: pulseaudio: increase timeout of thread test. * gnu/packages/patches/pulseaudio-test-timeouts.patch: New file. * gnu/packages/pulseaudio.scm (pulseaudio): Add patch. * gnu-system.am (dist_patch_DATA): Add patch. --- gnu-system.am | 1 + gnu/packages/patches/pulseaudio-test-timeouts.patch | 19 +++++++++++++++++++ gnu/packages/pulseaudio.scm | 4 +++- 3 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/pulseaudio-test-timeouts.patch diff --git a/gnu-system.am b/gnu-system.am index f77bb03da7..4a8414951b 100644 --- a/gnu-system.am +++ b/gnu-system.am @@ -242,6 +242,7 @@ dist_patch_DATA = \ gnu/packages/patches/perl-no-sys-dirs.patch \ gnu/packages/patches/plotutils-libpng-jmpbuf.patch \ gnu/packages/patches/procps-make-3.82.patch \ + gnu/packages/patches/pulseaudio-test-timeouts.patch \ gnu/packages/patches/python-fix-dbm.patch \ gnu/packages/patches/qemu-multiple-smb-shares.patch \ gnu/packages/patches/qt4-tests.patch \ diff --git a/gnu/packages/patches/pulseaudio-test-timeouts.patch b/gnu/packages/patches/pulseaudio-test-timeouts.patch new file mode 100644 index 0000000000..ab818ad0aa --- /dev/null +++ b/gnu/packages/patches/pulseaudio-test-timeouts.patch @@ -0,0 +1,19 @@ +Increase the timeout of the thread test. Hydra was intermittedly +failing this test due to premature timeout, and slower machines +consistently fail. + +Patch by Mark H Weaver . + +--- pulseaudio/src/tests/thread-test.c.orig 2012-09-26 07:27:01.000000000 -0400 ++++ pulseaudio/src/tests/thread-test.c 2013-10-31 22:53:23.224000184 -0400 +@@ -152,6 +152,10 @@ + s = suite_create("Thread"); + tc = tcase_create("thread"); + tcase_add_test(tc, thread_test); ++ /* the default timeout is too small, ++ * set it to a reasonable large one. ++ */ ++ tcase_set_timeout(tc, 60 * 60); + suite_add_tcase(s, tc); + + sr = srunner_create(s); diff --git a/gnu/packages/pulseaudio.scm b/gnu/packages/pulseaudio.scm index 6318ca5882..1c579bfb2c 100644 --- a/gnu/packages/pulseaudio.scm +++ b/gnu/packages/pulseaudio.scm @@ -22,6 +22,7 @@ (define-module (gnu packages pulseaudio) #:use-module ((guix licenses) #:renamer (symbol-prefix-proc 'l:)) #:use-module (guix build-system gnu) + #:use-module (gnu packages) #:use-module (gnu packages linux) #:use-module (gnu packages oggvorbis) #:use-module (gnu packages pkg-config) @@ -141,7 +142,8 @@ (define pulseaudio version ".tar.xz")) (sha256 (base32 - "1bndz4l8jxyq3zq128gzp3gryxl6yjs66j2y1d7yabw2n5mv7kim")))) + "1bndz4l8jxyq3zq128gzp3gryxl6yjs66j2y1d7yabw2n5mv7kim")) + (patches (list (search-patch "pulseaudio-test-timeouts.patch"))))) (build-system gnu-build-system) (arguments '(#:configure-flags '("--localstatedir=/var" ;"--sysconfdir=/etc" -- cgit v1.2.3