03/03: gnu: gcc-4.8: Update to 4.8.4.

2014-12-26 Thread Ludovic Courts
civodul pushed a commit to branch core-updates
in repository guix.

commit 0d12bc744ee4fa7860b16a555d73dfc6f463ba57
Author: Ludovic Courtès l...@gnu.org
Date:   Sat Dec 27 00:17:43 2014 +0100

gnu: gcc-4.8: Update to 4.8.4.

* gnu/packages/gcc.scm (gcc-4.8): Update to 4.8.4.  Remove patch.
* gnu/packages/patches/gcc-fix-pr61801.patch: Remove.
* gnu-system.am (dist_patch_DATA): Adjust accordingly.
---
 gnu-system.am  |1 -
 gnu/packages/gcc.scm   |5 ++---
 gnu/packages/patches/gcc-fix-pr61801.patch |   25 -
 3 files changed, 2 insertions(+), 29 deletions(-)

diff --git a/gnu-system.am b/gnu-system.am
index 0e912f2..09d09ca 100644
--- a/gnu-system.am
+++ b/gnu-system.am
@@ -356,7 +356,6 @@ dist_patch_DATA =   
\
   gnu/packages/patches/flex-bison-tests.patch  \
   gnu/packages/patches/gawk-shell.patch\
   gnu/packages/patches/gcc-cross-environment-variables.patch   \
-  gnu/packages/patches/gcc-fix-pr61801.patch   \
   gnu/packages/patches/gd-mips64-deplibs-fix.patch \
   gnu/packages/patches/glib-tests-desktop.patch\
   gnu/packages/patches/glib-tests-homedir.patch\
diff --git a/gnu/packages/gcc.scm b/gnu/packages/gcc.scm
index 6dfdcea..4b715f4 100644
--- a/gnu/packages/gcc.scm
+++ b/gnu/packages/gcc.scm
@@ -261,15 +261,14 @@ Go.  It also includes runtime support libraries for these 
languages.)
 
 (define-public gcc-4.8
   (package (inherit gcc-4.7)
-(version 4.8.3)
+(version 4.8.4)
 (source (origin
  (method url-fetch)
  (uri (string-append mirror://gnu/gcc/gcc-
  version /gcc- version .tar.bz2))
  (sha256
   (base32
-   07hg10zs7gnqz58my10ch0zygizqh0z0bz6pv4pgxx45n48lz3ka))
- (patches (list (search-patch gcc-fix-pr61801.patch)))
+   15c6gwm6dzsaagamxkak5smdkf1rdfbqqjs9jdbrp3lbg4ism02a))
 
 (define-public gcc-4.9
   (package (inherit gcc-4.7)
diff --git a/gnu/packages/patches/gcc-fix-pr61801.patch 
b/gnu/packages/patches/gcc-fix-pr61801.patch
deleted file mode 100644
index e9cd92a..000
--- a/gnu/packages/patches/gcc-fix-pr61801.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-GCC bug fix for https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61801.
-Initially discussed at
- http://lists.gnu.org/archive/html/guix-devel/2014-09/msg00283.html.
-Patch from https://gcc.gnu.org/viewcvs/gcc?view=revisionrevision=212740.
-
-2014-07-17  Richard Biener  rguent...@suse.de
-
-PR rtl-optimization/61801
-
-* sched-deps.c (sched_analyze_2): For ASM_OPERANDS and
-ASM_INPUT don't set reg_pending_barrier if it appears in a
-debug-insn.
-
 gcc-4_8-branch/gcc/sched-deps.c2014/07/17 07:48:49 212739
-+++ gcc-4_8-branch/gcc/sched-deps.c2014/07/17 07:49:44 212740
-@@ -2744,7 +2744,8 @@
-  Consider for instance a volatile asm that changes the fpu rounding
-  mode.  An insn should not be moved across this even if it only uses
-  pseudo-regs because it might give an incorrectly rounded result.  */
--  if (code != ASM_OPERANDS || MEM_VOLATILE_P (x))
-+  if ((code != ASM_OPERANDS || MEM_VOLATILE_P (x))
-+   !DEBUG_INSN_P (insn))
- reg_pending_barrier = TRUE_BARRIER;
- 
-   /* For all ASM_OPERANDS, we must traverse the vector of input operands.



01/03: gnu: binutils: Update to 2.25.

2014-12-27 Thread Ludovic Courts
civodul pushed a commit to branch core-updates
in repository guix.

commit 84c84ce7bfc6f34a3d5a9205dc0a92e25435efcf
Author: Ludovic Courtès l...@gnu.org
Date:   Sat Dec 27 11:52:55 2014 +0100

gnu: binutils: Update to 2.25.

* gnu/packages/base.scm (binutils): Update to 2.25.
---
 gnu/packages/base.scm |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm
index aec8d89..5bf27c9 100644
--- a/gnu/packages/base.scm
+++ b/gnu/packages/base.scm
@@ -312,14 +312,14 @@ change.  GNU make offers many powerful extensions over 
the standard utility.)
 (define-public binutils
   (package
(name binutils)
-   (version 2.24)
+   (version 2.25)
(source (origin
 (method url-fetch)
 (uri (string-append mirror://gnu/binutils/binutils-
 version .tar.bz2))
 (sha256
  (base32
-  0ds1y7qa0xqihw4ihnsgg6bxanmb228r228ddvwzgrv4jszcbs75))
+  08r9i26b05zcwb9zxb6zllpfdiiicdfsgbpsjlrjmvx3rxjzrpi2))
 (patches (list (search-patch binutils-ld-new-dtags.patch)
(search-patch 
binutils-loongson-workaround.patch)
(build-system gnu-build-system)



03/03: build-system/gnu: Add support for non-directory search paths.

2014-12-27 Thread Ludovic Courts
civodul pushed a commit to branch core-updates
in repository guix.

commit 6aa47e388390e98bec6caa90fef7f39a60e338a7
Author: Ludovic Courtès l...@gnu.org
Date:   Sat Dec 27 12:16:18 2014 +0100

build-system/gnu: Add support for non-directory search paths.

Partly fixes http://bugs.gnu.org/18033.

* guix/build/utils.scm (search-path-as-list): Rename 'sub-directories'
  parameter to 'files'.  Add #:type parameter and honor it.
  (set-path-environment-variable): Likewise.  Pass #:type to
  'search-path-as-list'.
* guix/packages.scm (search-path-specification-sexp): Add 'directory as
  the last item of the tuple.
* guix/build/gnu-build-system.scm (set-paths): Add 'type' to search-path
  pattern.  Pass #:type to 'set-path-environment-variable'.
---
 guix/build/gnu-build-system.scm |   14 --
 guix/build/utils.scm|   33 +++--
 guix/packages.scm   |3 ++-
 3 files changed, 29 insertions(+), 21 deletions(-)

diff --git a/guix/build/gnu-build-system.scm b/guix/build/gnu-build-system.scm
index d3de92b..4cc755f 100644
--- a/guix/build/gnu-build-system.scm
+++ b/guix/build/gnu-build-system.scm
@@ -73,19 +73,21 @@
  input-directories)))
 
   (for-each (match-lambda
- ((env-var (directories ...) separator)
-  (set-path-environment-variable env-var directories
+ ((env-var (files ...) separator type)
+  (set-path-environment-variable env-var files
  input-directories
- #:separator separator)))
+ #:separator separator
+ #:type type)))
 search-paths)
 
   (when native-search-paths
 ;; Search paths for native inputs, when cross building.
 (for-each (match-lambda
-   ((env-var (directories ...) separator)
-(set-path-environment-variable env-var directories
+   ((env-var (files ...) separator type)
+(set-path-environment-variable env-var files
native-input-directories
-   #:separator separator)))
+   #:separator separator
+   #:type type)))
   native-search-paths))
 
   #t)
diff --git a/guix/build/utils.scm b/guix/build/utils.scm
index 9b1e098..f22b2c3 100644
--- a/guix/build/utils.scm
+++ b/guix/build/utils.scm
@@ -290,9 +290,10 @@ matches REGEXP.
 ;;; Search paths.
 ;;;
 
-(define (search-path-as-list sub-directories input-dirs)
-  Return the list of directories among SUB-DIRECTORIES that exist in
-INPUT-DIRS.  Example:
+(define* (search-path-as-list files input-dirs
+  #:key (type 'directory))
+  Return the list of directories among FILES of the given TYPE (a symbol as
+returned by 'stat:type') that exist in INPUT-DIRS.  Example:
 
   (search-path-as-list '(\share/emacs/site-lisp\ \share/emacs/24.1\)
(list \/package1\ \/package2\ \/package3\))
@@ -301,12 +302,12 @@ INPUT-DIRS.  Example:
 
 
   (append-map (lambda (input)
-(filter-map (lambda (dir)
-  (let ((dir (string-append input /
-dir)))
-(and (directory-exists? dir)
- dir)))
-sub-directories))
+(filter-map (lambda (file)
+  (let* ((file (string-append input / file))
+ (stat (stat file #f)))
+(and stat (eq? type (stat:type stat))
+ file)))
+files))
   input-dirs))
 
 (define (list-search-path-as-string lst separator)
@@ -315,16 +316,20 @@ INPUT-DIRS.  Example:
 (define* (search-path-as-string-list path #:optional (separator #\:))
   (string-tokenize path (char-set-complement (char-set separator
 
-(define* (set-path-environment-variable env-var sub-directories input-dirs
-#:key (separator :))
-  Look for each of SUB-DIRECTORIES in INPUT-DIRS.  Set ENV-VAR to a
-SEPARATOR-separated path accordingly.  Example:
+(define* (set-path-environment-variable env-var files input-dirs
+#:key
+(separator :)
+(type 'directory))
+  Look for each of FILES of the given TYPE (a symbol as returned by
+'stat:type') in INPUT-DIRS.  Set ENV-VAR to a SEPARATOR-separated path
+accordingly.  Example:
 
   (set-path-environment-variable \PKG_CONFIG\
 

02/03: gnu: gettext: Update to 0.19.4.

2014-12-27 Thread Ludovic Courts
civodul pushed a commit to branch core-updates
in repository guix.

commit 8c89f514bf8679ce4ebd9d3f4c8e6589340dba9a
Author: Ludovic Courtès l...@gnu.org
Date:   Sat Dec 27 11:53:11 2014 +0100

gnu: gettext: Update to 0.19.4.

* gnu/packages/gettext.scm (gnu-gettext): Update to 0.19.4.
---
 gnu/packages/gettext.scm |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/gettext.scm b/gnu/packages/gettext.scm
index bbdf0c5..dd86fe4 100644
--- a/gnu/packages/gettext.scm
+++ b/gnu/packages/gettext.scm
@@ -35,14 +35,14 @@
 (define-public gnu-gettext
   (package
 (name gettext)
-(version 0.19.3)
+(version 0.19.4)
 (source (origin
  (method url-fetch)
  (uri (string-append mirror://gnu/gettext/gettext-
  version .tar.gz))
  (sha256
   (base32
-   1xmkxviqnq60h4wmh3bi6b1zkc9qsk3l1lv91k0iwfrxb982v5ck
+   0gvz86m4cs8bdf3mwmwsyx6lrq4ydfxgadrgd9jlx32z3bnz3jca
 (build-system gnu-build-system)
 (inputs
  `((expat ,expat)))



04/07: packages: Add 'file-pattern' field to 'search-path-specification'.

2014-12-27 Thread Ludovic Courts
civodul pushed a commit to branch core-updates
in repository guix.

commit 7b21fe538512b452c87389607f569668a7f1a1a4
Author: Ludovic Courtès l...@gnu.org
Date:   Sat Dec 27 23:15:11 2014 +0100

packages: Add 'file-pattern' field to 'search-path-specification'.

* guix/packages.scm (search-path-specification)[file-pattern]: New
  field.
  (search-path-specification-sexp): Honor it.
---
 guix/packages.scm |   17 ++---
 1 files changed, 10 insertions(+), 7 deletions(-)

diff --git a/guix/packages.scm b/guix/packages.scm
index e299962..68fd531 100644
--- a/guix/packages.scm
+++ b/guix/packages.scm
@@ -171,18 +171,21 @@ representation.
 (define-record-type* search-path-specification
   search-path-specification make-search-path-specification
   search-path-specification?
-  (variable search-path-specification-variable)
-  (filessearch-path-specification-files)
-  (separatorsearch-path-specification-separator (default :))
-  (file-typesearch-path-specification-file-type (default 'directory)))
+  (variable search-path-specification-variable) ;string
+  (filessearch-path-specification-files);list of strings
+  (separatorsearch-path-specification-separator ;string
+(default :))
+  (file-typesearch-path-specification-file-type ;symbol
+(default 'directory))
+  (file-pattern search-path-specification-file-pattern ;#f | string
+(default #f)))
 
 (define (search-path-specification-sexp spec)
   Return an sexp representing SPEC, a search-path-specification.  The sexp
 corresponds to the arguments expected by `set-path-environment-variable'.
   (match spec
-(($ search-path-specification variable files separator type)
- ;; TODO: Add support for PATTERN.
- `(,variable ,files ,separator ,type #f
+(($ search-path-specification variable files separator type pattern)
+ `(,variable ,files ,separator ,type ,pattern
 
 (define %supported-systems
   ;; This is the list of system types that are supported.  By default, we



06/07: guix package: Use 'search-path-as-list' instead of custom code.

2014-12-27 Thread Ludovic Courts
civodul pushed a commit to branch core-updates
in repository guix.

commit cc9a5c1454f49850c078045c88a300c1195eabc8
Author: Ludovic Courtès l...@gnu.org
Date:   Sat Dec 27 23:46:10 2014 +0100

guix package: Use 'search-path-as-list' instead of custom code.

This will handle the new 'file-type' and 'file-pattern' fields correctly.

* guix/scripts/package.scm 
(search-path-environment-variables)[search-path-definition]:
  Rewrite in terms of 'search-path-as-list'.
---
 guix/scripts/package.scm |   23 ---
 1 files changed, 12 insertions(+), 11 deletions(-)

diff --git a/guix/scripts/package.scm b/guix/scripts/package.scm
index 21dc66c..2f694cd 100644
--- a/guix/scripts/package.scm
+++ b/guix/scripts/package.scm
@@ -29,7 +29,8 @@
   #:use-module (guix utils)
   #:use-module (guix config)
   #:use-module (guix scripts build)
-  #:use-module ((guix build utils) #:select (directory-exists? mkdir-p))
+  #:use-module ((guix build utils)
+#:select (directory-exists? mkdir-p search-path-as-list))
   #:use-module (ice-9 format)
   #:use-module (ice-9 match)
   #:use-module (ice-9 regex)
@@ -362,19 +363,19 @@ current settings and report only settings not already 
effective.
 
 (define search-path-definition
   (match-lambda
-   (($ search-path-specification variable directories separator)
-(let ((values  (or (and= (getenv variable)
-  (cut string-tokenize*  separator))
-   '()))
-  (directories (filter file-exists?
-   (map (cut string-append profile
- / )
-directories
-  (if (every (cut member  values) directories)
+   (($ search-path-specification variable files separator
+   type pattern)
+(let ((values (or (and= (getenv variable)
+ (cut string-tokenize*  separator))
+  '()))
+  (path   (search-path-as-list files (list profile)
+   #:type type
+   #:pattern pattern)))
+  (if (every (cut member  values) path)
   #f
   (format #f export ~a=\~a\
   variable
-  (string-join directories separator)))
+  (string-join path separator)))
 
 (let* ((packages (filter-map manifest-entry-package entries))
(search-paths (delete-duplicates



01/07: build-system/gnu: Strip with '--strip-all' instead of '--strip-debug'.

2014-12-27 Thread Ludovic Courts
civodul pushed a commit to branch core-updates
in repository guix.

commit 856ae5e6c71a1283a414d33e638051f95d3cce35
Author: Ludovic Courtès l...@gnu.org
Date:   Sat Dec 27 19:20:18 2014 +0100

build-system/gnu: Strip with '--strip-all' instead of '--strip-debug'.

This saves 19% on the 'bin' directory of Coreutils, and certainly
helpful for things like Git's 'libexec' directory.

* guix/build-system/gnu.scm (gnu-build): Change default value for
  #:strip-flags to '(--strip-all).
* guix/build/gnu-build-system.scm (strip): Ditto.
* gnu/packages/linux.scm (linux-libre)[arguments]: Add #:strip-flags.
---
 gnu/packages/linux.scm  |5 +
 guix/build-system/gnu.scm   |2 +-
 guix/build/gnu-build-system.scm |2 +-
 3 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index 9dc5f5c..5336825 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -292,6 +292,11 @@ for SYSTEM, or #f if there is no configuration for SYSTEM.
  (alist-replace
   'install ,install-phase
   (alist-delete 'configure %standard-phases)))
+
+   ;; Use '--strip-debug', not '--strip-all', because the latter leads to
+   ;; unloadable modules (due to the lack of a symbol table.)
+   #:strip-flags '(--strip-debug)
+
#:tests? #f))
 (synopsis 100% free redistribution of a cleaned Linux kernel)
 (description
diff --git a/guix/build-system/gnu.scm b/guix/build-system/gnu.scm
index c675155..f765a14 100644
--- a/guix/build-system/gnu.scm
+++ b/guix/build-system/gnu.scm
@@ -274,7 +274,7 @@ standard packages used as implicit inputs of the GNU build 
system.
 (parallel-tests? #t)
 (patch-shebangs? #t)
 (strip-binaries? #t)
-(strip-flags ''(--strip-debug))
+(strip-flags ''(--strip-all))
 (strip-directories ''(lib lib64 libexec
   bin sbin))
 (phases '%standard-phases)
diff --git a/guix/build/gnu-build-system.scm b/guix/build/gnu-build-system.scm
index 4cc755f..d661736 100644
--- a/guix/build/gnu-build-system.scm
+++ b/guix/build/gnu-build-system.scm
@@ -295,7 +295,7 @@ makefiles.
 (objcopy-command (if target
  (string-append target -objcopy)
  objcopy))
-(strip-flags '(--strip-debug))
+(strip-flags '(--strip-all))
 (strip-directories '(lib lib64 libexec
  bin sbin))
 #:allow-other-keys)



branch core-updates updated (9a224ac - 2a8d440)

2014-12-27 Thread Ludovic Courts
civodul pushed a change to branch core-updates
in repository guix.

  from  9a224ac   gnu: Use patch --force instead of --batch.
   new  856ae5e   build-system/gnu: Strip with '--strip-all' instead of 
'--strip-debug'.
   new  af07095   packages: Add 'file-type' field to 
'search-path-specification'.
   new  7ec02d3   build-support/gnu: Add support for file patterns in 
search paths.
   new  7b21fe5   packages: Add 'file-pattern' field to 
'search-path-specification'.
   new  bd2fc4d   utils: Export 'search-path-as-list'.
   new  cc9a5c1   guix package: Use 'search-path-as-list' instead of custom 
code.
   new  2a8d440   gnu: libxml2: Add search path specification.

The 7 revisions listed above as new are entirely new to this
repository and will be described in separate emails.  The revisions
listed as adds were already present in the repository and have only
been added to this reference.


Summary of changes:
 gnu/packages/autotools.scm  |2 +-
 gnu/packages/bootstrap.scm  |4 +-
 gnu/packages/cross-base.scm |4 +-
 gnu/packages/games.scm  |2 +-
 gnu/packages/gcc.scm|4 +-
 gnu/packages/glib.scm   |4 +-
 gnu/packages/gnome.scm  |   11 --
 gnu/packages/gps.scm|   12 +--
 gnu/packages/guile.scm  |6 ++--
 gnu/packages/linux.scm  |5 
 gnu/packages/man.scm|2 +-
 gnu/packages/perl.scm   |2 +-
 gnu/packages/pkg-config.scm |3 +-
 gnu/packages/python.scm |4 +-
 gnu/packages/ruby.scm   |7 ++---
 gnu/packages/web.scm|   11 +-
 gnu/packages/xfce.scm   |2 +-
 gnu/packages/xml.scm|   12 +++
 guix/build-system/gnu.scm   |2 +-
 guix/build/gnu-build-system.scm |   12 ++
 guix/build/utils.scm|   41 +++---
 guix/packages.scm   |   16 +-
 guix/scripts/environment.scm|8 ++
 guix/scripts/package.scm|   23 +++--
 tests/packages.scm  |4 +-
 25 files changed, 109 insertions(+), 94 deletions(-)



03/07: build-support/gnu: Add support for file patterns in search paths.

2014-12-27 Thread Ludovic Courts
civodul pushed a commit to branch core-updates
in repository guix.

commit 7ec02d374d1fa8a8f4034a996485872fd2aa7b73
Author: Ludovic Courtès l...@gnu.org
Date:   Sat Dec 27 22:55:34 2014 +0100

build-support/gnu: Add support for file patterns in search paths.

* guix/build/utils.scm (search-path-as-list): Add #:pattern parameter
  and honor it.
  (set-path-environment-variable): Likewise, and pass it to
  'search-path-as-list'.
* guix/packages.scm (search-path-specification-sexp): Add PATTERN slot.
* guix/build/gnu-build-system.scm (set-paths): Adjust accordingly.
---
 guix/build/gnu-build-system.scm |   10 +---
 guix/build/utils.scm|   40 +++---
 guix/packages.scm   |3 +-
 3 files changed, 40 insertions(+), 13 deletions(-)

diff --git a/guix/build/gnu-build-system.scm b/guix/build/gnu-build-system.scm
index d661736..11b43c5 100644
--- a/guix/build/gnu-build-system.scm
+++ b/guix/build/gnu-build-system.scm
@@ -73,21 +73,23 @@
  input-directories)))
 
   (for-each (match-lambda
- ((env-var (files ...) separator type)
+ ((env-var (files ...) separator type pattern)
   (set-path-environment-variable env-var files
  input-directories
  #:separator separator
- #:type type)))
+ #:type type
+ #:pattern pattern)))
 search-paths)
 
   (when native-search-paths
 ;; Search paths for native inputs, when cross building.
 (for-each (match-lambda
-   ((env-var (files ...) separator type)
+   ((env-var (files ...) separator type pattern)
 (set-path-environment-variable env-var files
native-input-directories
#:separator separator
-   #:type type)))
+   #:type type
+   #:pattern pattern)))
   native-search-paths))
 
   #t)
diff --git a/guix/build/utils.scm b/guix/build/utils.scm
index f22b2c3..47bcb3e 100644
--- a/guix/build/utils.scm
+++ b/guix/build/utils.scm
@@ -291,7 +291,7 @@ matches REGEXP.
 ;;;
 
 (define* (search-path-as-list files input-dirs
-  #:key (type 'directory))
+  #:key (type 'directory) pattern)
   Return the list of directories among FILES of the given TYPE (a symbol as
 returned by 'stat:type') that exist in INPUT-DIRS.  Example:
 
@@ -300,13 +300,26 @@ returned by 'stat:type') that exist in INPUT-DIRS.  
Example:
   = (\/package1/share/emacs/site-lisp\
   \/package3/share/emacs/site-lisp\)
 
+When PATTERN is true, it is a regular expression denoting file names to look
+for under the directories designated by FILES.  For example:
+
+  (search-path-as-list '(\xml\) (list docbook-xml docbook-xsl)
+   #:type 'regular
+   #:pattern \^catalog.xml$\)
+  = (\/…/xml/dtd/docbook/catalog.xml\
+  \/…/xml/xsl/docbook-xsl-1.78.1/catalog.xml\)
 
   (append-map (lambda (input)
-(filter-map (lambda (file)
-  (let* ((file (string-append input / file))
- (stat (stat file #f)))
-(and stat (eq? type (stat:type stat))
- file)))
+(append-map (lambda (file)
+  (let ((file (string-append input / file)))
+;; XXX: By using 'find-files', we implicitly
+;; assume #:type 'regular.
+(if pattern
+(find-files file pattern)
+(let ((stat (stat file #f)))
+  (if (and stat (eq? type (stat:type 
stat)))
+  (list file)
+  '())
 files))
   input-dirs))
 
@@ -319,7 +332,8 @@ returned by 'stat:type') that exist in INPUT-DIRS.  Example:
 (define* (set-path-environment-variable env-var files input-dirs
 #:key
 (separator :)
-(type 'directory))
+(type 'directory)
+pattern)
   Look for each of FILES of the given TYPE (a symbol as returned by
 'stat:type') in INPUT-DIRS.  Set ENV-VAR to a SEPARATOR-separated path
 accordingly.  Example:
@@ -327,9 +341,19 

02/07: packages: Add 'file-type' field to 'search-path-specification'.

2014-12-27 Thread Ludovic Courts
civodul pushed a commit to branch core-updates
in repository guix.

commit af07095516b56dcdd38bf1874da27de9c4c841f6
Author: Ludovic Courtès l...@gnu.org
Date:   Sat Dec 27 23:22:08 2014 +0100

packages: Add 'file-type' field to 'search-path-specification'.

Fixes http://bugs.gnu.org/18033.

* guix/packages.scm (search-path-specification): Rename 'directories'
  field to 'files'.  Add 'file-type'.
  (search-path-specification-sexp): Honor 'file-type'.
* gnu/packages/autotools.scm, gnu/packages/bootstrap.scm,
  gnu/packages/cross-base.scm, gnu/packages/games.scm,
  gnu/packages/gcc.scm, gnu/packages/glib.scm,
  gnu/packages/guile.scm, gnu/packages/man.scm,
  gnu/packages/perl.scm, gnu/packages/pkg-config.scm,
  gnu/packages/python.scm, gnu/packages/ruby.scm,
  gnu/packages/xfce.scm: Change 'directories' to 'files'.
* tests/packages.scm (search paths): Change 'directories' field to
  'files'.
* guix/scripts/environment.scm (for-each-search-path): Likewise.
---
 gnu/packages/autotools.scm   |2 +-
 gnu/packages/bootstrap.scm   |4 ++--
 gnu/packages/cross-base.scm  |4 ++--
 gnu/packages/games.scm   |2 +-
 gnu/packages/gcc.scm |4 ++--
 gnu/packages/glib.scm|4 ++--
 gnu/packages/guile.scm   |6 +++---
 gnu/packages/man.scm |2 +-
 gnu/packages/perl.scm|2 +-
 gnu/packages/pkg-config.scm  |3 +--
 gnu/packages/python.scm  |4 ++--
 gnu/packages/ruby.scm|7 +++
 gnu/packages/xfce.scm|2 +-
 guix/packages.scm|   10 +-
 guix/scripts/environment.scm |3 +--
 tests/packages.scm   |4 ++--
 16 files changed, 30 insertions(+), 33 deletions(-)

diff --git a/gnu/packages/autotools.scm b/gnu/packages/autotools.scm
index 0094577..a3afcdc 100644
--- a/gnu/packages/autotools.scm
+++ b/gnu/packages/autotools.scm
@@ -178,7 +178,7 @@ exec ~a --no-auto-compile \$0\ \$@\
 (native-search-paths
  (list (search-path-specification
 (variable ACLOCAL_PATH)
-(directories '(share/aclocal)
+(files '(share/aclocal)
 (arguments
  '(#:modules ((guix build gnu-build-system)
   (guix build utils)
diff --git a/gnu/packages/bootstrap.scm b/gnu/packages/bootstrap.scm
index 854d97b..5a19783 100644
--- a/gnu/packages/bootstrap.scm
+++ b/gnu/packages/bootstrap.scm
@@ -409,10 +409,10 @@ exec ~a/bin/.gcc-wrapped -B~a/lib \
 (native-search-paths
  (list (search-path-specification
 (variable CPATH)
-(directories '(include)))
+(files '(include)))
(search-path-specification
 (variable LIBRARY_PATH)
-(directories '(lib lib64)
+(files '(lib lib64)
 (synopsis Bootstrap binaries of the GNU Compiler Collection)
 (description #f)
 (home-page #f)
diff --git a/gnu/packages/cross-base.scm b/gnu/packages/cross-base.scm
index 74809d0..0f32c9f 100644
--- a/gnu/packages/cross-base.scm
+++ b/gnu/packages/cross-base.scm
@@ -234,10 +234,10 @@ GCC that does not target a libc; otherwise, target that 
libc.
 (search-paths
  (list (search-path-specification
 (variable CROSS_CPATH)
-(directories '(include)))
+(files '(include)))
(search-path-specification
 (variable CROSS_LIBRARY_PATH)
-(directories '(lib lib64)
+(files '(lib lib64)
 (native-search-paths '(
 
 (define* (cross-libc target
diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
index db878b0..99a4a78 100644
--- a/gnu/packages/games.scm
+++ b/gnu/packages/games.scm
@@ -706,7 +706,7 @@ for common mesh file formats, and collision detection.)
 (native-search-paths
  (list (search-path-specification
 (variable MINETEST_SUBGAME_PATH)
-(directories '(share/minetest/games)
+(files '(share/minetest/games)
 (native-inputs
  `((pkg-config ,pkg-config)))
 (inputs
diff --git a/gnu/packages/gcc.scm b/gnu/packages/gcc.scm
index 4b715f4..e795f97 100644
--- a/gnu/packages/gcc.scm
+++ b/gnu/packages/gcc.scm
@@ -245,10 +245,10 @@ where the OS part is overloaded to denote a specific 
ABI---into GCC
   (native-search-paths
(list (search-path-specification
   (variable CPATH)
-  (directories '(include)))
+  (files '(include)))
  (search-path-specification
   (variable LIBRARY_PATH)
-  (directories '(lib lib64)
+  (files '(lib lib64)
 
   (properties `((gcc-libc . ,(assoc-ref inputs libc
   (synopsis GNU Compiler Collection)
diff --git a/gnu/packages/glib.scm b/gnu/packages/glib.scm
index 486cdb6..93b465b 100644
--- a/gnu/packages/glib.scm
+++ b/gnu/packages/glib.scm
@@ -183,7 +183,7 @@ shared NFS home directories.)
 ;; by 'glib-compile-schemas'.
 

05/07: utils: Export 'search-path-as-list'.

2014-12-27 Thread Ludovic Courts
civodul pushed a commit to branch core-updates
in repository guix.

commit bd2fc4d81342dc15feba2998835e69dabee08864
Author: Ludovic Courtès l...@gnu.org
Date:   Sat Dec 27 23:24:35 2014 +0100

utils: Export 'search-path-as-list'.

* guix/build/utils.scm (search-path-as-list): Make public.
* guix/scripts/environment.scm (for-each-search-path): Use it.
---
 guix/build/utils.scm |1 +
 guix/scripts/environment.scm |5 ++---
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/guix/build/utils.scm b/guix/build/utils.scm
index 47bcb3e..86b7ca0 100644
--- a/guix/build/utils.scm
+++ b/guix/build/utils.scm
@@ -45,6 +45,7 @@
 delete-file-recursively
 find-files
 
+search-path-as-list
 set-path-environment-variable
 search-path-as-string-list
 list-search-path-as-string
diff --git a/guix/scripts/environment.scm b/guix/scripts/environment.scm
index 412b8be..b3a79d9 100644
--- a/guix/scripts/environment.scm
+++ b/guix/scripts/environment.scm
@@ -45,9 +45,8 @@ path value is appended.
(($ search-path-specification
variable directories separator)
 (let* ((current (getenv variable))
-   (path ((@@ (guix build utils) search-path-as-list)
-  directories paths))
-   (value (list-search-path-as-string path separator)))
+   (path(search-path-as-list directories paths))
+   (value   (list-search-path-as-string path separator)))
   (proc variable
 (if (and current (not pure?))
 (string-append value separator current)



02/02: gnu: Fix or update a number of 'home-page' fields.

2014-12-28 Thread Ludovic Courts
civodul pushed a commit to branch master
in repository guix.

commit 07af3e5efee742b9b67a19a6df3256cd00fb18e0
Author: Ludovic Courtès l...@gnu.org
Date:   Sun Dec 28 17:57:16 2014 +0100

gnu: Fix or update a number of 'home-page' fields.

* gnu/packages/fltk.scm (fltk): Fix 'home-page'.
* gnu/packages/fonts.scm (font-bitstream-vera): Likewise, and fix
  license URL.
* gnu/packages/games.scm (gnubg, cmatrix, chess): Fix 'home-page'.
* gnu/packages/kde.scm (attica): Likewise.
* gnu/packages/mail.scm (fetchmail): Likewise.
* gnu/packages/popt.scm (popt): Likewise.
* gnu/packages/python.scm (python-mock): Likewise.
* gnu/packages/stalonetray.scm (stalonetray): Likewise.
---
 gnu/packages/fltk.scm|2 +-
 gnu/packages/fonts.scm   |6 +++---
 gnu/packages/games.scm   |6 +++---
 gnu/packages/kde.scm |2 +-
 gnu/packages/mail.scm|2 +-
 gnu/packages/popt.scm|4 ++--
 gnu/packages/python.scm  |2 +-
 gnu/packages/stalonetray.scm |2 +-
 8 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/gnu/packages/fltk.scm b/gnu/packages/fltk.scm
index 9d22892..6aee41d 100644
--- a/gnu/packages/fltk.scm
+++ b/gnu/packages/fltk.scm
@@ -50,7 +50,7 @@
   (substitute* makeinclude.in
 ((/bin/sh) (which sh
 %standard-phases)))
-(home-page https://www.fltk.org;)
+(home-page http://www.fltk.org;)
 (synopsis 3D C++ GUI library)
 (description FLTK is a C++ GUI toolkit providing modern GUI functionality
 without the bloat.  It supports 3D graphics via OpenGL and its built-in GLUT
diff --git a/gnu/packages/fonts.scm b/gnu/packages/fonts.scm
index 74cfc9d..c16ab93 100644
--- a/gnu/packages/fonts.scm
+++ b/gnu/packages/fonts.scm
@@ -1,5 +1,5 @@
 ;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2013 Ludovic Courtès l...@gnu.org
+;;; Copyright © 2013, 2014 Ludovic Courtès l...@gnu.org
 ;;; Copyright © 2014 Mark H Weaver m...@netris.org
 ;;; Copyright © 2014 Joshua Grant ta...@riseup.net
 ;;; Copyright © 2014 Alex Kost alez...@gmail.com
@@ -144,13 +144,13 @@ provide serif, sans and monospaced variants.)
 (native-inputs `((source ,source)
  (tar ,tar)
  (bzip2 ,bzip2)))
-(home-page https://www-old.gnome.org/fonts/;)
+(home-page http://www.gnome.org/fonts/;)
 (synopsis Bitstream Vera sans-serif typeface)
 (description Vera is a sans-serif typeface from Bitstream, Inc.  This
 package provides the TrueType (TTF) files.)
 (license
  (license:x11-style
-  https://www-old.gnome.org/fonts/#Final_Bitstream_Vera_Fonts;
+  http://www.gnome.org/fonts/#Final_Bitstream_Vera_Fonts;
 
 (define-public font-gnu-freefont-ttf
   (package
diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
index b8696a5..066e0e6 100644
--- a/gnu/packages/games.scm
+++ b/gnu/packages/games.scm
@@ -88,7 +88,7 @@
   (libcanberra ,libcanberra)))
 (native-inputs `((python-2 ,python-2)
  (pkg-config ,pkg-config)))
-(home-page https://gnubg.org;)
+(home-page http://gnubg.org;)
 (synopsis Backgammon game)
 (description The GNU backgammon application can be used for playing, 
analyzing and
 teaching the game.  It has an advanced evaluation engine based on artificial
@@ -283,7 +283,7 @@ a C library, so they can easily be integrated into other 
programs.)
 (string-append --prefix= out)
   %standard-phases)))
 (inputs `((ncurses ,ncurses)))
-(home-page http://.asty.org/cmatrix;)
+(home-page http://www.asty.org/cmatrix;)
 (synopsis Simulate the display from \The Matrix\)
 (description CMatrix simulates the display from \The Matrix\ and is
 based on the screensaver from the movie's website.  It works with terminal
@@ -304,7 +304,7 @@ asynchronously and at a user-defined speed.)
 (base32
  1jckpg1qi1vjr3pqs0dnip3rmn0mgklx63xflrpqiv3cx2qlz8kn
 (build-system gnu-build-system)
-(home-page http://.gnu.org/software/chess;)
+(home-page http://www.gnu.org/software/chess;)
 (synopsis Full chess implementation)
 (description GNU Chess is a chess engine.  It allows you to compete
 against the computer in a game of chess, either through the default terminal
diff --git a/gnu/packages/kde.scm b/gnu/packages/kde.scm
index e97ac27..52ed93e 100644
--- a/gnu/packages/kde.scm
+++ b/gnu/packages/kde.scm
@@ -153,7 +153,7 @@ and import their menus over DBus.)
 (build-system cmake-build-system)
 (inputs
  `((qt ,qt-4)))
-(home-page https://projects.kde.org/projects/kdesupport/attica;)
+(home-page https://projects.kde.org/projects/frameworks/attica;)
 (synopsis Qt library for the Open Collaboration Services API)
 (description Attica is a Qt library that implements the Open
 Collaboration Services API version 1.6.  It grants easy 

branch master updated (f9930cf - 07af3e5)

2014-12-28 Thread Ludovic Courts
civodul pushed a change to branch master
in repository guix.

  from  f9930cf   Merge branch 'xorg-updates'
   new  a3bf096   lint: Add 'home-page' checker.
   new  07af3e5   gnu: Fix or update a number of 'home-page' fields.

The 2 revisions listed above as new are entirely new to this
repository and will be described in separate emails.  The revisions
listed as adds were already present in the repository and have only
been added to this reference.


Summary of changes:
 gnu/packages/fltk.scm|2 +-
 gnu/packages/fonts.scm   |6 +-
 gnu/packages/games.scm   |6 +-
 gnu/packages/kde.scm |2 +-
 gnu/packages/mail.scm|2 +-
 gnu/packages/popt.scm|4 +-
 gnu/packages/python.scm  |2 +-
 gnu/packages/stalonetray.scm |2 +-
 guix/build/download.scm  |3 +-
 guix/scripts/lint.scm|  106 ++
 10 files changed, 121 insertions(+), 14 deletions(-)



01/01: lint: Report on the package being checked.

2014-12-28 Thread Ludovic Courts
civodul pushed a commit to branch master
in repository guix.

commit c79c6e598ad48dfe1cd2d0d8e9d7d3c311a48f5d
Author: Ludovic Courtès l...@gnu.org
Date:   Sun Dec 28 18:21:53 2014 +0100

lint: Report on the package being checked.

* guix/scripts/lint.scm (run-checkers): Check
  whether (current-error-port) is a tty, and print the package being
  checked and the checker currently running when it is.
---
 guix/scripts/lint.scm |   12 +---
 1 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/guix/scripts/lint.scm b/guix/scripts/lint.scm
index d6aa54d..9a0d997 100644
--- a/guix/scripts/lint.scm
+++ b/guix/scripts/lint.scm
@@ -408,9 +408,15 @@ descriptions maintained upstream.
 
 (define (run-checkers package checkers)
   ;; Run the given CHECKERS on PACKAGE.
-  (for-each (lambda (checker)
-  ((lint-checker-check checker) package))
-checkers))
+  (let ((tty? (isatty? (current-error-port)))
+(name (package-full-name package)))
+(for-each (lambda (checker)
+(when tty?
+  (format (current-error-port) checking ~a [~a]...\r
+  name (lint-checker-name checker))
+  (force-output (current-error-port)))
+((lint-checker-check checker) package))
+  checkers)))
 
 
 ;;;



branch core-updates updated (2a8d440 - f05bdc9)

2014-12-28 Thread Ludovic Courts
civodul pushed a change to branch core-updates
in repository guix.

  from  2a8d440   gnu: libxml2: Add search path specification.
   new  f05bdc9   gnu: Don't use --strip-all in cases where this is 
problematic.

The 1 revisions listed above as new are entirely new to this
repository and will be described in separate emails.  The revisions
listed as adds were already present in the repository and have only
been added to this reference.


Summary of changes:
 gnu/packages/base.scm   |3 +++
 gnu/packages/commencement.scm   |4 
 guix/build-system/gnu.scm   |2 ++
 guix/build/gnu-build-system.scm |   11 ++-
 4 files changed, 19 insertions(+), 1 deletions(-)



01/01: gnu: Don't use --strip-all in cases where this is problematic.

2014-12-28 Thread Ludovic Courts
civodul pushed a commit to branch core-updates
in repository guix.

commit f05bdc9412135f34a1c417edc203c35cd005d0d5
Author: Ludovic Courtès l...@gnu.org
Date:   Sun Dec 28 23:46:59 2014 +0100

gnu: Don't use --strip-all in cases where this is problematic.

This is a followup to 856ae5e.  See http://hydra.gnu.org/build/180506
for an example of build failure.

* guix/build/gnu-build-system.scm (strip): Add #:archive-strip-flags
  parameter.  Use it when (ar-file? path).
* guix/build-system/gnu.scm (gnu-build): Add #:archive-strip-flags
  parameter and pass it down.
* gnu/packages/commencement.scm (gcc-boot0)[arguments]: Add
  #:strip-flags.
* gnu/packages/base.scm (glibc)[arguments]: Likewise.
---
 gnu/packages/base.scm   |3 +++
 gnu/packages/commencement.scm   |4 
 guix/build-system/gnu.scm   |2 ++
 guix/build/gnu-build-system.scm |   11 ++-
 4 files changed, 19 insertions(+), 1 deletions(-)

diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm
index 5bf27c9..b4f4d8e 100644
--- a/gnu/packages/base.scm
+++ b/gnu/packages/base.scm
@@ -421,6 +421,9 @@ included.)
 ;; XXX: Work around undefined reference to `__stack_chk_guard'.
 libc_cv_ssp=no)
 
+  ;; Using '--strip-all' on crt*.o breaks them.
+  #:strip-flags '(--strip-debug)
+
   #:tests? #f ; XXX
   #:phases (alist-cons-before
 'configure 'pre-configure
diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm
index 20831de..309e195 100644
--- a/gnu/packages/commencement.scm
+++ b/gnu/packages/commencement.scm
@@ -170,6 +170,10 @@ identifier SYSTEM.
(ice-9 regex)
(srfi srfi-1)
(srfi srfi-26))
+
+;; Using '--strip-all' leads to a link failure while building libc.
+#:strip-flags '(--strip-debug)
+
 ,@(substitute-keyword-arguments (package-arguments gcc-4.8)
 ((#:configure-flags flags)
  `(append (list ,(string-append --target= (boot-triplet))
diff --git a/guix/build-system/gnu.scm b/guix/build-system/gnu.scm
index f765a14..e2b41b1 100644
--- a/guix/build-system/gnu.scm
+++ b/guix/build-system/gnu.scm
@@ -275,6 +275,7 @@ standard packages used as implicit inputs of the GNU build 
system.
 (patch-shebangs? #t)
 (strip-binaries? #t)
 (strip-flags ''(--strip-all))
+(archive-strip-flags ''(--strip-debug))
 (strip-directories ''(lib lib64 libexec
   bin sbin))
 (phases '%standard-phases)
@@ -338,6 +339,7 @@ are allowed to refer to.
   #:patch-shebangs? ,patch-shebangs?
   #:strip-binaries? ,strip-binaries?
   #:strip-flags ,strip-flags
+  #:archive-strip-flags ,archive-strip-flags
   #:strip-directories ,strip-directories)))
 
   (define guile-for-build
diff --git a/guix/build/gnu-build-system.scm b/guix/build/gnu-build-system.scm
index 11b43c5..a985b1c 100644
--- a/guix/build/gnu-build-system.scm
+++ b/guix/build/gnu-build-system.scm
@@ -298,6 +298,12 @@ makefiles.
  (string-append target -objcopy)
  objcopy))
 (strip-flags '(--strip-all))
+
+;; Using '--strip-all' on .a file would remove the archive
+;; index, leading to Archive has no index errors when
+;; linking against them.
+(archive-strip-flags '(--strip-debug))
+
 (strip-directories '(lib lib64 libexec
  bin sbin))
 #:allow-other-keys)
@@ -353,7 +359,10 @@ makefiles.
  (or (not debug-output)
  (make-debug-file path))
  (zero? (apply system* strip-command
-   (append strip-flags (list path
+   (append (if (ar-file? path)
+   archive-strip-flags
+   strip-flags)
+   (list path
  (or (not debug-output)
  (add-debug-link path
   (const #t)  ; down



branch master updated (c79c6e5 - 8f501ac)

2014-12-29 Thread Ludovic Courts
civodul pushed a change to branch master
in repository guix.

  from  c79c6e5   lint: Report on the package being checked.
   new  8f501ac   gnu: Fix misuses of 'x11-style' licenses.

The 1 revisions listed above as new are entirely new to this
repository and will be described in separate emails.  The revisions
listed as adds were already present in the repository and have only
been added to this reference.


Summary of changes:
 gnu/packages/xorg.scm |6 --
 1 files changed, 4 insertions(+), 2 deletions(-)



branch master updated (8f501ac - 1c69e4c)

2014-12-29 Thread Ludovic Courts
civodul pushed a change to branch master
in repository guix.

  from  8f501ac   gnu: Fix misuses of 'x11-style' licenses.
   new  907c98a   lint: Add tests for the 'home-page' checker.
   new  8b38596   tests: Factorize the 'dummy-package' macro.
   new  4fbf4ca   tests: Make the 'lint' tests slightly more concise.
   new  dd8ea24   download: Export 'maybe-expand-mirrors'.
   new  1c69e4c   list-packages: Expand 'mirror://' URIs for patches.

The 5 revisions listed above as new are entirely new to this
repository and will be described in separate emails.  The revisions
listed as adds were already present in the repository and have only
been added to this reference.


Summary of changes:
 build-aux/list-packages.scm |   11 +-
 guix/build/download.scm |   45 +++---
 guix/scripts/lint.scm   |3 +-
 guix/tests.scm  |   12 ++-
 tests/lint.scm  |  359 ---
 tests/packages.scm  |7 -
 6 files changed, 283 insertions(+), 154 deletions(-)



01/05: lint: Add tests for the 'home-page' checker.

2014-12-29 Thread Ludovic Courts
civodul pushed a commit to branch master
in repository guix.

commit 907c98acbbf533715983c61a1e53cb29a52c4bef
Author: Ludovic Courtès l...@gnu.org
Date:   Mon Dec 29 20:39:58 2014 +0100

lint: Add tests for the 'home-page' checker.

Suggested by Cyril Roelandt tipec...@gmail.com.

* tests/lint.scm (%http-server-port, %http-server-socket, %local-url,
  stub-http-server): New variables.
  (http-write, call-with-http-server): New procedures.
  (with-http-server): New macro.
  (home-page: wrong home-page, home-page: invalid URI, home-page:
  host not found, home-page: Connection refused, home-page: 200,
  home-page: 404): New tests.
* guix/scripts/lint.scm (check-home-page): Export.
---
 guix/scripts/lint.scm |3 +-
 tests/lint.scm|  147 -
 2 files changed, 148 insertions(+), 2 deletions(-)

diff --git a/guix/scripts/lint.scm b/guix/scripts/lint.scm
index 9a0d997..15ae213 100644
--- a/guix/scripts/lint.scm
+++ b/guix/scripts/lint.scm
@@ -42,7 +42,8 @@
 check-description-style
 check-inputs-should-be-native
 check-patches
-check-synopsis-style))
+check-synopsis-style
+check-home-page))
 
 
 ;;;
diff --git a/tests/lint.scm b/tests/lint.scm
index e77d443..8ae129d 100644
--- a/tests/lint.scm
+++ b/tests/lint.scm
@@ -26,10 +26,82 @@
   #:use-module (guix ui)
   #:use-module (gnu packages)
   #:use-module (gnu packages pkg-config)
+  #:use-module (web server)
+  #:use-module (web server http)
+  #:use-module (web response)
+  #:use-module (ice-9 threads)
+  #:use-module (srfi srfi-9 gnu)
   #:use-module (srfi srfi-64))
 
 ;; Test the linter.
 
+(define %http-server-port
+  ;; TCP port to use for the stub HTTP server.
+  )
+
+(define %local-url
+  ;; URL to use for 'home-page' tests.
+  (string-append http://localhost:; (number-string %http-server-port)
+ /foo/bar))
+
+(define %http-server-socket
+  ;; Socket used by the Web server.
+  (catch 'system-error
+(lambda ()
+  (let ((sock (socket PF_INET SOCK_STREAM 0)))
+(setsockopt sock SOL_SOCKET SO_REUSEADDR 1)
+(bind sock
+  (make-socket-address AF_INET INADDR_LOOPBACK
+   %http-server-port))
+sock))
+(lambda args
+  (let ((err (system-error-errno args)))
+(format (current-error-port)
+warning: cannot run Web server for tests: ~a~%
+(strerror err))
+#f
+
+(define (http-write server client response body)
+  Write RESPONSE.
+  (let* ((response (write-response response client))
+ (port (response-port response)))
+(cond
+ ((not body)) ;pass
+ (else
+  (write-response-body response body)))
+(close-port port)
+(quit #t) ;exit the server thread
+(values)))
+
+(define-server-impl stub-http-server
+  ;; Stripped-down version of Guile's built-in HTTP server.
+  (@@ (web server http) http-open)
+  (@@ (web server http) http-read)
+  http-write
+  (@@ (web server http) http-close))
+
+(define (call-with-http-server code thunk)
+  Call THUNK with an HTTP server running and returning CODE on HTTP
+requests.
+  (define (server-body)
+(define (handle request body)
+  (values (build-response #:code code
+  #:reason-phrase Such is life)
+  Hello, world.))
+
+(catch 'quit
+  (lambda ()
+(run-server handle stub-http-server
+`(#:socket ,%http-server-socket)))
+  (const #t)))
+
+  (let* ((server (make-thread server-body)))
+;; Normally SERVER exits automatically once it has received a request.
+(thunk)))
+
+(define-syntax-rule (with-http-server code body ...)
+  (call-with-http-server code (lambda () body ...)))
+
 
 (test-begin lint)
 
@@ -235,9 +307,82 @@
 (sha256 somesha)
 (patches (list /path/to/y.patch)))
   (check-patches pkg
- file names of patches should start with the package name)))
+ file names of patches should start with the package name)))
+
+(test-assert home-page: wrong home-page
+  (-bool
+   (string-contains
+(call-with-warnings
+ (lambda ()
+   (let ((pkg (package
+(inherit (dummy-package x))
+(home-page #f
+ (check-home-page pkg
+invalid)))
+
+(test-assert home-page: invalid URI
+  (-bool
+   (string-contains
+(call-with-warnings
+ (lambda ()
+   (let ((pkg (package
+(inherit (dummy-package x))
+(home-page foobar
+ (check-home-page pkg
+invalid home page URL)))
+
+(test-assert home-page: host not found
+  (-bool
+   (string-contains
+(call-with-warnings
+ (lambda ()
+   (let ((pkg (package
+ 

05/05: list-packages: Expand 'mirror://' URIs for patches.

2014-12-29 Thread Ludovic Courts
civodul pushed a commit to branch master
in repository guix.

commit 1c69e4ce3f33242ee8d209b8078fc78a73355446
Author: Ludovic Courtès l...@gnu.org
Date:   Mon Dec 29 20:52:08 2014 +0100

list-packages: Expand 'mirror://' URIs for patches.

* build-aux/list-packages.scm (package-sxml)[patches](patch-url): Use
  'maybe-expand-mirrors' to get the real URL.
---
 build-aux/list-packages.scm |   11 ---
 1 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/build-aux/list-packages.scm b/build-aux/list-packages.scm
index 6e0455a..c55e84a 100755
--- a/build-aux/list-packages.scm
+++ b/build-aux/list-packages.scm
@@ -27,6 +27,8 @@ exec guile -l $0  \
   #:use-module (guix packages)
   #:use-module (guix licenses)
   #:use-module (guix gnu-maintenance)
+  #:use-module ((guix download) #:select (%mirrors))
+  #:use-module ((guix build download) #:select (maybe-expand-mirrors))
   #:use-module (gnu packages)
   #:use-module (sxml simple)
   #:use-module (sxml fold)
@@ -107,9 +109,12 @@ decreasing, is 1.
  http://git.savannah.gnu.org/cgit/guix.git/tree/gnu/packages/patches/;
  (basename patch)))
((? origin? patch)
-(match (origin-uri patch)
-  ((? string? uri) uri)
-  ((head . tail) head)
+(uri-string
+ (first (maybe-expand-mirrors (string-uri
+   (match (origin-uri patch)
+ ((? string? uri) uri)
+ ((head . tail) head)))
+  %mirrors))
 
 (define patch-name
   (match-lambda



01/01: gnu: Revert use of '--strip-all'.

2014-12-29 Thread Ludovic Courts
civodul pushed a commit to branch core-updates
in repository guix.

commit 7da473b75721e06237b106c6d186f2729117b1ee
Author: Ludovic Courtès l...@gnu.org
Date:   Mon Dec 29 21:44:48 2014 +0100

gnu: Revert use of '--strip-all'.

This reverts commits f05bdc9412135f34a1c417edc203c35cd005d0d5
and 856ae5e6c71a1283a414d33e638051f95d3cce35.

This broke all sorts of things.  See http://hydra.gnu.org/eval/102058,
for example.
---
 gnu/packages/base.scm   |3 ---
 gnu/packages/commencement.scm   |4 
 gnu/packages/linux.scm  |5 -
 guix/build-system/gnu.scm   |4 +---
 guix/build/gnu-build-system.scm |   13 ++---
 5 files changed, 3 insertions(+), 26 deletions(-)

diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm
index b4f4d8e..5bf27c9 100644
--- a/gnu/packages/base.scm
+++ b/gnu/packages/base.scm
@@ -421,9 +421,6 @@ included.)
 ;; XXX: Work around undefined reference to `__stack_chk_guard'.
 libc_cv_ssp=no)
 
-  ;; Using '--strip-all' on crt*.o breaks them.
-  #:strip-flags '(--strip-debug)
-
   #:tests? #f ; XXX
   #:phases (alist-cons-before
 'configure 'pre-configure
diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm
index 309e195..20831de 100644
--- a/gnu/packages/commencement.scm
+++ b/gnu/packages/commencement.scm
@@ -170,10 +170,6 @@ identifier SYSTEM.
(ice-9 regex)
(srfi srfi-1)
(srfi srfi-26))
-
-;; Using '--strip-all' leads to a link failure while building libc.
-#:strip-flags '(--strip-debug)
-
 ,@(substitute-keyword-arguments (package-arguments gcc-4.8)
 ((#:configure-flags flags)
  `(append (list ,(string-append --target= (boot-triplet))
diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index 5336825..9dc5f5c 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -292,11 +292,6 @@ for SYSTEM, or #f if there is no configuration for SYSTEM.
  (alist-replace
   'install ,install-phase
   (alist-delete 'configure %standard-phases)))
-
-   ;; Use '--strip-debug', not '--strip-all', because the latter leads to
-   ;; unloadable modules (due to the lack of a symbol table.)
-   #:strip-flags '(--strip-debug)
-
#:tests? #f))
 (synopsis 100% free redistribution of a cleaned Linux kernel)
 (description
diff --git a/guix/build-system/gnu.scm b/guix/build-system/gnu.scm
index e2b41b1..c675155 100644
--- a/guix/build-system/gnu.scm
+++ b/guix/build-system/gnu.scm
@@ -274,8 +274,7 @@ standard packages used as implicit inputs of the GNU build 
system.
 (parallel-tests? #t)
 (patch-shebangs? #t)
 (strip-binaries? #t)
-(strip-flags ''(--strip-all))
-(archive-strip-flags ''(--strip-debug))
+(strip-flags ''(--strip-debug))
 (strip-directories ''(lib lib64 libexec
   bin sbin))
 (phases '%standard-phases)
@@ -339,7 +338,6 @@ are allowed to refer to.
   #:patch-shebangs? ,patch-shebangs?
   #:strip-binaries? ,strip-binaries?
   #:strip-flags ,strip-flags
-  #:archive-strip-flags ,archive-strip-flags
   #:strip-directories ,strip-directories)))
 
   (define guile-for-build
diff --git a/guix/build/gnu-build-system.scm b/guix/build/gnu-build-system.scm
index a985b1c..1311cdc 100644
--- a/guix/build/gnu-build-system.scm
+++ b/guix/build/gnu-build-system.scm
@@ -297,13 +297,7 @@ makefiles.
 (objcopy-command (if target
  (string-append target -objcopy)
  objcopy))
-(strip-flags '(--strip-all))
-
-;; Using '--strip-all' on .a file would remove the archive
-;; index, leading to Archive has no index errors when
-;; linking against them.
-(archive-strip-flags '(--strip-debug))
-
+(strip-flags '(--strip-debug))
 (strip-directories '(lib lib64 libexec
  bin sbin))
 #:allow-other-keys)
@@ -359,10 +353,7 @@ makefiles.
  (or (not debug-output)
  (make-debug-file path))
  (zero? (apply system* strip-command
-   (append (if (ar-file? path)
-   archive-strip-flags
-   strip-flags)
-   (list path
+   

branch core-updates updated (f05bdc9 - 7da473b)

2014-12-29 Thread Ludovic Courts
civodul pushed a change to branch core-updates
in repository guix.

  from  f05bdc9   gnu: Don't use --strip-all in cases where this is 
problematic.
   new  7da473b   gnu: Revert use of '--strip-all'.

The 1 revisions listed above as new are entirely new to this
repository and will be described in separate emails.  The revisions
listed as adds were already present in the repository and have only
been added to this reference.


Summary of changes:
 gnu/packages/base.scm   |3 ---
 gnu/packages/commencement.scm   |4 
 gnu/packages/linux.scm  |5 -
 guix/build-system/gnu.scm   |4 +---
 guix/build/gnu-build-system.scm |   13 ++---
 5 files changed, 3 insertions(+), 26 deletions(-)



branch core-updates updated (bf0baaf - cf81a23)

2015-01-03 Thread Ludovic Courts
civodul pushed a change to branch core-updates
in repository guix.

  from  bf0baaf   gnu: glibc: MIPS: Avoid a dangling `vfork@GLIBC_2.0' 
reference.
   new  7452806   gnu: libxml2: Wrap search path specification in a list.
   new  cf81a23   guix package: Follow symlinks for pattern search paths.

The 2 revisions listed above as new are entirely new to this
repository and will be described in separate emails.  The revisions
listed as adds were already present in the repository and have only
been added to this reference.


Summary of changes:
 gnu/packages/xml.scm |   14 ++--
 guix/scripts/package.scm |   17 ++-
 tests/packages.scm   |   51 ++
 3 files changed, 69 insertions(+), 13 deletions(-)



01/02: gnu: libxml2: Wrap search path specification in a list.

2015-01-03 Thread Ludovic Courts
civodul pushed a commit to branch core-updates
in repository guix.

commit 7452806931216a5ec8712dd39327540a3307a6ce
Author: Ludovic Courtès l...@gnu.org
Date:   Sat Jan 3 18:48:16 2015 +0100

gnu: libxml2: Wrap search path specification in a list.

Reported by Mark H Weaver.

* gnu/packages/xml.scm (libxml2)[native-search-paths]: Wrap into a list.
---
 gnu/packages/xml.scm |   14 +++---
 1 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/gnu/packages/xml.scm b/gnu/packages/xml.scm
index 62f8c3c..b4b9140 100644
--- a/gnu/packages/xml.scm
+++ b/gnu/packages/xml.scm
@@ -1,5 +1,5 @@
 ;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2013, 2014 Ludovic Courtès l...@gnu.org
+;;; Copyright © 2013, 2014, 2015 Ludovic Courtès l...@gnu.org
 ;;; Copyright © 2013 Andreas Enge andr...@enge.fr
 ;;;
 ;;; This file is part of GNU Guix.
@@ -72,12 +72,12 @@ things the parser might find in the XML document (like 
start tags).)
 
 ;; $XML_CATALOG_FILES lists 'catalog.xml' files found in under the 'xml'
 ;; sub-directory of any given package.
-(native-search-paths (search-path-specification
-  (variable XML_CATALOG_FILES)
-  (separator  )
-  (files '(xml))
-  (file-pattern ^catalog\\.xml$)
-  (file-type 'regular)))
+(native-search-paths (list (search-path-specification
+(variable XML_CATALOG_FILES)
+(separator  )
+(files '(xml))
+(file-pattern ^catalog\\.xml$)
+(file-type 'regular
 (search-paths native-search-paths)
 
 (arguments



02/02: guix package: Follow symlinks for pattern search paths.

2015-01-03 Thread Ludovic Courts
civodul pushed a commit to branch core-updates
in repository guix.

commit cf81a2363989429f4af518e92e7404655d45dbc7
Author: Ludovic Courtès l...@gnu.org
Date:   Sat Jan 3 19:46:07 2015 +0100

guix package: Follow symlinks for pattern search paths.

* guix/scripts/package.scm (search-path-environment-variables): Add
  local 'files' variable.
* tests/packages.scm (--search-paths with pattern): New test.
---
 guix/scripts/package.scm |   17 ++-
 tests/packages.scm   |   51 ++
 2 files changed, 62 insertions(+), 6 deletions(-)

diff --git a/guix/scripts/package.scm b/guix/scripts/package.scm
index 2f694cd..30b0658 100644
--- a/guix/scripts/package.scm
+++ b/guix/scripts/package.scm
@@ -365,12 +365,17 @@ current settings and report only settings not already 
effective.
   (match-lambda
(($ search-path-specification variable files separator
type pattern)
-(let ((values (or (and= (getenv variable)
- (cut string-tokenize*  separator))
-  '()))
-  (path   (search-path-as-list files (list profile)
-   #:type type
-   #:pattern pattern)))
+(let* ((values (or (and= (getenv variable)
+  (cut string-tokenize*  separator))
+   '()))
+   ;; Add a trailing slash to force symlinks to be treated as
+   ;; directories when 'find-files' traverses them.
+   (files  (if pattern
+   (map (cut string-append  /) files)
+   files))
+   (path   (search-path-as-list files (list profile)
+#:type type
+#:pattern pattern)))
   (if (every (cut member  values) path)
   #f
   (format #f export ~a=\~a\
diff --git a/tests/packages.scm b/tests/packages.scm
index bb83032..72c69ff 100644
--- a/tests/packages.scm
+++ b/tests/packages.scm
@@ -19,6 +19,7 @@
 (define-module (test-packages)
   #:use-module (guix tests)
   #:use-module (guix store)
+  #:use-module (guix monads)
   #:use-module ((guix utils)
 ;; Rename the 'location' binding to allow proper syntax
 ;; matching when setting the 'location' field of a package.
@@ -31,10 +32,13 @@
   #:use-module (guix build-system)
   #:use-module (guix build-system trivial)
   #:use-module (guix build-system gnu)
+  #:use-module (guix profiles)
+  #:use-module (guix scripts package)
   #:use-module (gnu packages)
   #:use-module (gnu packages base)
   #:use-module (gnu packages guile)
   #:use-module (gnu packages bootstrap)
+  #:use-module (gnu packages xml)
   #:use-module (srfi srfi-1)
   #:use-module (srfi srfi-26)
   #:use-module (srfi srfi-34)
@@ -527,6 +531,53 @@
 (((? (cut eq? hello ))) #t)
 (wrong (pk 'find-packages-by-name wrong #f
 
+(test-assert --search-paths with pattern
+  ;; Make sure 'guix package --search-paths' correctly reports environment
+  ;; variables when file patterns are used (in particular, it must follow
+  ;; symlinks when looking for 'catalog.xml'.)  To do that, we rely on the
+  ;; libxml2 package specification, which contains such a definition.
+  (let* ((p1 (package
+   (name foo) (version 0) (source #f)
+   (build-system trivial-build-system)
+   (arguments
+`(#:guile ,%bootstrap-guile
+  #:modules ((guix build utils))
+  #:builder (begin
+  (use-modules (guix build utils))
+  (let ((out (assoc-ref %outputs out)))
+(mkdir-p (string-append out /xml/bar/baz))
+(call-with-output-file
+(string-append out 
/xml/bar/baz/catalog.xml)
+  (lambda (port)
+(display xml? wat?! port)))
+   (synopsis #f) (description #f)
+   (home-page #f) (license #f)))
+ (p2 (package
+   ;; Provide a fake libxml2 to avoid building the real one.  This
+   ;; is OK because 'guix package' gets search path specifications
+   ;; from the same-named package found in the distro.
+   (name libxml2) (version 0.0.0) (source #f)
+   (build-system trivial-build-system)
+   (arguments
+`(#:guile ,%bootstrap-guile
+  #:builder (mkdir (assoc-ref %outputs out
+   (native-search-paths (package-native-search-paths libxml2))
+   (synopsis #f) (description #f)
+   (home-page #f) (license #f)))
+ (prof (run-with-store %store
+  

02/02: gnu: Search for patches under $GUIX_PACKAGE_PATH.

2015-01-03 Thread Ludovic Courts
civodul pushed a commit to branch master
in repository guix.

commit ee06af5b4b314211f05c866f7226b8cb056a335b
Author: Ludovic Courtès l...@gnu.org
Date:   Sat Jan 3 23:49:42 2015 +0100

gnu: Search for patches under $GUIX_PACKAGE_PATH.

Fixes http://bugs.gnu.org/19364.
Reported by Tomáš Čech sleep_wal...@suse.cz
and Mark H Weaver m...@netris.org.

* gnu/packages.scm (%patch-path): Move after definition of
  %package-module-path'.  Append /gnu/packages/patches only to
  %DISTRO-ROOT-DIRECTORY.
* tests/guix-package.sh: Add 'emacs-foo-bar-patched' test.
---
 gnu/packages.scm  |   17 +++--
 tests/guix-package.sh |   23 +--
 2 files changed, 32 insertions(+), 8 deletions(-)

diff --git a/gnu/packages.scm b/gnu/packages.scm
index 6109d1f..7f0b58b 100644
--- a/gnu/packages.scm
+++ b/gnu/packages.scm
@@ -1,5 +1,5 @@
 ;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2012, 2013, 2014 Ludovic Courtès l...@gnu.org
+;;; Copyright © 2012, 2013, 2014, 2015 Ludovic Courtès l...@gnu.org
 ;;; Copyright © 2013 Mark H Weaver m...@netris.org
 ;;; Copyright © 2014 Eric Bavier bav...@member.fsf.org
 ;;;
@@ -64,11 +64,6 @@
 ;; and an extra environment variable.  One advantage of this setup is
 ;; that everything just works in an auto-compilation setting.
 
-(define %patch-path
-  (make-parameter
-   (map (cut string-append  /gnu/packages/patches)
-%load-path)))
-
 (define %bootstrap-binaries-path
   (make-parameter
(map (cut string-append  /gnu/packages/bootstrap)
@@ -104,6 +99,16 @@
 (make-parameter
  (append environment `((,%distro-root-directory . gnu/packages))
 
+(define %patch-path
+  ;; Define it after '%package-module-path' so that '%load-path' contains user
+  ;; directories, allowing patches in $GUIX_PACKAGE_PATH to be found.
+  (make-parameter
+   (map (lambda (directory)
+  (if (string=? directory %distro-root-directory)
+  (string-append directory /gnu/packages/patches)
+  directory))
+%load-path)))
+
 (define* (scheme-files directory)
   Return the list of Scheme files found under DIRECTORY, recursively.  The
 returned list is sorted in alphabetical order.
diff --git a/tests/guix-package.sh b/tests/guix-package.sh
index f4e091a..3959269 100644
--- a/tests/guix-package.sh
+++ b/tests/guix-package.sh
@@ -1,5 +1,5 @@
 # GNU Guix --- Functional package management for GNU
-# Copyright © 2012, 2013, 2014 Ludovic Courtès l...@gnu.org
+# Copyright © 2012, 2013, 2014, 2015 Ludovic Courtès l...@gnu.org
 # Copyright © 2013 Nikita Karetnikov nik...@karetnikov.org
 #
 # This file is part of GNU Guix.
@@ -289,10 +289,29 @@ GUIX_PACKAGE_PATH=$module_dir
 export GUIX_PACKAGE_PATH
 guix package -A emacs-foo-bar | grep 42
 guix package -i emacs-foo-bar-42 -n
+
+# Make sure patches that live under $GUIX_PACKAGE_PATH are found.
+cat  $module_dir/emacs.patchEOF
+This is a fake patch.
+EOF
+cat  $module_dir/foo.scmEOF
+(define-module (foo)
+  #:use-module (guix packages)
+  #:use-module (gnu packages)
+  #:use-module (gnu packages emacs))
+
+(define-public x
+  (package (inherit emacs)
+(source (origin (inherit (package-source emacs))
+  (patches (list (search-patch emacs.patch)
+(name emacs-foo-bar-patched)
+(version 42)))
+EOF
+guix package -i emacs-foo-bar-patched -n
+
 unset GUIX_PACKAGE_PATH
 
 # Using 'GUIX_BUILD_OPTIONS'.
-
 available=`guix package -A | sort`
 GUIX_BUILD_OPTIONS=--dry-run
 export GUIX_BUILD_OPTIONS



02/02: derivations: Raise an error for references to non-existent outputs.

2015-01-24 Thread Ludovic Courts
civodul pushed a commit to branch master
in repository guix.

commit f304c9c237aca7e9007d6e0cefd6ed858c5a9e47
Author: Ludovic Courtès l...@gnu.org
Date:   Sat Jan 24 22:50:40 2015 +0100

derivations: Raise an error for references to non-existent outputs.

Fixes http://bugs.gnu.org/19630.
Reported by Ricardo Wurmus ricardo.wur...@mdc-berlin.de.

* guix/derivations.scm (derivation-error,
  derivation-missing-output-error): New error conditions.
  (derivation-output-path): Raise a 'derivation-missing-output-error'
  if OUTPUT is not an output of DRV.
* guix/ui.scm (call-with-error-handling): Add case for
  'derivation-missing-output-error?'.
  (show-what-to-build): Check whether (derivation-outputs drv) is
  empty.
* tests/packages.scm (reference to non-existent output): Add test.
---
 guix/derivations.scm |   33 ++---
 guix/ui.scm  |9 ++---
 tests/packages.scm   |   11 +++
 3 files changed, 47 insertions(+), 6 deletions(-)

diff --git a/guix/derivations.scm b/guix/derivations.scm
index 4c34fcb..edf6b57 100644
--- a/guix/derivations.scm
+++ b/guix/derivations.scm
@@ -21,6 +21,8 @@
   #:use-module (srfi srfi-9)
   #:use-module (srfi srfi-9 gnu)
   #:use-module (srfi srfi-26)
+  #:use-module (srfi srfi-34)
+  #:use-module (srfi srfi-35)
   #:use-module (rnrs io ports)
   #:use-module (rnrs bytevectors)
   #:use-module (ice-9 match)
@@ -59,6 +61,13 @@
 derivation-input-sub-derivations
 derivation-input-output-paths
 
+derivation-error
+derivation-error?
+derivation-error-derivation
+derivation-missing-output-error
+derivation-missing-output-error?
+derivation-missing-output
+
 derivation-name
 derivation-output-names
 fixed-output-derivation?
@@ -98,6 +107,18 @@
   #:replace (build-derivations))
 
 ;;;
+;;; Error conditions.
+;;;
+
+(define-condition-type derivation-error nix-error
+  derivation-error?
+  (derivation derivation-error-derivation))
+
+(define-condition-type derivation-missing-output-error derivation-error
+  derivation-missing-output-error?
+  (output derivation-missing-output))
+
+;;;
 ;;; Nix derivations, as implemented in Nix's `derivations.cc'.
 ;;;
 
@@ -509,9 +530,15 @@ that form.
 (cut write-derivation drv ))
 
 (define* (derivation-output-path drv #:optional (output out))
-  Return the store path of its output OUTPUT.
-  (let ((outputs (derivation-outputs drv)))
-(and= (assoc-ref outputs output) derivation-output-path)))
+  Return the store path of its output OUTPUT.  Raise a
+'derivation-missing-output-error' condition if OUTPUT is not an output of
+DRV.
+  (let ((output* (assoc-ref (derivation-outputs drv) output)))
+(if output*
+(derivation-output-path output*)
+(raise (condition (derivation-missing-output-error
+   (derivation drv)
+   (output output)))
 
 (define (derivation-output-paths drv)
   Return the list of name/path pairs of the outputs of DRV.
diff --git a/guix/ui.scm b/guix/ui.scm
index e1e75d8..04c50f4 100644
--- a/guix/ui.scm
+++ b/guix/ui.scm
@@ -249,6 +249,10 @@ interpreted.
  ;; FIXME: Server-provided error messages aren't i18n'd.
  (leave (_ build failed: ~a~%)
 (nix-protocol-error-message c)))
+((derivation-missing-output-error? c)
+ (leave (_ reference to invalid output '~a' of derivation '~a'~%)
+(derivation-missing-output c)
+(derivation-file-name (derivation-error-derivation c
 ((message-condition? c)
  ;; Normally 'message' error conditions have an i18n'd message.
  (leave (_ ~a~%)
@@ -309,9 +313,8 @@ available for download.
 (const #f)))
 
   (define (built-or-substitutable? drv)
-(let ((out (derivation-output-path drv)))
-  ;; If DRV has zero outputs, OUT is #f.
-  (or (not out)
+(or (null? (derivation-outputs drv))
+(let ((out (derivation-output-path drv))) ;XXX: assume out exists
   (or (valid-path? store out)
   (substitutable? out)
 
diff --git a/tests/packages.scm b/tests/packages.scm
index ef34e76..65e5cc3 100644
--- a/tests/packages.scm
+++ b/tests/packages.scm
@@ -268,6 +268,17 @@
   (package-derivation %store p)
   #f)))
 
+(test-assert reference to non-existent output
+  ;; See http://bugs.gnu.org/19630.
+  (let* ((dep (dummy-package dep))
+ (p   (dummy-package p
+(inputs `((dep ,dep non-existent))
+(guard (c ((derivation-missing-output-error? c)
+   (and (string=? (derivation-missing-output c) non-existent)
+(equal? (package-derivation %store dep)
+(derivation-error-derivation c)
+  (package-derivation %store p
+
 

01/02: build-system/glib-or-gtk: Add MIME directories to $XDG_DATA_DIRS.

2015-01-23 Thread Ludovic Courts
civodul pushed a commit to branch master
in repository guix.

commit ca79e42ea2a6becbb444bad35dbbad4e03bfad2c
Author: Ludovic Courtès l...@gnu.org
Date:   Fri Jan 23 18:01:16 2015 +0100

build-system/glib-or-gtk: Add MIME directories to $XDG_DATA_DIRS.

Fixes an Evince regression introduced in commit 3d243e9.

* guix/build/glib-or-gtk-build-system.scm (data-directories): Check the
  /mime sub-directory.
---
 guix/build/glib-or-gtk-build-system.scm |7 ---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/guix/build/glib-or-gtk-build-system.scm 
b/guix/build/glib-or-gtk-build-system.scm
index a404a84..92e91bf 100644
--- a/guix/build/glib-or-gtk-build-system.scm
+++ b/guix/build/glib-or-gtk-build-system.scm
@@ -1,6 +1,6 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2014 Federico Beffa be...@fbengineering.ch
-;;; Copyright © 2014 Ludovic Courtès l...@gnu.org
+;;; Copyright © 2014, 2015 Ludovic Courtès l...@gnu.org
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -72,7 +72,7 @@ with all found directories.
 ;; http://www.freedesktop.org/wiki/DesktopThemeSpec
 ;; http://freedesktop.org/wiki/Specifications/sound-theme-spec
 ;; http://freedesktop.org/wiki/Specifications/icon-theme-spec
-;; 
+;;
 ;; Currently desktop themes are not well supported and do not honor
 ;; XDG_DATA_DIRS.  One example is evince which only looks for desktop themes
 ;; in $HOME/.themes (for backward compatibility) and in XDG_DATA_HOME (which
@@ -92,7 +92,8 @@ in INPUTS.  Return a list with all found directories.
(subdirectory-exists? datadir /themes)
(subdirectory-exists? datadir /cursors)
(subdirectory-exists? datadir /wallpapers)
-   (subdirectory-exists? datadir /icons))   
+   (subdirectory-exists? datadir /icons)
+   (subdirectory-exists? datadir /mime)) ;shared-mime-info
(not (directory-included? datadir previous)))
   (cons datadir previous)
   previous)))



02/03: hash: Initialize libgcrypt before use.

2015-01-26 Thread Ludovic Courts
civodul pushed a commit to branch master
in repository guix.

commit 19a454448b97d2e84164f8add9aaed42c645e338
Author: Ludovic Courtès l...@gnu.org
Date:   Mon Jan 26 21:42:23 2015 +0100

hash: Initialize libgcrypt before use.

Fixes http://bugs.gnu.org/19677.
Reported by Mark H Weaver m...@netris.org.

* guix/hash.scm: Use (guix gcrypt).
  (sha256, open-sha256-md, md-write, md-close): Use 'libgcrypt-func'
  instead of 'dynamic-func'.
---
 guix/hash.scm |   19 +++
 1 files changed, 7 insertions(+), 12 deletions(-)

diff --git a/guix/hash.scm b/guix/hash.scm
index 593c2e1..a61dc98 100644
--- a/guix/hash.scm
+++ b/guix/hash.scm
@@ -1,5 +1,5 @@
 ;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2012, 2013, 2014 Ludovic Courtès l...@gnu.org
+;;; Copyright © 2012, 2013, 2014, 2015 Ludovic Courtès l...@gnu.org
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -17,7 +17,7 @@
 ;;; along with GNU Guix.  If not, see http://www.gnu.org/licenses/.
 
 (define-module (guix hash)
-  #:use-module (guix config)
+  #:use-module (guix gcrypt)
   #:use-module (rnrs bytevectors)
   #:use-module (rnrs io ports)
   #:use-module (system foreign)
@@ -46,8 +46,7 @@
 
 (define sha256
   (let ((hash (pointer-procedure void
-  (dynamic-func gcry_md_hash_buffer
-(dynamic-link %libgcrypt))
+  (libgcrypt-func gcry_md_hash_buffer)
   `(,int * * ,size_t
 (lambda (bv)
   Return the SHA256 of BV as a bytevector.
@@ -58,8 +57,7 @@
 
 (define open-sha256-md
   (let ((open (pointer-procedure int
-  (dynamic-func gcry_md_open
-(dynamic-link %libgcrypt))
+  (libgcrypt-func gcry_md_open)
   `(* ,int ,unsigned-int
 (lambda ()
   (let* ((md  (bytevector-pointer (make-bytevector (sizeof '*
@@ -70,20 +68,17 @@
 
 (define md-write
   (pointer-procedure void
-  (dynamic-func gcry_md_write
-(dynamic-link %libgcrypt))
+  (libgcrypt-func gcry_md_write)
   `(* * ,size_t)))
 
 (define md-read
   (pointer-procedure '*
-  (dynamic-func gcry_md_read
-(dynamic-link %libgcrypt))
+  (libgcrypt-func gcry_md_read)
   `(* ,int)))
 
 (define md-close
   (pointer-procedure void
-  (dynamic-func gcry_md_close
-(dynamic-link %libgcrypt))
+  (libgcrypt-func gcry_md_close)
   '(*)))
 
 



03/03: substitute-binary: Let the user know when the cache is being updated.

2015-01-26 Thread Ludovic Courts
civodul pushed a commit to branch master
in repository guix.

commit 3bcfe23cfcb17e4495020fce7744a68c2daaf5fb
Author: Ludovic Courtès l...@gnu.org
Date:   Mon Jan 26 21:57:06 2015 +0100

substitute-binary: Let the user know when the cache is being updated.

* guix/scripts/substitute-binary.scm (open-cache*): New macro.
  (guix-substitute-binary): Use it instead of (delay (open-cache ...)).
---
 guix/scripts/substitute-binary.scm |   15 ---
 1 files changed, 12 insertions(+), 3 deletions(-)

diff --git a/guix/scripts/substitute-binary.scm 
b/guix/scripts/substitute-binary.scm
index 09b917f..903564c 100755
--- a/guix/scripts/substitute-binary.scm
+++ b/guix/scripts/substitute-binary.scm
@@ -1,5 +1,5 @@
 ;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2013, 2014 Ludovic Courtès l...@gnu.org
+;;; Copyright © 2013, 2014, 2015 Ludovic Courtès l...@gnu.org
 ;;; Copyright © 2014 Nikita Karetnikov nik...@karetnikov.org
 ;;;
 ;;; This file is part of GNU Guix.
@@ -213,6 +213,15 @@ failure.
   (cut %make-cache url ...)
   '(StoreDir WantMassQuery)
 
+(define-syntax-rule (open-cache* url)
+  Delayed variant of 'open-cache' that also lets the user know that they're
+gonna have to wait.
+  (delay (begin
+   (format (current-error-port)
+   (_ updating list of substitutes from '~a'...~%)
+   url)
+   (open-cache url
+
 (define-record-type narinfo
   (%make-narinfo path uri uri-base compression file-hash file-size nar-hash 
nar-size
  references deriver system signature contents)
@@ -668,7 +677,7 @@ substituter disabled~%)
(with-error-handling   ; for signature errors
  (match args
((--query)
-(let ((cache (delay (open-cache %cache-url)))
+(let ((cache (open-cache* %cache-url))
   (acl   (current-acl)))
   (define (valid? obj)
 (and (narinfo? obj) (valid-narinfo? obj acl)))
@@ -719,7 +728,7 @@ substituter disabled~%)
   (loop (read-line)))
((--substitute store-path destination)
 ;; Download STORE-PATH and add store it as a Nar in file DESTINATION.
-(let* ((cache   (delay (open-cache %cache-url)))
+(let* ((cache   (open-cache* %cache-url))
(narinfo (lookup-narinfo cache store-path))
(uri (narinfo-uri narinfo)))
   ;; Make sure it is signed and everything.



branch master updated (6a07070 - 6987615)

2015-02-04 Thread Ludovic Courts
civodul pushed a change to branch master
in repository guix.

  from  6a07070   gnu: libffcall: Correct license field.
   new  3b9855f   build: Make 'chroot' a hard requirement.
   new  61bdd0d   gnu: wpa-supplicant: Use GnuTLS instead of OpenSSL.
   new  ffd74de   gnu: wpa-supplicant: Install man pages.
   new  996ed73   system: Add bindings to configure libc's NSS.
   new  4aee6e6   services: nscd-service: Add #:name-services parameter.
   new  6987615   gnu: nss-mdns: Allow the daemon's socket to be found.

The 6 revisions listed above as new are entirely new to this
repository and will be described in separate emails.  The revisions
listed as adds were already present in the repository and have only
been added to this reference.


Summary of changes:
 config-daemon.ac  |4 +
 doc/guix.texi |  130 -
 gnu-system.am |1 +
 gnu.scm   |3 +-
 gnu/packages/admin.scm|   32 ++-
 gnu/packages/avahi.scm|7 +-
 gnu/services/base.scm |   17 +++-
 gnu/system.scm|   10 +-
 gnu/system/nss.scm|  213 +
 nix/nix-daemon/guix-daemon.cc |   27 ++
 10 files changed, 410 insertions(+), 34 deletions(-)
 create mode 100644 gnu/system/nss.scm



04/06: system: Add bindings to configure libc's NSS.

2015-02-04 Thread Ludovic Courts
civodul pushed a commit to branch master
in repository guix.

commit 996ed73948e92eb2005a2a282856753d707f452c
Author: Ludovic Courtès l...@gnu.org
Date:   Wed Feb 4 21:58:15 2015 +0100

system: Add bindings to configure libc's NSS.

* gnu/system/nss.scm: New file.
* gnu-system.am (GNU_SYSTEM_MODULES): Add it.
* gnu.scm (%public-modules): Add it.
* gnu/system.scm (operating-system)[name-service-switch]: New field.
  (etc-directory): Add #:nss parameter and honor it.
  (operating-system-etc-directory): Adjust call accordingly.
* doc/guix.texi (operating-system Reference): Document
  'name-service-switch'.
  (Name Service Switch): New section.
---
 doc/guix.texi  |  116 
 gnu-system.am  |1 +
 gnu.scm|3 +-
 gnu/system.scm |   10 ++-
 gnu/system/nss.scm |  213 
 5 files changed, 338 insertions(+), 5 deletions(-)

diff --git a/doc/guix.texi b/doc/guix.texi
index fa3aa6d..e489d41 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -142,6 +142,7 @@ System Configuration
 * Locales:: Language and cultural convention settings.
 * Services::Specifying system services.
 * Setuid Programs:: Programs running with root privileges.
+* Name Service Switch:: Configuring libc's name service switch.
 * Initial RAM Disk::Linux-Libre bootstrapping.
 * GRUB Configuration::  Configuring the boot loader.
 * Invoking guix system::Instantiating a system configuration.
@@ -3642,6 +3643,7 @@ instance to support new system services.
 * Locales:: Language and cultural convention settings.
 * Services::Specifying system services.
 * Setuid Programs:: Programs running with root privileges.
+* Name Service Switch:: Configuring libc's name service switch.
 * Initial RAM Disk::Linux-Libre bootstrapping.
 * GRUB Configuration::  Configuring the boot loader.
 * Invoking guix system::Instantiating a system configuration.
@@ -3827,6 +3829,11 @@ Library Reference Manual}).  @xref{Locales}, for more 
information.
 The list of locale definitions to be compiled and that may be used at
 run time.  @xref{Locales}.
 
+@item @code{name-service-switch} (default: @var{%default-nss})
+Configuration of libc's name service switch (NSS)---a
+@code{name-service-switch} object.  @xref{Name Service Switch}, for
+details.
+
 @item @code{services} (default: @var{%base-services})
 A list of monadic values denoting system services.  @xref{Services}.
 
@@ -4648,6 +4655,115 @@ Under the hood, the actual setuid programs are created 
in the
 files in this directory refer to the ``real'' binaries, which are in the
 store.
 
+@node Name Service Switch
+@subsection Name Service Switch
+
+@cindex name service switch
+@cindex NSS
+The @code{(gnu system nss)} module provides bindings to the
+configuration file of libc's @dfn{name service switch} or @dfn{NSS}
+(@pxref{NSS Configuration File,,, libc, The GNU C Library Reference
+Manual}).  In a nutshell, the NSS is a mechanism that allows libc to be
+extended with new ``name'' lookup methods for system databases, which
+includes host names, service names, user accounts, and more (@pxref{Name
+Service Switch, System Databases and Name Service Switch,, libc, The GNU
+C Library Reference Manual}).
+
+The NSS configuration specifies, for each system database, which lookup
+method is to be used, and how the various methods are chained
+together---for instance, under which circumstances NSS should try the
+next method in the list.  The NSS configuration is given in the
+@code{name-service-switch} field of @code{operating-system} declarations
+(@pxref{operating-system Reference, @code{name-service-switch}}).
+
+@c See http://0pointer.de/lennart/projects/nss-mdns/.
+As an example, the declaration below configures the NSS to use the
+@code{nss-mdns} back-end for host name lookups:
+
+@example
+(name-service-switch
+   (hosts (list %files;first, check /etc/hosts
+
+;; If the above did not succeed, try
+;; with 'mdns_minimal'.
+(name-service
+  (name mdns_minimal)
+
+  ;; 'mdns_minimal' is authoritative for
+  ;; '.local'.  When it returns not found,
+  ;; no need to try the next methods.
+  (reaction (lookup-specification
+ (not-found = return
+
+;; Then fall back to DNS.
+(name-service
+  (name dns))
+
+;; Finally, try with the full 'mdns'.
+(name-service
+  (name mdns)
+@end example
+
+The reference for name service switch configuration is given below.  It
+is a direct mapping of the C library's configuration file format, so
+please refer to the C 

06/06: gnu: nss-mdns: Allow the daemon's socket to be found.

2015-02-04 Thread Ludovic Courts
civodul pushed a commit to branch master
in repository guix.

commit 698761587c218d6872976251f979c5440a65a8c6
Author: Ludovic Courtès l...@gnu.org
Date:   Wed Feb 4 22:43:35 2015 +0100

gnu: nss-mdns: Allow the daemon's socket to be found.

* gnu/packages/avahi.scm (nss-mdns)[arguments]: New field.
---
 gnu/packages/avahi.scm |7 ++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/gnu/packages/avahi.scm b/gnu/packages/avahi.scm
index 0c4f35e..cd87508 100644
--- a/gnu/packages/avahi.scm
+++ b/gnu/packages/avahi.scm
@@ -1,5 +1,5 @@
 ;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2013, 2014 Ludovic Courtès l...@gnu.org
+;;; Copyright © 2013, 2014, 2015 Ludovic Courtès l...@gnu.org
 ;;; Copyright © 2014 Mark H Weaver m...@netris.org
 ;;;
 ;;; This file is part of GNU Guix.
@@ -93,6 +93,11 @@ DNS-SD (for \DNS-Based Service Discovery\) protocols.)
 0vgs6j0qsl0mwzh5a0m0bykr7x6bx79vnbyn0r3q289rghp3qs0y))
   (file-name (string-append name - version .tar.gz
 (build-system gnu-build-system)
+(arguments
+ ;; The Avahi daemon socket is expected by src/Makefile.am to be at
+ ;; $(localstatedir)/run/avahi-daemon/socket, so set $(localstatedir)
+ ;; appropriately.
+ '(#:configure-flags '(--localstatedir=/)))
 
 ;; XXX: Stale URL, missing replacement.  See http://bugs.gnu.org/18704.
 (home-page http://0pointer.de/lennart/projects/nss-mdns/;)



02/06: gnu: wpa-supplicant: Use GnuTLS instead of OpenSSL.

2015-02-04 Thread Ludovic Courts
civodul pushed a commit to branch master
in repository guix.

commit 61bdd0d89f1e8851df890ce1f09c6969e2ee16fd
Author: Ludovic Courtès l...@gnu.org
Date:   Wed Feb 4 09:50:22 2015 +0100

gnu: wpa-supplicant: Use GnuTLS instead of OpenSSL.

* gnu/packages/admin.scm (wpa-supplicant)[arguments] configure phase:
  Set CONFIG_TLS.
  [inputs]: Add GNUTLS and LIBGCRYPT.
---
 gnu/packages/admin.scm |   10 --
 1 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm
index cadd3c4..aa1f8d1 100644
--- a/gnu/packages/admin.scm
+++ b/gnu/packages/admin.scm
@@ -1,5 +1,5 @@
 ;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2012, 2013, 2014 Ludovic Courtès l...@gnu.org
+;;; Copyright © 2012, 2013, 2014, 2015 Ludovic Courtès l...@gnu.org
 ;;; Copyright © 2013 Cyril Roelandt tipec...@gmail.com
 ;;; Copyright © 2014, 2015 Mark H Weaver m...@netris.org
 ;;; Copyright © 2014 Eric Bavier bav...@member.fsf.org
@@ -38,6 +38,8 @@
   #:use-module (gnu packages tcl)
   #:use-module ((gnu packages compression) #:prefix c:)
   #:use-module ((gnu packages openssl) #:prefix o:)
+  #:use-module (gnu packages gnutls)
+  #:use-module (gnu packages gnupg)
   #:use-module (gnu packages bison)
   #:use-module (gnu packages flex)
   #:use-module (gnu packages glib)
@@ -699,6 +701,9 @@ commands and their arguments.)
  (display 
   CONFIG_DEBUG_SYSLOG=y
 
+  # Choose GnuTLS (the default is OpenSSL.)
+  CONFIG_TLS=gnutls
+
   # TODO: Add a variant of this package with DBus support.
   #CONFIG_CTRL_IFACE_DBUS=y
   #CONFIG_CTRL_IFACE_DBUS_NEW=y
@@ -723,7 +728,8 @@ commands and their arguments.)
;; TODO: Add a variant with DBus support.  This significantly increases
;; the size of its closure since DBus depends on libx11.
;; (dbus ,dbus)
-   (openssl ,o:openssl)))
+   (gnutls ,gnutls)
+   (libgcrypt ,libgcrypt))) ;needed by crypto_gnutls.c
 (native-inputs
  `((pkg-config ,pkg-config)))
 (home-page http://w1.fi/wpa_supplicant/;)



04/08: tests: Add 'with-derivation-substitute' and use it.

2015-02-02 Thread Ludovic Courts
civodul pushed a commit to branch master
in repository guix.

commit e6c8839c180b88a9ef9e68af8acc3148099e286b
Author: Ludovic Courtès l...@gnu.org
Date:   Mon Feb 2 11:24:24 2015 +0100

tests: Add 'with-derivation-substitute' and use it.

* guix/tests.scm (%substitute-directory): New variable.
  (call-with-derivation-narinfo): Use it.
  (call-with-derivation-substitute): New procedure.
  (with-derivation-substitute): New macro.
* tests/store.scm (substitute): Use 'with-derivation-substitute'.
  (substitute, corrupt output hash): Likewise.
---
 .dir-locals.el  |2 +-
 guix/tests.scm  |   52 ++-
 tests/store.scm |   71 +-
 3 files changed, 74 insertions(+), 51 deletions(-)

diff --git a/.dir-locals.el b/.dir-locals.el
index 91d57b9..3c989d1 100644
--- a/.dir-locals.el
+++ b/.dir-locals.el
@@ -43,7 +43,7 @@
(eval . (put 'emacs-substitute-sexps 'scheme-indent-function 1))
(eval . (put 'emacs-substitute-variables 'scheme-indent-function 1))
(eval . (put 'with-derivation-narinfo 'scheme-indent-function 1))
-
+   (eval . (put 'with-derivation-substitute 'scheme-indent-function 1))
 
(eval . (put 'syntax-parameterize 'scheme-indent-function 1))
(eval . (put 'with-monad 'scheme-indent-function 1))
diff --git a/guix/tests.scm b/guix/tests.scm
index ed2ad45..451c1ba 100644
--- a/guix/tests.scm
+++ b/guix/tests.scm
@@ -21,6 +21,8 @@
   #:use-module (guix derivations)
   #:use-module (guix packages)
   #:use-module (guix base32)
+  #:use-module (guix serialization)
+  #:use-module (guix hash)
   #:use-module (gnu packages bootstrap)
   #:use-module (srfi srfi-34)
   #:use-module (rnrs bytevectors)
@@ -29,7 +31,9 @@
 random-text
 random-bytevector
 mock
+%substitute-directory
 with-derivation-narinfo
+with-derivation-substitute
 dummy-package))
 
 ;;; Commentary:
@@ -107,14 +111,18 @@ Deriver: ~a~%
   (basename
(derivation-file-name drv  ; Deriver
 
+(define %substitute-directory
+  (make-parameter
+   (and= (getenv GUIX_BINARY_SUBSTITUTE_URL)
+  (compose uri-path string-uri
+
 (define* (call-with-derivation-narinfo drv thunk
#:key (sha256 (make-bytevector 32 0)))
   Call THUNK in a context where fake substituter data, as read by 'guix
 substitute-binary', has been installed for DRV.  SHA256 is the hash of the
 expected output of DRV.
   (let* ((output  (derivation-output-path drv))
- (dir (uri-path
-   (string-uri (getenv GUIX_BINARY_SUBSTITUTE_URL
+ (dir (%substitute-directory))
  (info(string-append dir /nix-cache-info))
  (narinfo (string-append dir / (store-path-hash-part output)
  .narinfo)))
@@ -145,6 +153,45 @@ substituter's viewpoint.
(lambda ()
  body ...)
 
+(define* (call-with-derivation-substitute drv contents thunk
+  #:key sha256)
+  Call THUNK in a context where a substitute for DRV has been installed,
+using CONTENTS, a string, as its contents.  If SHA256 is true, use it as the
+expected hash of the substitute; otherwise use the hash of the nar containing
+CONTENTS.
+  (define dir (%substitute-directory))
+  (dynamic-wind
+(lambda ()
+  (call-with-output-file (string-append dir /example.out)
+(lambda (port)
+  (display contents port)))
+  (call-with-output-file (string-append dir /example.nar)
+(lambda (p)
+  (write-file (string-append dir /example.out) p
+(lambda ()
+  (let ((hash (call-with-input-file (string-append dir /example.nar)
+port-sha256)))
+;; Create fake substituter data, to be read by `substitute-binary'.
+(call-with-derivation-narinfo drv
+  thunk
+  #:sha256 (or sha256 hash
+(lambda ()
+  (delete-file (string-append dir /example.out))
+  (delete-file (string-append dir /example.nar)
+
+(define-syntax with-derivation-substitute
+  (syntax-rules (sha256 =)
+Evaluate BODY in a context where DRV is substitutable with the given
+CONTENTS.
+((_ drv contents (sha256 = hash) body ...)
+ (call-with-derivation-substitute drv contents
+   (lambda () body ...)
+   #:sha256 hash))
+((_ drv contents body ...)
+ (call-with-derivation-substitute drv contents
+   (lambda ()
+ body ...)
+
 (define-syntax-rule (dummy-package name* extra-fields ...)
   Return a \dummy\ package called NAME*, with all its compulsory fields
 initialized with default values, and with EXTRA-FIELDS set as specified.
@@ -156,6 +203,7 @@ initialized with default values, and with EXTRA-FIELDS set 
as specified.
 
 ;; Local Variables:
 ;; eval: (put 'call-with-derivation-narinfo 'scheme-indent-function 1)
+;; 

05/08: store: Add 'build-things'.

2015-02-02 Thread Ludovic Courts
civodul pushed a commit to branch master
in repository guix.

commit abac874b22532a17a868443dc1f883ed483b0604
Author: Ludovic Courtès l...@gnu.org
Date:   Mon Feb 2 12:25:34 2015 +0100

store: Add 'build-things'.

* guix/store.scm (operation-id): Rename 'build-derivations' to
  'build-things', as per Nix commit 1aba0bf0.
  (build-derivations): Rename to...
  (build-things): ... this.  Keep 'build-derivations' as an alias.
  (build): New procedure.
* tests/store.scm (build-things with output path,
  substitute + build-things with output path): New tests.
---
 guix/store.scm  |   17 ++---
 tests/store.scm |   37 +
 2 files changed, 51 insertions(+), 3 deletions(-)

diff --git a/guix/store.scm b/guix/store.scm
index a12abc8..5618fa3 100644
--- a/guix/store.scm
+++ b/guix/store.scm
@@ -62,6 +62,8 @@
 hash-part-path
 add-text-to-store
 add-to-store
+build-things
+build
 build-derivations
 add-temp-root
 add-indirect-root
@@ -140,7 +142,7 @@
   (query-referrers 6)
   (add-to-store 7)
   (add-text-to-store 8)
-  (build-derivations 9)
+  (build-things 9)
   (ensure-path 10)
   (add-temp-root 11)
   (add-indirect-root 12)
@@ -573,11 +575,16 @@ kept.  HASH-ALGO must be a string such as \sha256\.
   (hash-set! cache args path)
   path))
 
-(define-operation (build-derivations (string-list derivations))
-  Build DERIVATIONS, and return when the worker is done building them.
+(define-operation (build-things (string-list things))
+  Build THINGS, a list of store items which may be either '.drv' files or
+outputs, and return when the worker is done building them.  Elements of THINGS
+that are not derivations can only be substituted and not built locally.
 Return #t on success.
   boolean)
 
+;; Deprecated name for 'build-things'.
+(define build-derivations build-things)
+
 (define-operation (add-temp-root (store-path path))
   Make PATH a temporary root for the duration of the current session.
 Return #t.
@@ -907,6 +914,10 @@ permission bits are kept.
   recursive? sha256 file)
 store)))
 
+(define build
+  ;; Monadic variant of 'build-things'.
+  (store-lift build-things))
+
 (define %guile-for-build
   ;; The derivation of the Guile to be used within the build environment,
   ;; when using 'gexp-derivation' and co.
diff --git a/tests/store.scm b/tests/store.scm
index 73d64e4..db7299f 100644
--- a/tests/store.scm
+++ b/tests/store.scm
@@ -306,6 +306,24 @@
(null? (substitutable-paths s o))
(null? (substitutable-path-info s o))
 
+(test-assert build-things with output path
+  (with-store s
+(let* ((c   (random-text));contents of the output
+   (d   (build-expression-derivation
+ s substitute-me
+ `(call-with-output-file %output
+(lambda (p)
+  (display ,c p)))
+ #:guile-for-build
+ (package-derivation s %bootstrap-guile (%current-system
+   (o   (derivation-output-path d)))
+  (set-build-options s #:use-substitutes? #f)
+
+  ;; Pass 'build-things' the output file name, O.  However, since there
+  ;; are no substitutes for O, it will just do nothing.
+  (build-things s (list o))
+  (not (valid-path? s o)
+
 (test-skip (if (getenv GUIX_BINARY_SUBSTITUTE_URL) 0 1))
 
 (test-assert substitute query
@@ -350,6 +368,25 @@
  (build-derivations s (list d))
  (equal? c (call-with-input-file o get-string-all)))
 
+(test-assert substitute + build-things with output path
+  (with-store s
+(let* ((c   (random-text));contents of the output
+   (d   (build-expression-derivation
+ s substitute-me
+ `(call-with-output-file %output
+(lambda (p)
+  (exit 1);would actually fail
+  (display ,c p)))
+ #:guile-for-build
+ (package-derivation s %bootstrap-guile (%current-system
+   (o   (derivation-output-path d)))
+  (with-derivation-substitute d c
+(set-build-options s #:use-substitutes? #t)
+(and (has-substitutes? s o)
+ (build-things s (list o));give the output path
+ (valid-path? s o)
+ (equal? c (call-with-input-file o get-string-all)))
+
 (test-assert substitute, corrupt output hash
   ;; Tweak the substituter into installing a substitute whose hash doesn't
   ;; match the one announced in the narinfo.  The daemon must notice this and



06/08: tests: Don't dump the list of dead items in the test log.

2015-02-02 Thread Ludovic Courts
civodul pushed a commit to branch master
in repository guix.

commit 5f1f10c59d2b1bdc02f83abe9610d5ee77a83be2
Author: Ludovic Courtès l...@gnu.org
Date:   Mon Feb 2 12:29:12 2015 +0100

tests: Don't dump the list of dead items in the test log.

* tests/store.scm (dead-paths): Wrap result in '-bool'.
---
 tests/store.scm |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/tests/store.scm b/tests/store.scm
index db7299f..ee783be 100644
--- a/tests/store.scm
+++ b/tests/store.scm
@@ -119,7 +119,7 @@
 
 (test-assert dead-paths
   (let ((p (add-text-to-store %store random-text (random-text
-(member p (dead-paths %store
+(-bool (member p (dead-paths %store)
 
 ;; FIXME: Find a test for `live-paths'.
 ;;



01/08: Add Deck to 'AUTHORS'.

2015-02-02 Thread Ludovic Courts
civodul pushed a commit to branch master
in repository guix.

commit 1af50c224d7d8febad0cf34b67d0ffd6c2dff638
Author: Ludovic Courtès l...@gnu.org
Date:   Sun Feb 1 23:14:14 2015 +0100

Add Deck to 'AUTHORS'.
---
 AUTHORS |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/AUTHORS b/AUTHORS
index 845683f..c156186 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -23,6 +23,7 @@ alphabetical order):
  Nikita Karetnikov nik...@karetnikov.org
  Julien Lepiller jul...@lepiller.eu
 Aljosha Papsch m...@rpapsch.de
+   Deck Pickard deck.r.pick...@gmail.com
 Manolis Ragkousis manolis...@gmail.com
   Cyril Roelandt tipec...@gmail.com
Alex Sassmannshausen alex.sassmannshau...@gmail.com



03/08: tests: Further factorize substitute mocks.

2015-02-02 Thread Ludovic Courts
civodul pushed a commit to branch master
in repository guix.

commit 6eebbab5624f213a298afb1baed28cec026b2727
Author: Ludovic Courtès l...@gnu.org
Date:   Mon Feb 2 10:37:23 2015 +0100

tests: Further factorize substitute mocks.

* guix/tests.scm (derivation-narinfo): Turn 'nar' into a keyword
  parameter.  Add #:sha256 parameter, and honor it.
  (call-with-derivation-narinfo): Add #:sha256 and pass it to
  'derivation-narinfo'.
  (with-derivation-narinfo): Extend with support for (sha256 = value).
* tests/store.scm (substitute query): Use 'with-derivation-narinfo'.
  (substitute): Likewise.
  (substitute, corrupt output hash): Likewise.
  (substitute --fallback): Likewise.
* tests/derivations.scm: Remove Emacs local variable.
---
 .dir-locals.el|2 +
 guix/tests.scm|   35 +---
 tests/derivations.scm |4 -
 tests/store.scm   |  235 +
 4 files changed, 105 insertions(+), 171 deletions(-)

diff --git a/.dir-locals.el b/.dir-locals.el
index b82d049..91d57b9 100644
--- a/.dir-locals.el
+++ b/.dir-locals.el
@@ -42,6 +42,8 @@
(eval . (put 'emacs-batch-edit-file 'scheme-indent-function 1))
(eval . (put 'emacs-substitute-sexps 'scheme-indent-function 1))
(eval . (put 'emacs-substitute-variables 'scheme-indent-function 1))
+   (eval . (put 'with-derivation-narinfo 'scheme-indent-function 1))
+
 
(eval . (put 'syntax-parameterize 'scheme-indent-function 1))
(eval . (put 'with-monad 'scheme-indent-function 1))
diff --git a/guix/tests.scm b/guix/tests.scm
index 36341cb..ed2ad45 100644
--- a/guix/tests.scm
+++ b/guix/tests.scm
@@ -1,5 +1,5 @@
 ;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2013, 2014 Ludovic Courtès l...@gnu.org
+;;; Copyright © 2013, 2014, 2015 Ludovic Courtès l...@gnu.org
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -20,6 +20,7 @@
   #:use-module (guix store)
   #:use-module (guix derivations)
   #:use-module (guix packages)
+  #:use-module (guix base32)
   #:use-module (gnu packages bootstrap)
   #:use-module (srfi srfi-34)
   #:use-module (rnrs bytevectors)
@@ -86,25 +87,31 @@ given by REPLACEMENT.
 ;;; Narinfo files, as used by the substituter.
 ;;;
 
-(define* (derivation-narinfo drv #:optional (nar example.nar))
+(define* (derivation-narinfo drv #:key (nar example.nar)
+ (sha256 (make-bytevector 32 0)))
   Return the contents of the narinfo corresponding to DRV; NAR should be the
-file name of the archive containing the substitute for DRV.
+file name of the archive containing the substitute for DRV, and SHA256 is the
+expected hash.
   (format #f StorePath: ~a
 URL: ~a
 Compression: none
 NarSize: 1234
+NarHash: sha256:~a
 References: 
 System: ~a
 Deriver: ~a~%
   (derivation-output-path drv)   ; StorePath
   nar ; URL
+  (bytevector-nix-base32-string sha256)  ; NarHash
   (derivation-system drv) ; System
   (basename
(derivation-file-name drv  ; Deriver
 
-(define (call-with-derivation-narinfo drv thunk)
+(define* (call-with-derivation-narinfo drv thunk
+   #:key (sha256 (make-bytevector 32 0)))
   Call THUNK in a context where fake substituter data, as read by 'guix
-substitute-binary', has been installed for DRV.
+substitute-binary', has been installed for DRV.  SHA256 is the hash of the
+expected output of DRV.
   (let* ((output  (derivation-output-path drv))
  (dir (uri-path
(string-uri (getenv GUIX_BINARY_SUBSTITUTE_URL
@@ -119,18 +126,24 @@ substitute-binary', has been installed for DRV.
 (%store-prefix
 (call-with-output-file narinfo
   (lambda (p)
-(display (derivation-narinfo drv) p
+(display (derivation-narinfo drv #:sha256 sha256) p
   thunk
   (lambda ()
 (delete-file narinfo)
 (delete-file info)
 
-(define-syntax-rule (with-derivation-narinfo drv body ...)
-  Evaluate BODY in a context where DRV looks substitutable from the
+(define-syntax with-derivation-narinfo
+  (syntax-rules (sha256 =)
+Evaluate BODY in a context where DRV looks substitutable from the
 substituter's viewpoint.
-  (call-with-derivation-narinfo drv
-(lambda ()
-  body ...)))
+((_ drv (sha256 = hash) body ...)
+ (call-with-derivation-narinfo drv
+   (lambda () body ...)
+   #:sha256 hash))
+((_ drv body ...)
+ (call-with-derivation-narinfo drv
+   (lambda ()
+ body ...)
 
 (define-syntax-rule (dummy-package name* extra-fields ...)
   Return a \dummy\ package called NAME*, with all its compulsory fields
diff --git a/tests/derivations.scm b/tests/derivations.scm
index 8e592ab..80aabad 100644
--- a/tests/derivations.scm
+++ b/tests/derivations.scm
@@ -916,7 +916,3 @@
 
 
 (exit (= 

04/04: offload: Better report failure to create the GC root directory.

2015-02-05 Thread Ludovic Courts
civodul pushed a commit to branch master
in repository guix.

commit 353e34a626a43f2fc4e278373b90b9e43a45082f
Author: Ludovic Courtès l...@gnu.org
Date:   Thu Feb 5 23:36:23 2015 +0100

offload: Better report failure to create the GC root directory.

Suggested by Ricardo Wurmus ricardo.wur...@mdc-berlin.de.

* guix/scripts/offload.scm (register-gc-root)[script]: Replace
  'false-if-exception' with a finer-grain 'system-error handler.
  Provide the name of MACHINE in 'leave' error message.
---
 guix/scripts/offload.scm |   11 +--
 1 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/guix/scripts/offload.scm b/guix/scripts/offload.scm
index e494500..e651257 100644
--- a/guix/scripts/offload.scm
+++ b/guix/scripts/offload.scm
@@ -310,7 +310,14 @@ hook.
;; directory.
(let ((root-directory (string-append %state-directory
 /gcroots/tmp)))
- (false-if-exception (mkdir root-directory))
+ (catch 'system-error
+   (lambda ()
+ (mkdir root-directory))
+   (lambda args
+ (unless (= EEXIST (system-error-errno args))
+   (error failed to create remote GC root directory
+  root-directory (system-error-errno args)
+
  (catch 'system-error
(lambda ()
  (symlink ,file
@@ -331,7 +338,7 @@ hook.
 ;; Better be safe than sorry: if we ignore the error here, then FILE
 ;; may be GC'd just before we start using it.
 (leave (_ failed to register GC root for '~a' on '~a' (status: ~a)~%)
-   file machine status)
+   file (build-machine-name machine) status)
 
 (define (remove-gc-roots machine)
   Remove from MACHINE the GC roots previously installed with



01/04: nls: Update 'eo' translation.

2015-02-05 Thread Ludovic Courts
civodul pushed a commit to branch master
in repository guix.

commit bf26b8ddabbc357c55af5140bb0522fd46afbd54
Author: Ludovic Courtès l...@gnu.org
Date:   Thu Feb 5 13:27:05 2015 +0100

nls: Update 'eo' translation.
---
 po/guix/eo.po |  536 +++-
 po/packages/eo.po | 1211 ++---
 2 files changed, 1399 insertions(+), 348 deletions(-)

diff --git a/po/guix/eo.po b/po/guix/eo.po
index ee57c65..4af0a64 100644
--- a/po/guix/eo.po
+++ b/po/guix/eo.po
@@ -1,14 +1,14 @@
 # Esperanto messages for GNU Guix
-# Copyright (C) 2013, 2014 Free Software Foundation, Inc.
+# Copyright (C) 2013, 2014, 2015 Free Software Foundation, Inc.
 # This file is distributed under the same license as the guix package.
-# Felipe Castro fef...@gmail.com, 2013, 2014.
+# Felipe Castro fef...@gmail.com, 2013, 2014, 2015.
 #
 msgid 
 msgstr 
-Project-Id-Version: guix 0.8\n
+Project-Id-Version: guix 0.8.1\n
 Report-Msgid-Bugs-To: l...@gnu.org\n
-POT-Creation-Date: 2014-11-09 22:32+0100\n
-PO-Revision-Date: 2014-12-07 16:05-0300\n
+POT-Creation-Date: 2015-01-26 23:51+0100\n
+PO-Revision-Date: 2015-01-29 11:18-0300\n
 Last-Translator: Felipe Castro fef...@gmail.com\n
 Language-Team: Esperanto translation-team...@lists.sourceforge.net\n
 Language: eo\n
@@ -18,41 +18,55 @@ msgstr 
 X-Generator: Poedit 1.6.10\n
 Plural-Forms: nplurals=2; plural=(n != 1);\n
 
-#: gnu/packages.scm:120
+#: gnu/packages.scm:78
+#, scheme-format
+msgid ~a: patch not found
+msgstr ~a: flikaĵo ne trovita
+
+#: gnu/packages.scm:89
+#, scheme-format
+msgid could not find bootstrap binary '~a' for system '~a'
+msgstr ne eblis trovi ekŝargilan ciferec-dosieron '~a' por la sistemo '~a'
+
+#: gnu/packages.scm:141
 #, scheme-format
 msgid cannot access `~a': ~a~%
 msgstr ne eblas atingi '~a': ~a~%
 
-#: gnu/packages.scm:350
+#: gnu/packages.scm:372
 #, scheme-format
 msgid looking for the latest release of GNU ~a...
 msgstr ni serĉas la lastan eldonon de GNU ~a...
 
-#: gnu/packages.scm:354
+#: gnu/packages.scm:379
 #, scheme-format
 msgid ~a: note: using ~a but ~a is available upstream~%
 msgstr ~a: rimarko: ni uzas ~a sed ~a disponeblas unuanivele~%
 
-#: gnu/packages.scm:376 guix/scripts/package.scm:305
+#: gnu/packages.scm:401 guix/scripts/package.scm:306
 #, scheme-format
 msgid ambiguous package specification `~a'~%
 msgstr plursenca pak-specifigo '~a'~%
 
-#: gnu/packages.scm:377 guix/scripts/package.scm:307
+#: gnu/packages.scm:402 guix/scripts/package.scm:308
 #, scheme-format
 msgid choosing ~a from ~a~%
 msgstr ni elektas ~a el ~a~%
 
-#: gnu/packages.scm:383
+#: gnu/packages.scm:408
 #, scheme-format
 msgid ~A: package not found for version ~a~%
 msgstr ~A: pako ne trovita por versio ~a~%
 
-#: gnu/packages.scm:385
+#: gnu/packages.scm:410
 #, scheme-format
 msgid ~A: unknown package~%
 msgstr ~A: nekonata pako~%
 
+#: gnu/system.scm:716
+msgid system locale lacks a definition
+msgstr sistema lokaĵaro malhavas difinon
+
 #: guix/scripts/build.scm:65
 #, scheme-format
 msgid failed to create GC root `~a': ~a~%
@@ -96,7 +110,7 @@ msgid 
   --no-substitutes   build instead of resorting to pre-built substitutes
 msgstr 
 \n
-  --no-substitutes   konstrui anstataŭ provi jam-konstruitajn 
anstataŭigantojn
+  --no-substitutes   konstrui anstataŭ uzi jam-konstruitajn 
anstataŭigantojn
 
 #: guix/scripts/build.scm:112
 msgid 
@@ -140,12 +154,20 @@ msgstr 
 \n
   -c, --cores=N  permesigi uzon de ĝis N CPU-nukleojn por la konstruo
 
-#: guix/scripts/build.scm:195
+#: guix/scripts/build.scm:123
+msgid 
+\n
+  -M, --max-jobs=N   allow at most N build jobs
+msgstr 
+\n
+  -M, --max-jobs=N   permesi maksimume N konstru-taskojn
+
+#: guix/scripts/build.scm:198 guix/scripts/build.scm:205
 #, scheme-format
-msgid ~a: not a number~%
-msgstr ~a: ne estas numero~%
+msgid not a number: '~a' option argument: ~a~%
+msgstr ne estas numero: '~a' modifil-argumento: ~a~%
 
-#: guix/scripts/build.scm:213
+#: guix/scripts/build.scm:224
 msgid 
 Usage: guix build [OPTION]... PACKAGE-OR-DERIVATION...\n
 Build the given PACKAGE-OR-DERIVATION and return their output paths.\n
@@ -153,7 +175,7 @@ msgstr 
 Uzado: guix build [MODIFILO]... PAKO-AŬ-DERIVAĴO...\n
 Konstrui la indikitan PAKO-AŬ-DERIVAĴOn kaj montri iliajn eligajn vojojn.\n
 
-#: guix/scripts/build.scm:215
+#: guix/scripts/build.scm:226
 msgid 
 \n
   -e, --expression=EXPR  build the package or derivation EXPR evaluates to
@@ -161,7 +183,7 @@ msgstr 
 \n
   -e, --expression=ESPR  konstrui la pakon aŭ derivaĵon kiu rezultas de ESPR
 
-#: guix/scripts/build.scm:217
+#: guix/scripts/build.scm:228
 msgid 
 \n
   -S, --source   build the packages' source derivations
@@ -169,7 +191,7 @@ msgstr 
 \n
   -S, --source   konstrui la font-derivaĵojn de la pakoj
 
-#: guix/scripts/build.scm:219
+#: guix/scripts/build.scm:230
 msgid 
 \n
   -s, --system=SYSTEMattempt to build for SYSTEM--e.g., \i686-linux\
@@ -177,7 +199,7 @@ msgstr 

branch master updated (aa7c7f2 - 353e34a)

2015-02-05 Thread Ludovic Courts
civodul pushed a change to branch master
in repository guix.

  from  aa7c7f2   gnu: gnutls: Configure location of system-wide trust 
store.
   new  bf26b8d   nls: Update 'eo' translation.
   new  fc61b64   offload: Warn about SSH client issues.
   new  7d157c6   gnu: groff: Add doc output.
   new  353e34a   offload: Better report failure to create the GC root 
directory.

The 4 revisions listed above as new are entirely new to this
repository and will be described in separate emails.  The revisions
listed as adds were already present in the repository and have only
been added to this reference.


Summary of changes:
 gnu/packages/groff.scm   |2 +
 guix/scripts/offload.scm |   52 ++-
 po/guix/eo.po|  536 +
 po/packages/eo.po| 1211 --
 4 files changed, 1430 insertions(+), 371 deletions(-)



02/04: offload: Warn about SSH client issues.

2015-02-05 Thread Ludovic Courts
civodul pushed a commit to branch master
in repository guix.

commit fc61b641c28db1fc70da798fb6dcedb853b1ad1a
Author: Ludovic Courtès l...@gnu.org
Date:   Thu Feb 5 22:16:59 2015 +0100

offload: Warn about SSH client issues.

Suggested by Ricardo Wurmus ricardo.wur...@mdc-berlin.de.

* guix/scripts/offload.scm (remote-pipe): Remove unneeded 'catch'.
  (machine-load): Check the exit value  upon (close-pipe pipe).  Call
  'warning' when it is non-zero.
---
 guix/scripts/offload.scm |   41 -
 1 files changed, 20 insertions(+), 21 deletions(-)

diff --git a/guix/scripts/offload.scm b/guix/scripts/offload.scm
index be233d9..e494500 100644
--- a/guix/scripts/offload.scm
+++ b/guix/scripts/offload.scm
@@ -1,5 +1,5 @@
 ;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2014 Ludovic Courtès l...@gnu.org
+;;; Copyright © 2014, 2015 Ludovic Courtès l...@gnu.org
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -191,25 +191,19 @@ not be started.
   (lambda ()
 (write str
 
-  (catch 'system-error
-(lambda ()
-  ;; Let the child inherit ERROR-PORT.
-  (with-error-to-port error-port
-(apply open-pipe* mode %lshg-command
-   -l (build-machine-user machine)
-   -p (number-string (build-machine-port machine))
+  ;; Let the child inherit ERROR-PORT.
+  (with-error-to-port error-port
+(apply open-pipe* mode %lshg-command
+   -l (build-machine-user machine)
+   -p (number-string (build-machine-port machine))
 
-   ;; XXX: Remove '-i' when %LSHG-COMMAND really is lshg.
-   -i (build-machine-private-key machine)
+   ;; XXX: Remove '-i' when %LSHG-COMMAND really is lshg.
+   -i (build-machine-private-key machine)
 
-   (build-machine-name machine)
-   (if quote?
-   (map shell-quote command)
-   command
-(lambda args
-  (warning (_ failed to execute '~a': ~a~%)
-   %lshg-command (strerror (system-error-errno args)))
-  #f)))
+   (build-machine-name machine)
+   (if quote?
+   (map shell-quote command)
+   command
 
 
 ;;;
@@ -533,9 +527,14 @@ success, #f otherwise.
 (define (machine-load machine)
   Return the load of MACHINE, divided by the number of parallel builds
 allowed on MACHINE.
-  (let* ((pipe (remote-pipe machine OPEN_READ `(cat /proc/loadavg)))
- (line (read-line pipe)))
-(close-pipe pipe)
+  (let* ((pipe   (remote-pipe machine OPEN_READ `(cat /proc/loadavg)))
+ (line   (read-line pipe))
+ (status (close-pipe pipe)))
+(unless (eqv? 0 (status:exit-val status))
+  (warning (_ failed to obtain load of '~a': SSH client exited with ~a~%)
+   (build-machine-name machine)
+   (status:exit-val status)))
+
 (if (eof-object? line)
 +inf.0;MACHINE does not respond, so assume it is infinitely loaded
 (match (string-tokenize line)



03/04: gnu: groff: Add doc output.

2015-02-05 Thread Ludovic Courts
civodul pushed a commit to branch master
in repository guix.

commit 7d157c652cf90459dcce51c2c98985683e5359c4
Author: Ludovic Courtès l...@gnu.org
Date:   Thu Feb 5 23:02:40 2015 +0100

gnu: groff: Add doc output.

* gnu/packages/groff.scm (groff): Add 'outputs' field.
---
 gnu/packages/groff.scm |2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/gnu/packages/groff.scm b/gnu/packages/groff.scm
index e7a0026..93d0380 100644
--- a/gnu/packages/groff.scm
+++ b/gnu/packages/groff.scm
@@ -40,6 +40,8 @@
 (sha256 (base32
  1998v2kcs288d3y7kfxpvl369nqi06zbbvjzafyvyl3pr7bajj1s
(build-system gnu-build-system)
+   (outputs '(out
+  doc));12MiB of PS, PDF, HTML, and examples
(inputs `((ghostscript ,ghostscript)
  (netpbm ,netpbm)))
(native-inputs `((bison ,bison)



01/04: gnu: xf86-video-nv: Improve description.

2015-02-06 Thread Ludovic Courts
civodul pushed a commit to branch master
in repository guix.

commit 2e50aa760ce4edb208137f2c785d426752a5aeb4
Author: Ludovic Courtès l...@gnu.org
Date:   Fri Feb 6 09:56:09 2015 +0100

gnu: xf86-video-nv: Improve description.

* gnu/packages/xorg.scm (xf86-video-nv): Adjust synopsis and
  description.
---
 gnu/packages/xorg.scm |9 +++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/xorg.scm b/gnu/packages/xorg.scm
index 224adf8..5381dd0 100644
--- a/gnu/packages/xorg.scm
+++ b/gnu/packages/xorg.scm
@@ -2766,8 +2766,13 @@ kernel mode setting (KMS).)
 (inputs `((xorg-server ,xorg-server)))
 (native-inputs `((pkg-config ,pkg-config)))
 (home-page http://www.x.org/wiki/;)
-(synopsis Xorg implementation of the X Window System)
-(description X.org provides an implementation of the X Window System)
+(synopsis NVIDIA video driver for the Xorg X server)
+(description
+ This package contains Xorg support for the NVIDIA GeForce 8 series of
+graphics processors.
+
+There are a few caveats of which to be aware: the XVideo extension is not
+supported, and the RENDER extension is not accelerated by this driver.)
 (license license:x11)))
 
 



branch master updated (ce4a347 - 3f11f01)

2015-02-06 Thread Ludovic Courts
civodul pushed a change to branch master
in repository guix.

  from  ce4a347   gnu: orc: Disable the 'test-limits' and 
'exec_opcodes_sys' tests.
   new  2e50aa7   gnu: xf86-video-nv: Improve description.
   new  0d5212e   gnu: Add xf86-video-nouveau.
   new  ca63770   services: xorg: Add Nouveau driver.
   new  3f11f01   gnu: patch: Add 2.7.4 and make it a replacement for the 
default one.

The 4 revisions listed above as new are entirely new to this
repository and will be described in separate emails.  The revisions
listed as adds were already present in the repository and have only
been added to this reference.


Summary of changes:
 gnu/packages/base.scm |   21 -
 gnu/packages/xorg.scm |   43 +--
 gnu/services/xorg.scm |1 +
 3 files changed, 62 insertions(+), 3 deletions(-)



03/04: services: xorg: Add Nouveau driver.

2015-02-06 Thread Ludovic Courts
civodul pushed a commit to branch master
in repository guix.

commit ca63770ab1de0ae8723a560a87cc73c98b0d22ff
Author: Ludovic Courtès l...@gnu.org
Date:   Fri Feb 6 13:52:48 2015 +0100

services: xorg: Add Nouveau driver.

* gnu/services/xorg.scm (xorg-start-command)[xserver.conf]: Add
  XF86-VIDEO-NOUVEAU.
---
 gnu/services/xorg.scm |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/gnu/services/xorg.scm b/gnu/services/xorg.scm
index 46098da..7cb9012 100644
--- a/gnu/services/xorg.scm
+++ b/gnu/services/xorg.scm
@@ -104,6 +104,7 @@ Section \Files\
   ModulePath \ xf86-video-cirrus /lib/xorg/modules/drivers\
   ModulePath \ xf86-video-intel /lib/xorg/modules/drivers\
   ModulePath \ xf86-video-mach64 /lib/xorg/modules/drivers\
+  ModulePath \ xf86-video-nouveau /lib/xorg/modules/drivers\
   ModulePath \ xf86-video-nv /lib/xorg/modules/drivers\
   ModulePath \ xf86-video-sis /lib/xorg/modules/drivers\
   ModulePath \ xf86-input-evdev /lib/xorg/modules/input\



04/04: gnu: patch: Add 2.7.4 and make it a replacement for the default one.

2015-02-06 Thread Ludovic Courts
civodul pushed a commit to branch master
in repository guix.

commit 3f11f01fa88f2fbdf46e05117b82909b1b224d28
Author: Ludovic Courtès l...@gnu.org
Date:   Fri Feb 6 13:48:57 2015 +0100

gnu: patch: Add 2.7.4 and make it a replacement for the default one.

* gnu/packages/base.scm (patch-2.7.4, patch-CVE-2015-1196): New
  variables.
  (patch): Add 'replacement' field.
---
 gnu/packages/base.scm |   21 -
 1 files changed, 20 insertions(+), 1 deletions(-)

diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm
index 1f479cc..be33cb2 100644
--- a/gnu/packages/base.scm
+++ b/gnu/packages/base.scm
@@ -1,5 +1,5 @@
 ;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2012, 2013, 2014 Ludovic Courtès l...@gnu.org
+;;; Copyright © 2012, 2013, 2014, 2015 Ludovic Courtès l...@gnu.org
 ;;; Copyright © 2014 Andreas Enge andr...@enge.fr
 ;;; Copyright © 2012 Nikita Karetnikov nik...@karetnikov.org
 ;;; Copyright © 2014 Mark H Weaver m...@netris.org
@@ -167,8 +167,27 @@ files depending on the contents of the diff file.  It 
accepts several
 different diff formats.  It may also be used to revert previously applied
 differences.)
(license gpl3+)
+   (replacement patch-CVE-2015-1196)
(home-page http://savannah.gnu.org/projects/patch/;)))
 
+(define-public patch-2.7.4
+  (package
+(inherit patch)
+(version 2.7.4)
+(source (origin
+  (method url-fetch)
+  (uri (string-append mirror://gnu/patch/patch-
+  version .tar.xz))
+  (sha256
+   (base32
+02gikxjvcxysr4l65c8vivgz62xmalp0av5ypzff8vqhrq3vpb0f
+(replacement #f)))
+
+(define patch-CVE-2015-1196
+  (package (inherit patch-2.7.4)
+;; Keep the old version number so it can be used as a 'replacement'.
+(version (package-version patch
+
 (define-public diffutils
   (package
(name diffutils)



02/04: gnu: Add xf86-video-nouveau.

2015-02-06 Thread Ludovic Courts
civodul pushed a commit to branch master
in repository guix.

commit 0d5212e8220d1121a8d084e6bc10a35c7efd57d7
Author: Ludovic Courtès l...@gnu.org
Date:   Fri Feb 6 13:43:03 2015 +0100

gnu: Add xf86-video-nouveau.

* gnu/packages/xorg.scm (xf86-video-nouveau): New variable.
---
 gnu/packages/xorg.scm |   34 ++
 1 files changed, 34 insertions(+), 0 deletions(-)

diff --git a/gnu/packages/xorg.scm b/gnu/packages/xorg.scm
index 5381dd0..10801fe 100644
--- a/gnu/packages/xorg.scm
+++ b/gnu/packages/xorg.scm
@@ -2,6 +2,7 @@
 ;;; Copyright © 2013, 2014 Andreas Enge andr...@enge.fr
 ;;; Copyright © 2014, 2015 Mark H Weaver m...@netris.org
 ;;; Copyright © 2014 Eric Bavier bav...@member.fsf.org
+;;; Copyright © 2015 Ludovic Courtès l...@gnu.org
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -22,9 +23,11 @@
   #:use-module ((guix licenses) #:prefix license:)
   #:use-module (guix packages)
   #:use-module (guix download)
+  #:use-module (guix git-download)
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system perl)
   #:use-module (gnu packages)
+  #:use-module (gnu packages autotools)
   #:use-module (gnu packages bison)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages flex)
@@ -2775,6 +2778,37 @@ There are a few caveats of which to be aware: the XVideo 
extension is not
 supported, and the RENDER extension is not accelerated by this driver.)
 (license license:x11)))
 
+(define-public xf86-video-nouveau
+  (package
+(name xf86-video-nouveau)
+(version 1.0.11)
+(source (origin
+  ;; There are no tarball releases of Nouveau.
+  (method git-fetch)
+  (uri (git-reference
+(url 
git://anongit.freedesktop.org/nouveau/xf86-video-nouveau)
+(commit (string-append name - version
+  (sha256
+   (base32
+0zdb6b0n7pzf3l8j8hl7gfshg8jsmcmk11isvvl542yc36162ahp
+(build-system gnu-build-system)
+(arguments
+ '(#:phases (alist-cons-after
+ 'unpack 'bootstrap
+ (lambda _
+   (zero? (system* autoreconf -vi)))
+ %standard-phases)))
+(inputs `((xorg-server ,xorg-server)))
+(native-inputs `((pkg-config ,pkg-config)
+ (autoconf ,(autoconf-wrapper))
+ (automake ,automake)
+ (libtool ,libtool)))
+(home-page http://nouveau.freedesktop.org;)
+(synopsis NVIDIA video driver for the Xorg X server)
+(description
+ This package provides modern, high-quality Xorg drivers for NVIDIA
+graphics cards.)
+(license license:x11)))
 
 (define-public xf86-video-openchrome
   (package



04/04: tests: Disable grafts when comparing derivations.

2015-02-06 Thread Ludovic Courts
civodul pushed a commit to branch master
in repository guix.

commit 862abf8fcd8bcd9fb18f3f570b41ecaccfda43a1
Author: Ludovic Courtès l...@gnu.org
Date:   Fri Feb 6 18:04:19 2015 +0100

tests: Disable grafts when comparing derivations.

Fixes a regression introduced with the grafting of Patch in 3f11f01.

* tests/packages.scm (reference to non-existent output): Wrap in
  'parameterize'.
---
 tests/packages.scm |   17 +
 1 files changed, 9 insertions(+), 8 deletions(-)

diff --git a/tests/packages.scm b/tests/packages.scm
index 65e5cc3..851520b 100644
--- a/tests/packages.scm
+++ b/tests/packages.scm
@@ -270,14 +270,15 @@
 
 (test-assert reference to non-existent output
   ;; See http://bugs.gnu.org/19630.
-  (let* ((dep (dummy-package dep))
- (p   (dummy-package p
-(inputs `((dep ,dep non-existent))
-(guard (c ((derivation-missing-output-error? c)
-   (and (string=? (derivation-missing-output c) non-existent)
-(equal? (package-derivation %store dep)
-(derivation-error-derivation c)
-  (package-derivation %store p
+  (parameterize ((%graft? #f))
+(let* ((dep (dummy-package dep))
+   (p   (dummy-package p
+  (inputs `((dep ,dep non-existent))
+  (guard (c ((derivation-missing-output-error? c)
+ (and (string=? (derivation-missing-output c) non-existent)
+  (equal? (package-derivation %store dep)
+  (derivation-error-derivation c)
+(package-derivation %store p)
 
 (test-assert trivial
   (let* ((p (package (inherit (dummy-package trivial))



02/04: pull: Always install the ~/.config/guix/latest symlink.

2015-02-06 Thread Ludovic Courts
civodul pushed a commit to branch master
in repository guix.

commit 3df5acf332fd7b5c21c09961eaa5353c1bd08c60
Author: Ludovic Courtès l...@gnu.org
Date:   Fri Feb 6 17:39:10 2015 +0100

pull: Always install the ~/.config/guix/latest symlink.

Before that, if two users on the same machine ran 'guix pull', the
second one would have the Guix already up to date message and their
~/.config/guix/latest link would be left unchanged---effectively
preventing them from updating.

* guix/scripts/pull.scm (build-and-install): Install the 'latest'
  symlink regardless of whether TO-DO? is true or false.
---
 guix/scripts/pull.scm |   30 +-
 1 files changed, 17 insertions(+), 13 deletions(-)

diff --git a/guix/scripts/pull.scm b/guix/scripts/pull.scm
index 16805ba..e6ed8d2 100644
--- a/guix/scripts/pull.scm
+++ b/guix/scripts/pull.scm
@@ -1,5 +1,5 @@
 ;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2013, 2014 Ludovic Courtès l...@gnu.org
+;;; Copyright © 2013, 2014, 2015 Ludovic Courtès l...@gnu.org
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -188,22 +188,26 @@ contained therein.
   (mlet* %store-monad ((source(build-from-source tarball
  #:verbose? verbose?))
(source-dir - (derivation-output-path source))
-   (to-do?(what-to-build (list source
-(if to-do?
-(mlet* %store-monad ((built? (built-derivations (list source
-  (if built?
-  (mlet* %store-monad
-  ((latest - (string-append config-dir /latest))
-   (done  (indirect-root-added latest)))
+   (to-do?(what-to-build (list source)))
+   (built?(built-derivations (list source
+;; Always update the 'latest' symlink, regardless of whether SOURCE was
+;; already built or not.
+(if built?
+(mlet* %store-monad
+((latest - (string-append config-dir /latest))
+ (done  (indirect-root-added latest)))
+  (if (and (file-exists? latest)
+   (string=? (readlink latest) source-dir))
+  (begin
+(display (_ Guix already up to date\n))
+(return #t))
+  (begin
 (switch-symlinks latest source-dir)
 (format #t
 (_ updated ~a successfully deployed under `~a'~%)
 %guix-package-name latest)
-(return #t))
-  (leave (_ failed to update Guix, check the build log~%
-(begin
-  (display (_ Guix already up to date\n))
-  (return #t)
+(return #t
+(leave (_ failed to update Guix, check the build log~%)
 
 (define (guix-pull . args)
   (define (parse-options)



01/04: doc: Provide a better illustration of Ethernet interface names.

2015-02-06 Thread Ludovic Courts
civodul pushed a commit to branch master
in repository guix.

commit 95c559c145c3db8e26ae4c0bb09af9193703f956
Author: Ludovic Courtès l...@gnu.org
Date:   Fri Feb 6 17:32:17 2015 +0100

doc: Provide a better illustration of Ethernet interface names.

Reported on #guix.

* doc/guix.texi (System Installation)[USB Stick Installation]: Mention
  eno1 instead of eth0 and give other examples.
---
 doc/guix.texi |   10 --
 1 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/doc/guix.texi b/doc/guix.texi
index ada4050..3930b96 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -3519,9 +3519,15 @@ To install the system, you would:
 @enumerate
 
 @item
-Configure the network, by running @command{dhclient eth0} (to get an
+Configure the network, by running @command{dhclient eno1} (to get an
 automatically assigned IP address from the wired network interface
-controller), or using the @command{ifconfig} command.
+controller@footnote{
+@c 
http://cgit.freedesktop.org/systemd/systemd/tree/src/udev/udev-builtin-net_id.c#n20
+The name @code{eno1} is for the first on-board Ethernet controller.  The
+interface name for an Ethernet controller that is in the first slot of
+the first PCI bus, for instance, would be @code{enp1s0}.  Use
+@command{ifconfig -a} to list all the available network interfaces.}),
+or using the @command{ifconfig} command.
 
 The system automatically loads drivers for your network interface
 controllers.



branch master updated (3f11f01 - 862abf8)

2015-02-06 Thread Ludovic Courts
civodul pushed a change to branch master
in repository guix.

  from  3f11f01   gnu: patch: Add 2.7.4 and make it a replacement for the 
default one.
   new  95c559c   doc: Provide a better illustration of Ethernet interface 
names.
   new  3df5acf   pull: Always install the ~/.config/guix/latest symlink.
   new  c9323a4   guix package: Make custom profiles actual indirect roots.
   new  862abf8   tests: Disable grafts when comparing derivations.

The 4 revisions listed above as new are entirely new to this
repository and will be described in separate emails.  The revisions
listed as adds were already present in the repository and have only
been added to this reference.


Summary of changes:
 doc/guix.texi|   10 --
 guix/scripts/package.scm |   21 -
 guix/scripts/pull.scm|   30 +-
 tests/guix-package.sh|   14 +-
 tests/packages.scm   |   17 +
 5 files changed, 63 insertions(+), 29 deletions(-)



03/04: guix package: Make custom profiles actual indirect roots.

2015-02-06 Thread Ludovic Courts
civodul pushed a commit to branch master
in repository guix.

commit c9323a4c69d48bc9af3825674e43a3febbb42091
Author: Ludovic Courtès l...@gnu.org
Date:   Fri Feb 6 17:52:07 2015 +0100

guix package: Make custom profiles actual indirect roots.

Before that, any profile generation built when '-p' is used would
effectively become a permanent GC root because the symlink in
/var/guix/gcroots/auto would point directly to /gnu/store/...-profile.

* guix/scripts/package.scm (maybe-register-gc-root): Rename to...
  (register-gc-root): ... this.  Remove conditional, and replace call to
  'canonicalize-path' with (string-append (getcwd) / ...).
  (guix-package): Call 'register-gc-root' only if PROFILE is different
  from %CURRENT-PROFILE.
* tests/guix-package.sh: Add test case.
---
 guix/scripts/package.scm |   21 -
 tests/guix-package.sh|   14 +-
 2 files changed, 29 insertions(+), 6 deletions(-)

diff --git a/guix/scripts/package.scm b/guix/scripts/package.scm
index 1ff898d..fc116d8 100644
--- a/guix/scripts/package.scm
+++ b/guix/scripts/package.scm
@@ -661,10 +661,20 @@ removed from MANIFEST.
(_ #f))
   options))
 
-(define (maybe-register-gc-root store profile)
-  Register PROFILE as a GC root, unless it doesn't need it.
-  (unless (string=? profile %current-profile)
-(add-indirect-root store (canonicalize-path profile
+(define (register-gc-root store profile)
+  Register PROFILE, a profile generation symlink, as a GC root, unless it
+doesn't need it.
+  (define absolute
+;; We must pass the daemon an absolute file name for PROFILE.  However, we
+;; cannot use (canonicalize-path profile) because that would return us the
+;; target of PROFILE in the store; using a store item as an indirect root
+;; would mean that said store item will always remain live, which is not
+;; what we want here.
+(if (string-prefix? / profile)
+profile
+(string-append (getcwd) / profile)))
+
+  (add-indirect-root store absolute))
 
 (define (readlink* file)
   Call 'readlink' until the result is not a symlink.
@@ -857,7 +867,8 @@ more information.~%))
  (count   (length entries)))
 (switch-symlinks name prof)
 (switch-symlinks profile name)
-(maybe-register-gc-root (%store) profile)
+(unless (string=? profile %current-profile)
+  (register-gc-root (%store) name))
 (format #t (N_ ~a package in profile~%
~a packages in profile~%
count)
diff --git a/tests/guix-package.sh b/tests/guix-package.sh
index 3959269..d4917bb 100644
--- a/tests/guix-package.sh
+++ b/tests/guix-package.sh
@@ -32,7 +32,7 @@ module_dir=t-guix-package-$$
 profile=t-profile-$$
 rm -f $profile
 
-trap 'rm $profile $profile-[0-9]* ; rm -rf $module_dir t-home-'$$ EXIT
+trap 'rm -f $profile $profile-[0-9]* ; rm -rf $module_dir t-home-'$$ 
EXIT
 
 # Use `-e' with a non-package expression.
 if guix package --bootstrap -e +;
@@ -203,6 +203,18 @@ if guix package -p $profile --delete-generations=12m;
 then false; else true; fi
 test `readlink_base $profile` = $generation
 
+# Make sure $profile is a GC root at this point.
+real_profile=`readlink -f $profile`
+if guix gc -d $real_profile
+then false; else true; fi
+test -d $real_profile
+
+# Now, let's remove all the symlinks to $real_profile, and make sure
+# $real_profile is no longer a GC root.
+rm $profile $profile-[0-9]-link
+guix gc -d $real_profile
+[ ! -d $real_profile ]
+
 #
 # Try with the default profile.
 #



branch master updated (5cc0e48 - cce629c)

2015-02-07 Thread Ludovic Courts
civodul pushed a change to branch master
in repository guix.

  from  5cc0e48   gnu: podofo: Add optional input lua.
   new  4320c09   gnu: gimp: Add EXIF and SVG support, plus color 
management.
   new  cbc538f   doc: Document the location of the build directory.
   new  46b8aad   serialization: Check for EOF and incomplete input 
conditions.
   new  9ba0b8d   daemon: Flush upon '\r' when reading the substituter's 
stderr.
   new  cce629c   Thank Andrei.

The 5 revisions listed above as new are entirely new to this
repository and will be described in separate emails.  The revisions
listed as adds were already present in the repository and have only
been added to this reference.


Summary of changes:
 THANKS  |1 +
 doc/guix.texi   |   13 
 gnu/packages/gimp.scm   |3 +
 guix/serialization.scm  |  165 ---
 nix/libstore/local-store.cc |6 +-
 tests/nar.scm   |   11 +++-
 6 files changed, 122 insertions(+), 77 deletions(-)



04/05: daemon: Flush upon '\r' when reading the substituter's stderr.

2015-02-07 Thread Ludovic Courts
civodul pushed a commit to branch master
in repository guix.

commit 9ba0b8d3d09a83c03ea3e296239e5e8c986a6bb7
Author: Ludovic Courtès l...@gnu.org
Date:   Mon Jan 5 22:51:03 2015 +0100

daemon: Flush upon '\r' when reading the substituter's stderr.

* nix/libstore/local-store.cc (LocalStore::getLineFromSubstituter):
  Flush when the line contains '\r'.
---
 nix/libstore/local-store.cc |6 --
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/nix/libstore/local-store.cc b/nix/libstore/local-store.cc
index 5d210ae..2c3d652 100644
--- a/nix/libstore/local-store.cc
+++ b/nix/libstore/local-store.cc
@@ -1168,8 +1168,10 @@ string 
LocalStore::getLineFromSubstituter(RunningSubstituter  run)
 if (n == 0) throw EndOfFile(format(substituter `%1%' died 
unexpectedly) % run.program);
 err.append(buf, n);
 string::size_type p;
-while ((p = err.find('\n')) != string::npos) {
-printMsg(lvlError, run.program + :  + string(err, 0, p));
+while (((p = err.find('\n')) != string::npos)
+  || ((p = err.find('\r')) != string::npos)) {
+   string thing(err, 0, p + 1);
+   writeToStderr(run.program + :  + thing);
 err = string(err, p + 1);
 }
 }



02/05: doc: Document the location of the build directory.

2015-02-07 Thread Ludovic Courts
civodul pushed a commit to branch master
in repository guix.

commit cbc538fe69577068d5676428c77287d82123a704
Author: Ludovic Courtès l...@gnu.org
Date:   Sat Feb 7 18:32:04 2015 +0100

doc: Document the location of the build directory.

Fixes http://bugs.gnu.org/19771.
Reported by Andrei Osipov andr...@gmail.com.

* doc/guix.texi (Invoking guix-daemon): Document the build directory
  location.
---
 doc/guix.texi |   13 +
 1 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/doc/guix.texi b/doc/guix.texi
index 3930b96..510acdd 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -557,6 +557,19 @@ system directories.  By default, the latter contains 
@file{/dev} and
 a separate mount name space, its own PID name space, network name space,
 etc.  This helps achieve reproducible builds (@pxref{Features}).
 
+When the daemon performs a build on behalf of the user, it creates a
+build directory under @file{/tmp} or under the directory specified by
+its @code{TMPDIR} environment variable; this directory is shared with
+the container for the duration of the build.  Be aware that using a
+directory other than @file{/tmp} can affect build results---for example,
+with a longer directory name, a build process that uses Unix-domain
+sockets might hit the name length limitation for @code{sun_path}, which
+it would otherwise not hit.
+
+The build directory is automatically deleted upon completion, unless the
+build failed and the client specified @option{--keep-failed}
+(@pxref{Invoking guix build, @option{--keep-failed}}).
+
 The following command-line options are supported:
 
 @table @code



01/01: gnu: lightning: Update to 2.1.0.

2015-02-07 Thread Ludovic Courts
civodul pushed a commit to branch master
in repository guix.

commit 0cb804117f93b72d18f3802bcfd7788722a5fb9b
Author: Ludovic Courtès l...@gnu.org
Date:   Sat Feb 7 23:30:05 2015 +0100

gnu: lightning: Update to 2.1.0.

* gnu/packages/lightning.scm (lightning): Update to 2.1.0.
---
 gnu/packages/lightning.scm |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/lightning.scm b/gnu/packages/lightning.scm
index 5829600..7dacb8f 100644
--- a/gnu/packages/lightning.scm
+++ b/gnu/packages/lightning.scm
@@ -25,14 +25,14 @@
 (define-public lightning
   (package
 (name lightning)
-(version 2.0.5)
+(version 2.1.0)
 (source (origin
  (method url-fetch)
  (uri (string-append mirror://gnu/lightning/lightning-
  version .tar.gz))
  (sha256
   (base32
-   0jm9a8ddxc1v9hyzyv4ybg37fjac2yjqv1hkd262wxzqms36mdk5
+   19j9nwl88k660045s40cbz5zrl1wpd2mcxnnc8qqnnaj311a58qz
 (build-system gnu-build-system)
 (synopsis Library for generating assembly code at runtime)
 (description



branch master updated (cce629c - 0cb8041)

2015-02-07 Thread Ludovic Courts
civodul pushed a change to branch master
in repository guix.

  from  cce629c   Thank Andrei.
   new  0cb8041   gnu: lightning: Update to 2.1.0.

The 1 revisions listed above as new are entirely new to this
repository and will be described in separate emails.  The revisions
listed as adds were already present in the repository and have only
been added to this reference.


Summary of changes:
 gnu/packages/lightning.scm |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)



06/06: doc: Remove .ko extension in 'base-initrd' example.

2015-02-08 Thread Ludovic Courts
civodul pushed a commit to branch master
in repository guix.

commit 027981d6d710ca1bb0f645820cf46d4b7bb4dbe1
Author: Ludovic Courtès l...@gnu.org
Date:   Sun Feb 8 19:00:01 2015 +0100

doc: Remove .ko extension in 'base-initrd' example.

Reported by Marek Benc.

* doc/guix.texi (Initial RAM Disk): Remove .ko from the 'base-initrd'
  example.  Add a comment.
---
 doc/guix.texi |5 -
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/doc/guix.texi b/doc/guix.texi
index 510acdd..4e99254 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -4822,8 +4822,11 @@ system declaration like this:
 
 @example
 (initrd (lambda (file-systems . rest)
+  ;; Create a standard initrd that has modules foo.ko
+  ;; and bar.ko, as well as their dependencies, in
+  ;; addition to the modules available by default.
   (apply base-initrd file-systems
- #:extra-modules '(my.ko modules.ko)
+ #:extra-modules '(foo bar)
  rest)))
 @end example
 



03/06: ui: Properly report 'nar-error' conditions.

2015-02-08 Thread Ludovic Courts
civodul pushed a commit to branch master
in repository guix.

commit b7071bc5bb5fdf229c2f79e8b9ba06ecbf34e656
Author: Ludovic Courtès l...@gnu.org
Date:   Sun Feb 8 18:30:20 2015 +0100

ui: Properly report 'nar-error' conditions.

This is a followup to 46b8aad.

* guix/ui.scm (call-with-error-handling): Add 'nar-error?' case.
---
 guix/ui.scm |   11 ++-
 1 files changed, 10 insertions(+), 1 deletions(-)

diff --git a/guix/ui.scm b/guix/ui.scm
index f5ac5ed..696d0df 100644
--- a/guix/ui.scm
+++ b/guix/ui.scm
@@ -25,8 +25,9 @@
   #:use-module (guix config)
   #:use-module (guix packages)
   #:use-module (guix profiles)
-  #:use-module (guix build-system)
   #:use-module (guix derivations)
+  #:use-module (guix build-system)
+  #:use-module (guix serialization)
   #:use-module ((guix build utils) #:select (mkdir-p))
   #:use-module ((guix licenses) #:select (license? license-name))
   #:use-module (srfi srfi-1)
@@ -241,6 +242,14 @@ interpreted.
  (leave (_ generation ~a of profile '~a' does not exist~%)
 (missing-generation-error-generation c)
 (profile-error-profile c)))
+((nar-error? c)
+ (let ((file (nar-error-file c))
+   (port (nar-error-port c)))
+   (if file
+   (leave (_ corrupt input while restoring '~a' from ~s~%)
+  file (or (port-filename port) port))
+   (leave (_ corrupt input while restoring archive from ~s~%)
+  (or (port-filename port) port)
 ((nix-connection-error? c)
  (leave (_ failed to connect to `~a': ~a~%)
 (nix-connection-error-file c)



branch master updated (27e86be - 027981d)

2015-02-08 Thread Ludovic Courts
civodul pushed a change to branch master
in repository guix.

  from  27e86be   gnu: Add p11-kit.
   new  843b196   gnu: guile-ssh: Correct post-installation test.
   new  0919f5f   build: Remove references to 'nix-setuid-helper'.
   new  b7071bc   ui: Properly report 'nar-error' conditions.
   new  77ee4a9   ui: Simplify 'show-manifest-transaction' test.
   new  46b23e1   profiles: Distinguish downgrades from upgrades.
   new  027981d   doc: Remove .ko extension in 'base-initrd' example.

The 6 revisions listed above as new are entirely new to this
repository and will be described in separate emails.  The revisions
listed as adds were already present in the repository and have only
been added to this reference.


Summary of changes:
 doc/guix.texi|5 -
 gnu/packages/ssh.scm |3 ++-
 guix/profiles.scm|   31 +++
 guix/ui.scm  |   31 +--
 pre-inst-env.in  |5 ++---
 tests/profiles.scm   |   14 +++---
 tests/ui.scm |   26 --
 7 files changed, 79 insertions(+), 36 deletions(-)



01/06: gnu: guile-ssh: Correct post-installation test.

2015-02-08 Thread Ludovic Courts
civodul pushed a commit to branch master
in repository guix.

commit 843b196287eee1fb1f4a54fbb3a66b7a36fc89f2
Author: Ludovic Courtès l...@gnu.org
Date:   Sun Feb 8 01:32:53 2015 +0100

gnu: guile-ssh: Correct post-installation test.

* gnu/packages/ssh.scm (guile-ssh)[arguments]
  fix-libguile-ssh-file-name: Call 'zero?' to check the return value of
  'system*'.
---
 gnu/packages/ssh.scm |3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/gnu/packages/ssh.scm b/gnu/packages/ssh.scm
index 7cdc305..3d058b1 100644
--- a/gnu/packages/ssh.scm
+++ b/gnu/packages/ssh.scm
@@ -216,7 +216,8 @@ Additionally, various channel-specific options can be 
negotiated.)
   ;; Make sure it works.
   (setenv GUILE_LOAD_PATH guiledir)
   (setenv GUILE_LOAD_COMPILED_PATH guiledir)
-  (system* guile -c (use-modules (ssh session)
+  (zero?
+   (system* guile -c (use-modules (ssh session))
   %standard-phases))
#:configure-flags (list (string-append --with-guilesitedir=
   (assoc-ref %outputs out)



04/06: ui: Simplify 'show-manifest-transaction' test.

2015-02-08 Thread Ludovic Courts
civodul pushed a commit to branch master
in repository guix.

commit 77ee4a96f4a128d2a139a1908f7b8c5d0d97d9a8
Author: Ludovic Courtès l...@gnu.org
Date:   Sun Feb 8 18:33:15 2015 +0100

ui: Simplify 'show-manifest-transaction' test.

* tests/ui.scm (show-manifest-transaction): Remove useless call to
  'manifest-transaction-effects'.
---
 tests/ui.scm |   26 --
 1 files changed, 12 insertions(+), 14 deletions(-)

diff --git a/tests/ui.scm b/tests/ui.scm
index 236f541..25fc709 100644
--- a/tests/ui.scm
+++ b/tests/ui.scm
@@ -1,5 +1,5 @@
 ;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2013, 2014 Ludovic Courtès l...@gnu.org
+;;; Copyright © 2013, 2014, 2015 Ludovic Courtès l...@gnu.org
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -230,19 +230,17 @@ Second line 24))
 (test-assert show-manifest-transaction
   (let* ((m (manifest (list guile-1.8.8)))
  (t (manifest-transaction (install (list guile-2.0.9)
-(let-values (((remove install upgrade)
-  (manifest-transaction-effects m t)))
-  (with-store store
-(and (string-match guile\t1.8.8 → 2.0.9
-   (with-fluids ((%default-port-encoding UTF-8))
- (with-error-to-string
-  (lambda ()
-(show-manifest-transaction store m t)
- (string-match guile\t1.8.8 - 2.0.9
-   (with-fluids ((%default-port-encoding ISO-8859-1))
- (with-error-to-string
-  (lambda ()
-(show-manifest-transaction store m t))
+(with-store store
+  (and (string-match guile\t1.8.8 → 2.0.9
+ (with-fluids ((%default-port-encoding UTF-8))
+   (with-error-to-string
+(lambda ()
+  (show-manifest-transaction store m t)
+   (string-match guile\t1.8.8 - 2.0.9
+ (with-fluids ((%default-port-encoding ISO-8859-1))
+   (with-error-to-string
+(lambda ()
+  (show-manifest-transaction store m t)
 
 (test-end ui)
 



02/06: build: Remove references to 'nix-setuid-helper'.

2015-02-08 Thread Ludovic Courts
civodul pushed a commit to branch master
in repository guix.

commit 0919f5f46608577b081c4d183be6b357c7334556
Author: Ludovic Courtès l...@gnu.org
Date:   Sun Feb 8 18:21:31 2015 +0100

build: Remove references to 'nix-setuid-helper'.

'nix-setuid-helper' vanished in commit d43eb499a (Jan. 2014.)

* pre-inst-env.in: Remove occurrences of 'NIX_SETUID_HELPER'.
---
 pre-inst-env.in |5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/pre-inst-env.in b/pre-inst-env.in
index 92e48c0..ef9a3ce 100644
--- a/pre-inst-env.in
+++ b/pre-inst-env.in
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 # GNU Guix --- Functional package management for GNU
-# Copyright © 2012, 2013, 2014 Ludovic Courtès l...@gnu.org
+# Copyright © 2012, 2013, 2014, 2015 Ludovic Courtès l...@gnu.org
 #
 # This file is part of GNU Guix.
 #
@@ -45,11 +45,10 @@ export PATH
 
 NIX_ROOT_FINDER=$abs_top_builddir/nix/scripts/list-runtime-roots
 NIX_SUBSTITUTERS=$abs_top_builddir/nix/scripts/substitute-binary
-NIX_SETUID_HELPER=$abs_top_builddir/nix-setuid-helper
 NIX_BUILD_HOOK=$abs_top_builddir/nix/scripts/offload
 NIX_LIBEXEC_DIR=@abs_top_builddir@/nix/scripts # for 'guix-authenticate'
 
-export NIX_ROOT_FINDER NIX_SETUID_HELPER NIX_SUBSTITUTERS  \
+export NIX_ROOT_FINDER NIX_SUBSTITUTERS\
 NIX_BUILD_HOOK NIX_LIBEXEC_DIR
 
 # The 'guix-register' program.



branch wip-guile-ssh created (now c28bd96)

2015-02-08 Thread Ludovic Courts
civodul pushed a change to branch wip-guile-ssh
in repository guix.

at  c28bd96   offload: Use Guile-SSH instead of GNU lsh.

This branch includes the following new commits:

   new  c28bd96   offload: Use Guile-SSH instead of GNU lsh.

The 1 revisions listed above as new are entirely new to this
repository and will be described in separate emails.  The revisions
listed as adds were already present in the repository and have only
been added to this reference.




01/01: offload: Use Guile-SSH instead of GNU lsh.

2015-02-08 Thread Ludovic Courts
civodul pushed a commit to branch wip-guile-ssh
in repository guix.

commit c28bd9611b53e22502d1fc2116753c264817c457
Author: Ludovic Courtès l...@gnu.org
Date:   Sun Mar 2 22:39:48 2014 +0100

offload: Use Guile-SSH instead of GNU lsh.

* guix/scripts/offload.scm (%lsh-command, %lshg-command,
  user-lsh-private-key): Remove.
  (user-openssh-private-key): New procedure.
  (open-ssh-session): New procedure.
  (remote-pipe): Remove 'mode' parameter.  Rewrite in terms of
  'open-ssh-session' etc.  Update users.
  (send-files)[missing-files]: Rewrite using the bidirectional channel
  port.
---
 guix/scripts/offload.scm |  204 -
 1 files changed, 91 insertions(+), 113 deletions(-)

diff --git a/guix/scripts/offload.scm b/guix/scripts/offload.scm
index e651257..9687ea3 100644
--- a/guix/scripts/offload.scm
+++ b/guix/scripts/offload.scm
@@ -17,6 +17,10 @@
 ;;; along with GNU Guix.  If not, see http://www.gnu.org/licenses/.
 
 (define-module (guix scripts offload)
+  #:use-module (ssh key)
+  #:use-module (ssh auth)
+  #:use-module (ssh session)
+  #:use-module (ssh channel)
   #:use-module (guix config)
   #:use-module (guix records)
   #:use-module (guix store)
@@ -63,7 +67,7 @@
   (system  build-machine-system)  ; string
   (userbuild-machine-user); string
   (private-key build-machine-private-key  ; file name
-   (default (user-lsh-private-key)))
+   (default (user-openssh-private-key)))
   (parallel-builds build-machine-parallel-builds  ; number
(default 1))
   (speed   build-machine-speed; inexact real
@@ -82,19 +86,11 @@
   ;; File that lists machines available as build slaves.
   (string-append %config-directory /machines.scm))
 
-(define %lsh-command
-  lsh)
-
-(define %lshg-command
-  ;; FIXME: 'lshg' fails to pass large amounts of data, see
-  ;; http://lists.lysator.liu.se/pipermail/lsh-bugs/2014q1/000639.html.
-  lsh)
-
-(define (user-lsh-private-key)
-  Return the user's default lsh private key, or #f if it could not be
+(define (user-openssh-private-key)
+  Return the user's default SSH private key, or #f if it could not be
 determined.
   (and= (getenv HOME)
- (cut string-append  /.lsh/identity)))
+ (cut string-append  /.ssh/id_rsa)))
 
 (define %user-module
   ;; Module in which the machine description file is loaded.
@@ -130,60 +126,51 @@ determined.
  (leave (_ failed to load machine file '~a': ~s~%)
 file args))
 
-;;; FIXME: The idea was to open the connection to MACHINE once for all, but
-;;; lshg is currently non-functional.
-;; (define (open-ssh-gateway machine)
-;;   Initiate an SSH connection gateway to MACHINE, and return the PID of the
-;; running lsh gateway upon success, or #f on failure.
-;;   (catch 'system-error
-;; (lambda ()
-;;   (let* ((port   (open-pipe* OPEN_READ %lsh-command
-;;  -l (build-machine-user machine)
-;;  -i (build-machine-private-key machine)
-;;  ;; XXX: With lsh 2.1, passing '--write-pid'
-;;  ;; last causes the PID not to be printed.
-;;  --write-pid --gateway --background
-;;  (build-machine-name machine)))
-;;  (line   (read-line port))
-;;  (status (close-pipe port)))
-;;(if (zero? status)
-;;(let ((pid (string-number line)))
-;;  (if (integer? pid)
-;;  pid
-;;  (begin
-;;(warning (_ '~a' did not write its PID on stdout: ~s~%)
-;; %lsh-command line)
-;;#f)))
-;;(begin
-;;  (warning (_ failed to initiate SSH connection to '~a':\
-;;  '~a' exited with ~a~%)
-;;   (build-machine-name machine)
-;;   %lsh-command
-;;   (status:exit-val status))
-;;  #f
-;; (lambda args
-;;   (leave (_ failed to execute '~a': ~a~%)
-;;  %lsh-command (strerror (system-error-errno args))
-
-(define-syntax with-error-to-port
-  (syntax-rules ()
-((_ port exp0 exp ...)
- (let ((new port)
-   (old (current-error-port)))
-   (dynamic-wind
- (lambda ()
-   (set-current-error-port new))
- (lambda ()
-   exp0 exp ...)
- (lambda ()
-   (set-current-error-port old)))
-
-(define* (remote-pipe machine mode command
-  #:key (error-port (current-error-port)) (quote? #t))
-  Run COMMAND (a string list) on MACHINE, assuming an lsh gateway has been
-set up.  When QUOTE? is true, perform shell-quotation of all the elements of
-COMMAND.  Return either a pipe opened with MODE, or #f if the lsh 

branch wip-guile-ssh deleted (was 9a80ef0)

2015-02-08 Thread Ludovic Courts
civodul pushed a change to branch wip-guile-ssh
in repository guix.

   was  9a80ef0   offload: Use Guile-SSH instead of GNU lsh.

This change permanently discards the following revisions:

  discards  9a80ef0   offload: Use Guile-SSH instead of GNU lsh.



[dmd] 01/01: services: Export 'make-actions'.

2015-02-08 Thread Ludovic Courts
civodul pushed a commit to branch master
in repository dmd.

commit 0623a67de895fd929c5e02c3e171fe1791ce4504
Author: Ludovic Courtès l...@gnu.org
Date:   Sun Feb 8 21:46:58 2015 +0100

services: Export 'make-actions'.

* modules/dmd/service.scm: Export 'make-actions', which is documented.
---
 modules/dmd/service.scm |5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/modules/dmd/service.scm b/modules/dmd/service.scm
index 7e8d281..dd5afe3 100644
--- a/modules/dmd/service.scm
+++ b/modules/dmd/service.scm
@@ -1,5 +1,5 @@
 ;; service.scm -- Representation of services.
-;; Copyright (C) 2013, 2014 Ludovic Courtès l...@gnu.org
+;; Copyright (C) 2013, 2014, 2015 Ludovic Courtès l...@gnu.org
 ;; Copyright (C) 2002, 2003 Wolfgang Järling wolfg...@pro-linux.de
 ;; Copyright (C) 2014 Alex Sassmannshausen alex.sassmannshau...@gmail.com
 ;;
@@ -66,7 +66,8 @@
 make-system-destructor
 make-init.d-service
 
-dmd-service))
+dmd-service
+make-actions))
 
 ;; Conveniently create an actions object containing the actions for a
 ;; service object.  The current structure is a list of actions,



[dmd] branch master updated (b6529fc - 0623a67)

2015-02-08 Thread Ludovic Courts
civodul pushed a change to branch master
in repository dmd.

  from  b6529fc   dmd: Autoload (ice-9 readline).
   new  0623a67   services: Export 'make-actions'.

The 1 revisions listed above as new are entirely new to this
repository and will be described in separate emails.  The revisions
listed as adds were already present in the repository and have only
been added to this reference.


Summary of changes:
 modules/dmd/service.scm |5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)



01/01: services: lsh: Add graceful handling of daemonic option.

2015-02-08 Thread Ludovic Courts
civodul pushed a commit to branch master
in repository guix.

commit 5833bf33a277d12357858e07ba34c5b5e3e69d55
Author: nebuli nebu@kipple
Date:   Wed Dec 3 22:51:48 2014 +0100

services: lsh: Add graceful handling of daemonic option.

* gnu/services/ssh.scm (lsh-service): New #:keys (daemonic?, pid-file?,
  pid-file).  Build new lshd-command and expand service-requirement
  field.
* doc/guix.texi (Networking Services): Update accordingly.

Signed-off-by: Ludovic Courtès l...@gnu.org
---
 doc/guix.texi|8 +-
 gnu/services/ssh.scm |   64 +++---
 2 files changed, 52 insertions(+), 20 deletions(-)

diff --git a/doc/guix.texi b/doc/guix.texi
index 9fa0bd8..0842c91 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -4526,7 +4526,7 @@ configuration file.
 Furthermore, @code{(gnu services ssh)} provides the following service.
 
 @deffn {Monadic Procedure} lsh-service [#:host-key /etc/lsh/host-key] @
-   [#:interfaces '()] [#:port-number 22] @
+   [#:daemonic? #t] [#:interfaces '()] [#:port-number 22] @
[#:allow-empty-passwords? #f] [#:root-login? #f] @
[#:syslog-output? #t] [#:x11-forwarding? #t] @
[#:tcp/ip-forwarding? #t] [#:password-authentication? #t] @
@@ -4535,6 +4535,12 @@ Run the @command{lshd} program from @var{lsh} to listen 
on port @var{port-number
 @var{host-key} must designate a file containing the host key, and readable
 only by root.
 
+When @var{daemonic?} is true, @command{lshd} will detach from the
+controlling terminal and log its output to syslogd, unless one sets
+@var{syslog-output?} to false.  Obviously, it also makes lsh-service
+depend on existence of syslogd service.  When @var{pid-file?} is true,
+@command{lshd} writes its PID to the file called @var{pid-file}.
+
 When @var{initialize?} is true, automatically create the seed and host key
 upon service activation if they do not exist yet.  This may take long and
 require interaction.
diff --git a/gnu/services/ssh.scm b/gnu/services/ssh.scm
index 8868e4f..9537958 100644
--- a/gnu/services/ssh.scm
+++ b/gnu/services/ssh.scm
@@ -73,12 +73,15 @@
 
 (define* (lsh-service #:key
   (lsh lsh)
+  (daemonic? #t)
   (host-key /etc/lsh/host-key)
   (interfaces '())
   (port-number 22)
   (allow-empty-passwords? #f)
   (root-login? #f)
   (syslog-output? #t)
+  (pid-file? #f)
+  (pid-file /var/run/lshd.pid)
   (x11-forwarding? #t)
   (tcp/ip-forwarding? #t)
   (password-authentication? #t)
@@ -88,6 +91,12 @@
 @var{host-key} must designate a file containing the host key, and readable
 only by root.
 
+When @var{daemonic?} is true, @command{lshd} will detach from the
+controlling terminal and log its output to syslogd, unless one sets
+@var{syslog-output?} to false.  Obviously, it also makes lsh-service
+depend on existence of syslogd service.  When @var{pid-file?} is true,
+@command{lshd} writes its PID to the file called @var{pid-file}.
+
 When @var{initialize?} is true, automatically create the seed and host key
 upon service activation if they do not exist yet.  This may take long and
 require interaction.
@@ -107,30 +116,47 @@ root.
 
 The other options should be self-descriptive.
   (define lsh-command
-(cons* #~(string-append #$lsh /sbin/lshd)
-   #~(string-append --host-key= #$host-key)
-   #~(string-append --password-helper= #$lsh /sbin/lsh-pam-checkpw)
-   #~(string-append --subsystems=sftp= #$lsh /sbin/sftp-server)
-   -p (number-string port-number)
-   (if password-authentication? --password --no-password)
-   (if public-key-authentication?
-   --publickey --no-publickey)
-   (if root-login?
-   --root-login --no-root-login)
-   (if x11-forwarding?
-   --x11-forward --no-x11-forward)
-   (if tcp/ip-forwarding?
-   --tcpip-forward --no-tcpip-forward)
-   (if (null? interfaces)
-   '()
-   (list (string-append --interfaces=
-(string-join interfaces ,))
+(append
+ (cons #~(string-append #$lsh /sbin/lshd)
+   (if daemonic?
+   (let ((syslog (if syslog-output? '()
+ (list --no-syslog
+ (cons --daemonic
+   (if pid-file?
+   (cons #~(string-append --pid-file= #$pid-file)
+ syslog)
+   (cons --no-pid-file syslog
+   (if pid-file?
+   (list #~(string-append --pid-file= #$pid-file))
+   '(
+ (cons* #~(string-append --host-key= #$host-key)
+

branch master updated (a677c72 - 5833bf3)

2015-02-08 Thread Ludovic Courts
civodul pushed a change to branch master
in repository guix.

  from  a677c72   build: Add 'waf-build-system'.
   new  5833bf3   services: lsh: Add graceful handling of daemonic option.

The 1 revisions listed above as new are entirely new to this
repository and will be described in separate emails.  The revisions
listed as adds were already present in the repository and have only
been added to this reference.


Summary of changes:
 doc/guix.texi|8 +-
 gnu/services/ssh.scm |   64 +++---
 2 files changed, 52 insertions(+), 20 deletions(-)



02/04: gnu: plotutils: Do not propagate libXaw.

2015-01-15 Thread Ludovic Courts
civodul pushed a commit to branch master
in repository guix.

commit ceae3fef44f96ccab6f36135cf9e74a341ec84ff
Author: Ludovic Courtès l...@gnu.org
Date:   Thu Jan 15 15:04:45 2015 +0100

gnu: plotutils: Do not propagate libXaw.

* gnu/packages/plotutils.scm (plotutils): Move LIBXAW from
  'propagated-inputs' to 'inputs'.  Add 'snippet'.
---
 gnu/packages/plotutils.scm |   19 +--
 1 files changed, 13 insertions(+), 6 deletions(-)

diff --git a/gnu/packages/plotutils.scm b/gnu/packages/plotutils.scm
index eae8aba..41df880 100644
--- a/gnu/packages/plotutils.scm
+++ b/gnu/packages/plotutils.scm
@@ -1,5 +1,5 @@
 ;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2013, 2014 Ludovic Courtès l...@gnu.org
+;;; Copyright © 2013, 2014, 2015 Ludovic Courtès l...@gnu.org
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -36,14 +36,21 @@
  (sha256
   (base32
1arkyizn5wbgvbh53aziv3s6lmd3wm9lqzkhxb3hijlp1y124hjg))
- (patches (list (search-patch plotutils-libpng-jmpbuf.patch)
+ (patches (list (search-patch plotutils-libpng-jmpbuf.patch)))
+ (modules '((guix build utils)))
+ (snippet
+  ;; Force the use of libXaw7 instead of libXaw.  When not doing
+  ;; that, libplot.la ends up containing just -lXaw (without
+  ;; -L/path/to/Xaw), due to the fact that there is no
+  ;; libXaw.la, which forces us to propagate libXaw.
+  '(substitute* configure
+ ((-lXaw)
+  -lXaw7)
 (build-system gnu-build-system)
 (inputs `((libpng ,libpng)
   (libx11 ,libx11)
-  (libxt ,libxt)))
-
-;; libplot.la has '-lXaw'.
-(propagated-inputs `((libxaw ,libxaw)))
+  (libxt ,libxt)
+  (libxaw ,libxaw)))
 
 (home-page
  http://www.gnu.org/software/plotutils/;)



01/04: gnu: mercurial: Update to 3.2.4.

2015-01-15 Thread Ludovic Courts
civodul pushed a commit to branch master
in repository guix.

commit 52958f0dfd098249357cc0b66974bde5e45193e5
Author: Ludovic Courtès l...@gnu.org
Date:   Thu Jan 15 14:47:22 2015 +0100

gnu: mercurial: Update to 3.2.4.

* gnu/packages/version-control.scm (mercurial): Update to 3.2.4.
---
 gnu/packages/version-control.scm |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm
index dd41794..53e3be7 100644
--- a/gnu/packages/version-control.scm
+++ b/gnu/packages/version-control.scm
@@ -384,14 +384,14 @@ also walk each side of a merge and test those changes 
individually.)
 (define-public mercurial
   (package
 (name mercurial)
-(version 2.7.1)
+(version 3.2.4)
 (source (origin
  (method url-fetch)
  (uri (string-append 
http://mercurial.selenic.com/release/mercurial-;
  version .tar.gz))
  (sha256
   (base32
-   121m8f7vmipmdg00cnzdz2rjkgydh28mwfirqkrbs5fv089vywl4
+   1g7nfvapxj5k44dyp0p08v37s0zmrj2vl0rjgfd8297x0afidm08
 (build-system python-build-system)
 (arguments
  `(;; Restrict to Python 2, as Python 3 would require



branch master updated (e478a9e - aeb1a1d)

2015-01-15 Thread Ludovic Courts
civodul pushed a change to branch master
in repository guix.

  from  e478a9e   gnu: teckit: Add alternate source URL.
   new  52958f0   gnu: mercurial: Update to 3.2.4.
   new  ceae3fe   gnu: plotutils: Do not propagate libXaw.
   new  63c5462   gnu: nix: Update to 1.8.
   new  aeb1a1d   gnu: gdb: Update to 7.8.2.

The 4 revisions listed above as new are entirely new to this
repository and will be described in separate emails.  The revisions
listed as adds were already present in the repository and have only
been added to this reference.


Summary of changes:
 gnu/packages/gdb.scm|4 ++--
 gnu/packages/package-management.scm |4 ++--
 gnu/packages/plotutils.scm  |   19 +--
 gnu/packages/version-control.scm|4 ++--
 4 files changed, 19 insertions(+), 12 deletions(-)



01/08: gnu: Move guile-charting to (gnu packages plotutils).

2015-01-19 Thread Ludovic Courts
civodul pushed a commit to branch master
in repository guix.

commit 00ebe4740adf1156772471397222046bd5cb3f40
Author: Ludovic Courtès l...@gnu.org
Date:   Mon Jan 19 21:37:30 2015 +0100

gnu: Move guile-charting to (gnu packages plotutils).

This removes the dependency from (gnu packages guile)
to (gnu packages gtk), which potentially reduces the memory/IO/CPU
footprint given that 'guile' is used during bootstrap.

* gnu/packages/guile.scm (guile-charting): Move to...
* gnu/packages/plotutils.scm (guile-charting): ... here.
---
 gnu/packages/guile.scm |   32 +---
 gnu/packages/plotutils.scm |   32 
 2 files changed, 33 insertions(+), 31 deletions(-)

diff --git a/gnu/packages/guile.scm b/gnu/packages/guile.scm
index c0c5ced..f71201b 100644
--- a/gnu/packages/guile.scm
+++ b/gnu/packages/guile.scm
@@ -1,5 +1,5 @@
 ;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2012, 2013, 2014 Ludovic Courtès l...@gnu.org
+;;; Copyright © 2012, 2013, 2014, 2015 Ludovic Courtès l...@gnu.org
 ;;; Copyright © 2014, 2015 Mark H Weaver m...@netris.org
 ;;;
 ;;; This file is part of GNU Guix.
@@ -34,7 +34,6 @@
   #:use-module (gnu packages ncurses)
   #:use-module (gnu packages ed)
   #:use-module (gnu packages which)
-  #:use-module (gnu packages gtk)
   #:use-module (guix packages)
   #:use-module (guix download)
   #:use-module (guix build-system gnu)
@@ -368,33 +367,4 @@ http:://json.org specification.  These are the main 
features:
 - Allows JSON pretty printing.)
 (license lgpl3+)))
 
-(define-public guile-charting
-  (package
-(name guile-charting)
-(version 0.2.0)
-(source (origin
-  (method url-fetch)
-  (uri (string-append http://wingolog.org/pub/guile-charting/;
-  guile-charting- version .tar.gz))
-  (sha256
-   (base32
-0w5qiyv9v0ip5li22x762bm48g8xnw281w66iyw094zdw611pb2m))
-  (modules '((guix build utils)))
-  (snippet
-   '(begin
-  ;; Use the standard location for modules.
-  (substitute* Makefile.in
-((godir = .*$)
- godir = $(moddir)\n))
-(build-system gnu-build-system)
-(native-inputs `((pkg-config ,pkg-config)))
-(inputs `((guile ,guile-2.0)))
-(propagated-inputs `((guile-cairo ,guile-cairo)))
-(home-page http://wingolog.org/software/guile-charting/;)
-(synopsis Create charts and graphs in Guile)
-(description
- Guile-Charting is a Guile Scheme library to create bar charts and graphs
-using the Cairo drawing library.)
-(license lgpl2.1+)))
-
 ;;; guile.scm ends here
diff --git a/gnu/packages/plotutils.scm b/gnu/packages/plotutils.scm
index 41df880..da40e28 100644
--- a/gnu/packages/plotutils.scm
+++ b/gnu/packages/plotutils.scm
@@ -23,6 +23,9 @@
   #:use-module (guix build-system gnu)
   #:use-module (gnu packages xorg)
   #:use-module (gnu packages image)
+  #:use-module (gnu packages guile)
+  #:use-module (gnu packages gtk)
+  #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages))
 
 (define-public plotutils
@@ -62,3 +65,32 @@ graphics in many file formats.  It also has support for 2D 
vector graphics
 animations.  The package also contains command-line programs for plotting
 scientific data.)
 (license gpl2+)))
+
+(define-public guile-charting
+  (package
+(name guile-charting)
+(version 0.2.0)
+(source (origin
+  (method url-fetch)
+  (uri (string-append http://wingolog.org/pub/guile-charting/;
+  guile-charting- version .tar.gz))
+  (sha256
+   (base32
+0w5qiyv9v0ip5li22x762bm48g8xnw281w66iyw094zdw611pb2m))
+  (modules '((guix build utils)))
+  (snippet
+   '(begin
+  ;; Use the standard location for modules.
+  (substitute* Makefile.in
+((godir = .*$)
+ godir = $(moddir)\n))
+(build-system gnu-build-system)
+(native-inputs `((pkg-config ,pkg-config)))
+(inputs `((guile ,guile-2.0)))
+(propagated-inputs `((guile-cairo ,guile-cairo)))
+(home-page http://wingolog.org/software/guile-charting/;)
+(synopsis Create charts and graphs in Guile)
+(description
+ Guile-Charting is a Guile Scheme library to create bar charts and graphs
+using the Cairo drawing library.)
+(license lgpl2.1+)))



04/08: records: Use keyword parameters for 'make-syntactic-constructor'.

2015-01-19 Thread Ludovic Courts
civodul pushed a commit to branch master
in repository guix.

commit 9b543456d751eff094a52e98ecebc8030542f728
Author: Ludovic Courtès l...@gnu.org
Date:   Mon Jan 19 22:27:58 2015 +0100

records: Use keyword parameters for 'make-syntactic-constructor'.

* guix/records.scm (define-record-type*)[make-syntactic-constructor]:
  Turn THUNKED and DEFAULTS into keyword arguments.
  Adjust caller accordingly.  Declare 'thunked' and 'defaults' local
  variables.
---
 guix/records.scm |   14 --
 1 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/guix/records.scm b/guix/records.scm
index e7b86af..c833fdb 100644
--- a/guix/records.scm
+++ b/guix/records.scm
@@ -78,7 +78,8 @@ It is possible to copy an object 'x' created with 'thing' 
like this:
 This expression returns a new object equal to 'x' except for its 'name'
 field.
 
-(define (make-syntactic-constructor type name ctor fields thunked defaults)
+(define* (make-syntactic-constructor type name ctor fields
+ #:key thunked defaults)
   Make the syntactic constructor NAME for TYPE, that calls CTOR, and
 expects all of FIELDS to be initialized.  DEFAULTS is the list of
 FIELD/DEFAULT-VALUE tuples, and THUNKED is the list of identifiers of
@@ -219,7 +220,10 @@ thunked fields.
 (syntax-case s ()
   ((_ type syntactic-ctor ctor pred
   (field get options ...) ...)
-   (let* ((field-spec #'((field get options ...) ...)))
+   (let* ((field-spec #'((field get options ...) ...))
+  (thunked(filter-map thunked-field? field-spec))
+  (defaults   (filter-map field-default-value
+  #'((field options ...) ...
  (with-syntax (((field-spec* ...)
 (map field-spec-srfi-9 field-spec))
((thunked-field-accessor ...)
@@ -236,10 +240,8 @@ thunked fields.
(begin thunked-field-accessor ...)
#,(make-syntactic-constructor #'type #'syntactic-ctor #'ctor
  #'(field ...)
- (filter-map thunked-field? 
field-spec)
- (filter-map field-default-value
- #'((field options ...)
-...))
+ #:thunked thunked
+ #:defaults defaults
 
 (define* (alist-record alist make keys
 #:optional (multiple-value-keys '()))



08/08: records: Add support for delayed fields.

2015-01-19 Thread Ludovic Courts
civodul pushed a commit to branch master
in repository guix.

commit 310b32a2a6136a99d3c48542bf68d0d8b550f42f
Author: Ludovic Courtès l...@gnu.org
Date:   Mon Jan 19 23:21:47 2015 +0100

records: Add support for delayed fields.

* guix/records.scm (make-syntactic-constructor): Add #:delayed
  parameter.
  [delayed-field?]: New procedure.
  [wrap-field-value]: Use it.
  (define-record-type*)[delayed-field?, wrapped-field?]: New procedures.
  [thunked-field-accessor-name]: Rename to...
  [wrapped-field-accessor-name]: ... this.
  [field-spec-srfi-9]: Change 'thunked' to 'wrapped'.
  [delayed-field-accessor-definition]: New procedure.
  Compute delayed-field accessors and emit them.  Pass #:delayed to
  'make-syntactic-constructor'.
* tests/records.scm (define-record-type*  delayed,
  define-record-type*  delayed  default,
  define-record-type*  delayed  inherited): New tests.
---
 guix/records.scm  |   63 +++-
 tests/records.scm |   47 ++-
 2 files changed, 98 insertions(+), 12 deletions(-)

diff --git a/guix/records.scm b/guix/records.scm
index 8a4d6a7..fd17e13 100644
--- a/guix/records.scm
+++ b/guix/records.scm
@@ -43,10 +43,12 @@
form
 
 (define* (make-syntactic-constructor type name ctor fields
- #:key (thunked '()) (defaults '()))
+ #:key (thunked '()) (defaults '())
+ (delayed '()))
   Make the syntactic constructor NAME for TYPE, that calls CTOR, and expects
 all of FIELDS to be initialized.  DEFAULTS is the list of FIELD/DEFAULT-VALUE
-tuples, and THUNKED is the list of identifiers of thunked fields.
+tuples, THUNKED is the list of identifiers of thunked fields, and DELAYED is
+the list of identifiers of delayed fields.
   (with-syntax ((type type)
 (name name)
 (ctor ctor)
@@ -81,10 +83,15 @@ tuples, and THUNKED is the list of identifiers of thunked 
fields.
   (define (thunked-field? f)
 (memq (syntax-datum f) '#,thunked))
 
+  (define (delayed-field? f)
+(memq (syntax-datum f) '#,delayed))
+
   (define (wrap-field-value f value)
-(if (thunked-field? f)
-#`(lambda () #,value)
-value))
+(cond ((thunked-field? f)
+   #`(lambda () #,value))
+  ((delayed-field? f)
+   #`(delay #,value))
+  (else value)))
 
   (define (field-bindings field+value)
 ;; Return field to value bindings, for use in 'let*' below.
@@ -161,6 +168,9 @@ The 'port' field is \thunked\, meaning that calls like 
'(thing-port x)' will
 actually compute the field's value in the current dynamic extent, which is
 useful when referring to fluids in a field's value.
 
+A field can also be marked as \delayed\ instead of \thunked\, in which
+case its value is effectively wrapped in a (delay …) form.
+
 It is possible to copy an object 'x' created with 'thing' like this:
 
   (thing (inherit x) (name \bar\))
@@ -176,6 +186,15 @@ field.
  (field-default-value #'(field options ...)))
 (_ #f)))
 
+(define (delayed-field? s)
+  ;; Return the field name if the field defined by S is delayed.
+  (syntax-case s (delayed)
+((field (delayed) _ ...)
+ #'field)
+((field _ options ...)
+ (delayed-field? #'(field options ...)))
+(_ #f)))
+
 (define (thunked-field? s)
   ;; Return the field name if the field defined by S is thunked.
   (syntax-case s (thunked)
@@ -185,9 +204,12 @@ field.
  (thunked-field? #'(field options ...)))
 (_ #f)))
 
-(define (thunked-field-accessor-name field)
+(define (wrapped-field? s)
+  (or (thunked-field? s) (delayed-field? s)))
+
+(define (wrapped-field-accessor-name field)
   ;; Return the name (an unhygienic syntax object) of the real
-  ;; getter for field, which is assumed to be a thunked field.
+  ;; getter for field, which is assumed to be a wrapped field.
   (syntax-case field ()
 ((field get options ...)
  (let* ((getter  (syntax-datum #'get))
@@ -200,8 +222,8 @@ field.
   (syntax-case field ()
 ((name get options ...)
  #`(name
-#,(if (thunked-field? field)
-  (thunked-field-accessor-name field)
+#,(if (wrapped-field? field)
+  (wrapped-field-accessor-name field)
   #'get)
 
 (define (thunked-field-accessor-definition field)
@@ -209,16 +231,27 @@ field.
   ;; thunked field.
   (syntax-case field ()
 ((name get _ ...)
- (with-syntax ((real-get (thunked-field-accessor-name field)))
+ (with-syntax ((real-get (wrapped-field-accessor-name 

branch master updated (109da1c - 310b32a)

2015-01-19 Thread Ludovic Courts
civodul pushed a change to branch master
in repository guix.

  from  109da1c   gnu: Add json-glib.
   new  00ebe47   gnu: Move guile-charting to (gnu packages plotutils).
   new  56b7a33   gnu: Remove unneeded #:select.
   new  eb497b6   gnu: Make libgnomeprint{,ui} as deprecated.
   new  9b54345   records: Use keyword parameters for 
'make-syntactic-constructor'.
   new  cf4efb3   records: Move 'make-syntactic-constructor' to the top 
level.
   new  c492be6   records: Factorize value wrapping in the record 
constructor.
   new  0db40ed   make-syntactic-constructor kwarg default
   new  310b32a   records: Add support for delayed fields.

The 8 revisions listed above as new are entirely new to this
repository and will be described in separate emails.  The revisions
listed as adds were already present in the repository and have only
been added to this reference.


Summary of changes:
 gnu/packages/fonts.scm |5 +-
 gnu/packages/gnome.scm |   12 ++-
 gnu/packages/guile.scm |   32 +--
 gnu/packages/plotutils.scm |   32 ++
 guix/records.scm   |  246 +--
 tests/records.scm  |   47 -
 6 files changed, 232 insertions(+), 142 deletions(-)



01/02: packages: Mark the 'patches' field as delayed.

2015-01-20 Thread Ludovic Courts
civodul pushed a commit to branch master
in repository guix.

commit 6b1f9721a83f343315ae4b936ec9b9542ba8523e
Author: Ludovic Courtès l...@gnu.org
Date:   Tue Jan 20 09:59:56 2015 +0100

packages: Mark the 'patches' field as delayed.

* guix/packages.scm (origin)[patches]: Mark as 'delayed'.
  (print-origin, origin-derivation): Add call to 'force' when accessing
  'patches'.
---
 guix/packages.scm |   14 ++
 1 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/guix/packages.scm b/guix/packages.scm
index de87681..96f3adf 100644
--- a/guix/packages.scm
+++ b/guix/packages.scm
@@ -135,7 +135,13 @@
   (methodorigin-method)   ; procedure
   (sha256origin-sha256)   ; bytevector
   (file-name origin-file-name (default #f))   ; optional file name
-  (patches   origin-patches (default '())); list of file names
+
+  ;; Patches are delayed so that the 'search-patch' calls are made lazily,
+  ;; which reduces I/O on startup and allows patch-not-found errors to be
+  ;; gracefully handled at run time.
+  (patches   origin-patches   ; list of file names
+ (default '()) (delayed))
+
   (snippet   origin-snippet (default #f)) ; sexp or #f
   (patch-flags  origin-patch-flags; list of strings
 (default '(-p1)))
@@ -157,7 +163,7 @@
 (($ origin uri method sha256 file-name patches)
  (simple-format port #origin ~s ~a ~s ~a
 uri (bytevector-base32-string sha256)
-patches
+(force patches)
 (number-string (object-address origin) 16)
 
 (set-record-type-printer! origin print-origin)
@@ -937,10 +943,10 @@ cross-compilation target triplet.
 SOURCE is a file name, return either the interned file name (if SOURCE is
 outside of the store) or SOURCE itself (if SOURCE is already a store item.)
   (match source
-(($ origin uri method sha256 name () #f)
+(($ origin uri method sha256 name (= force ()) #f)
  ;; No patches, no snippet: this is a fixed-output derivation.
  (method uri 'sha256 sha256 name #:system system))
-(($ origin uri method sha256 name (patches ...) snippet
+(($ origin uri method sha256 name (= force (patches ...)) snippet
 (flags ...) inputs (modules ...) (imported-modules ...)
 guile-for-build)
  ;; Patches and/or a snippet.



branch master updated (310b32a - dbab515)

2015-01-20 Thread Ludovic Courts
civodul pushed a change to branch master
in repository guix.

  from  310b32a   records: Add support for delayed fields.
   new  6b1f972   packages: Mark the 'patches' field as delayed.
   new  dbab515   gnu: 'search-patch' raises an error when a patch is not 
found.

The 2 revisions listed above as new are entirely new to this
repository and will be described in separate emails.  The revisions
listed as adds were already present in the repository and have only
been added to this reference.


Summary of changes:
 gnu/packages.scm   |9 +++--
 guix/packages.scm  |   14 ++
 tests/packages.scm |   20 
 3 files changed, 37 insertions(+), 6 deletions(-)



02/02: gnu: 'search-patch' raises an error when a patch is not found.

2015-01-20 Thread Ludovic Courts
civodul pushed a commit to branch master
in repository guix.

commit dbab5150f83543f0c8a424dfddb698d7812370b7
Author: Ludovic Courtès l...@gnu.org
Date:   Tue Jan 20 10:17:24 2015 +0100

gnu: 'search-patch' raises an error when a patch is not found.

* gnu/packages.scm (search-patch): Raise an error condition when
  'search-path' returns #f.
* tests/packages.scm (patch not found yields a run-time error): New
  test.
---
 gnu/packages.scm   |9 +++--
 tests/packages.scm |   20 
 2 files changed, 27 insertions(+), 2 deletions(-)

diff --git a/gnu/packages.scm b/gnu/packages.scm
index 7f0b58b..263addb 100644
--- a/gnu/packages.scm
+++ b/gnu/packages.scm
@@ -30,6 +30,8 @@
   #:use-module (srfi srfi-1)
   #:use-module (srfi srfi-11)
   #:use-module (srfi srfi-26)
+  #:use-module (srfi srfi-34)
+  #:use-module (srfi srfi-35)
   #:use-module (srfi srfi-39)
   #:export (search-patch
 search-bootstrap-binary
@@ -70,8 +72,11 @@
 %load-path)))
 
 (define (search-patch file-name)
-  Search the patch FILE-NAME.
-  (search-path (%patch-path) file-name))
+  Search the patch FILE-NAME.  Raise an error if not found.
+  (or (search-path (%patch-path) file-name)
+  (raise (condition
+  (message (message (format #f (_ ~a: patch not found)
+ file-name)))
 
 (define (search-bootstrap-binary file-name system)
   Search the bootstrap binary FILE-NAME for SYSTEM.
diff --git a/tests/packages.scm b/tests/packages.scm
index bd5ba3e..ef34e76 100644
--- a/tests/packages.scm
+++ b/tests/packages.scm
@@ -42,6 +42,7 @@
   #:use-module (srfi srfi-1)
   #:use-module (srfi srfi-26)
   #:use-module (srfi srfi-34)
+  #:use-module (srfi srfi-35)
   #:use-module (srfi srfi-64)
   #:use-module (rnrs io ports)
   #:use-module (ice-9 regex)
@@ -248,6 +249,25 @@
  (string=? (derivation-output-path drv)
(package-output %store package out)
 
+(test-assert patch not found yields a run-time error
+  (guard (c ((condition-has-type? c message)
+ (and (string-contains (condition-message c)
+   does-not-exist.patch)
+  (string-contains (condition-message c)
+   not found
+(let ((p (package
+   (inherit (dummy-package p))
+   (source (origin
+ (method (const #f))
+ (uri http://whatever;)
+ (patches
+  (list (search-patch does-not-exist.patch)))
+ (sha256
+  (base32
+   
0amn0bbwqvsvvsh6drfwz20ydc2czk374lzw5kksbh6bf78k4ks4)))
+  (package-derivation %store p)
+  #f)))
+
 (test-assert trivial
   (let* ((p (package (inherit (dummy-package trivial))
   (build-system trivial-build-system)



branch master updated (dbab515 - 28561d8)

2015-01-20 Thread Ludovic Courts
civodul pushed a change to branch master
in repository guix.

  from  dbab515   gnu: 'search-patch' raises an error when a patch is not 
found.
   new  28561d8   build: Make sure only the local .go files are loaded 
during compilation.

The 1 revisions listed above as new are entirely new to this
repository and will be described in separate emails.  The revisions
listed as adds were already present in the repository and have only
been added to this reference.


Summary of changes:
 Makefile.am |8 
 1 files changed, 8 insertions(+), 0 deletions(-)



01/01: build: Make sure only the local .go files are loaded during compilation.

2015-01-20 Thread Ludovic Courts
civodul pushed a commit to branch master
in repository guix.

commit 28561d85dac1872b1acf23dcd8dbf2ee9016f197
Author: Ludovic Courtès l...@gnu.org
Date:   Tue Jan 20 14:55:06 2015 +0100

build: Make sure only the local .go files are loaded during compilation.

Reported by Andreas Enge andr...@enge.fr
at http://lists.gnu.org/archive/html/guix-devel/2015-01/msg00272.html.

* Makefile.am (.scm.go): Add unset GUILE_LOAD_COMPILED_PATH.
---
 Makefile.am |8 
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index c482848..e15afd2 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -268,10 +268,18 @@ AM_V_GUILEC = $(AM_V_GUILEC_$(V))
 AM_V_GUILEC_ = $(AM_V_GUILEC_$(AM_DEFAULT_VERBOSITY))
 AM_V_GUILEC_0 = @echo   GUILEC $@;
 
+# Unset 'GUILE_LOAD_COMPILED_PATH' altogether while compiling.  Otherwise, if
+# $GUILE_LOAD_COMPILED_PATH contains $(moduledir), we may find .go files in
+# there that are newer than the local .scm files (for instance because the
+# user ran 'make install' recently).  When that happens, we end up loading
+# those previously-installed .go files, which may be stale, thereby breaking
+# the whole thing.
+#
 # XXX: Use the C locale for when Guile lacks
 # 
http://git.sv.gnu.org/cgit/guile.git/commit/?h=stable-2.0id=e2c6bf3866d1186c60bacfbd4fe5037087ee5e3f.
 .scm.go:
$(AM_V_GUILEC)$(MKDIR_P) `dirname $@` ;   \
+   unset GUILE_LOAD_COMPILED_PATH ;\
LC_ALL=C\
$(top_builddir)/pre-inst-env\
$(GUILD) compile -L $(top_builddir) -L $(top_srcdir)\



02/08: gnu: Remove unneeded #:select.

2015-01-19 Thread Ludovic Courts
civodul pushed a commit to branch master
in repository guix.

commit 56b7a3387393e431b6a8ada43dcc91f5518bd2a8
Author: Ludovic Courtès l...@gnu.org
Date:   Mon Jan 19 21:42:40 2015 +0100

gnu: Remove unneeded #:select.

* gnu/packages/fonts.scm: Remove #:select to work around
  http://bugs.gnu.org/15540.
---
 gnu/packages/fonts.scm |5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/gnu/packages/fonts.scm b/gnu/packages/fonts.scm
index c16ab93..94993f0 100644
--- a/gnu/packages/fonts.scm
+++ b/gnu/packages/fonts.scm
@@ -1,5 +1,5 @@
 ;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2013, 2014 Ludovic Courtès l...@gnu.org
+;;; Copyright © 2013, 2014, 2015 Ludovic Courtès l...@gnu.org
 ;;; Copyright © 2014 Mark H Weaver m...@netris.org
 ;;; Copyright © 2014 Joshua Grant ta...@riseup.net
 ;;; Copyright © 2014 Alex Kost alez...@gmail.com
@@ -25,8 +25,7 @@
   #:use-module (guix download)
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system trivial)
-  #:use-module ((gnu packages base)
-#:select (tar))
+  #:use-module (gnu packages base)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages perl)
   #:use-module (gnu packages xorg)



07/08: make-syntactic-constructor kwarg default

2015-01-19 Thread Ludovic Courts
civodul pushed a commit to branch master
in repository guix.

commit 0db40ed289388d049ec9ecfd9661cc1d74a9ef3e
Author: Ludovic Courtès l...@gnu.org
Date:   Mon Jan 19 22:54:27 2015 +0100

make-syntactic-constructor kwarg default
---
 guix/records.scm |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/guix/records.scm b/guix/records.scm
index bef8ff8..8a4d6a7 100644
--- a/guix/records.scm
+++ b/guix/records.scm
@@ -43,7 +43,7 @@
form
 
 (define* (make-syntactic-constructor type name ctor fields
- #:key thunked defaults)
+ #:key (thunked '()) (defaults '()))
   Make the syntactic constructor NAME for TYPE, that calls CTOR, and expects
 all of FIELDS to be initialized.  DEFAULTS is the list of FIELD/DEFAULT-VALUE
 tuples, and THUNKED is the list of identifiers of thunked fields.



01/01: guix package: Avoid spurious warnings from 'find-files'.

2015-01-20 Thread Ludovic Courts
civodul pushed a commit to branch master
in repository guix.

commit 1a0965045bfa7eb277efb0cd8c3513b5c03ba810
Author: Ludovic Courtès l...@gnu.org
Date:   Tue Jan 20 22:26:15 2015 +0100

guix package: Avoid spurious warnings from 'find-files'.

Reported by Andreas Enge andr...@enge.fr.

* guix/scripts/package.scm (with-null-error-port): New macro.
  (search-path-environment-variables): Wrap 'search-path-as-list' call
  in 'with-null-error-port'.
---
 guix/scripts/package.scm |   18 ++
 1 files changed, 14 insertions(+), 4 deletions(-)

diff --git a/guix/scripts/package.scm b/guix/scripts/package.scm
index 30b0658..1ff898d 100644
--- a/guix/scripts/package.scm
+++ b/guix/scripts/package.scm
@@ -1,5 +1,5 @@
 ;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2012, 2013, 2014 Ludovic Courtès l...@gnu.org
+;;; Copyright © 2012, 2013, 2014, 2015 Ludovic Courtès l...@gnu.org
 ;;; Copyright © 2013 Nikita Karetnikov nik...@karetnikov.org
 ;;; Copyright © 2013 Mark H Weaver m...@netris.org
 ;;; Copyright © 2014 Alex Kost alez...@gmail.com
@@ -331,6 +331,11 @@ an output path different than CURRENT-PATH.
 ;;; Search paths.
 ;;;
 
+(define-syntax-rule (with-null-error-port exp)
+  Evaluate EXP with the error port pointing to the bit bucket.
+  (with-error-to-port (%make-void-port w)
+(lambda () exp)))
+
 (define* (search-path-environment-variables entries profile
 #:optional (getenv getenv))
   Return environment variable definitions that may be needed for the use of
@@ -373,9 +378,14 @@ current settings and report only settings not already 
effective.
(files  (if pattern
(map (cut string-append  /) files)
files))
-   (path   (search-path-as-list files (list profile)
-#:type type
-#:pattern pattern)))
+
+   ;; XXX: Silence 'find-files' when it stumbles upon non-existent
+   ;; directories (see
+   ;; 
http://lists.gnu.org/archive/html/guix-devel/2015-01/msg00269.html.)
+   (path   (with-null-error-port
+(search-path-as-list files (list profile)
+ #:type type
+ #:pattern pattern
   (if (every (cut member  values) path)
   #f
   (format #f export ~a=\~a\



branch master updated (0341199 - 1a09650)

2015-01-20 Thread Ludovic Courts
civodul pushed a change to branch master
in repository guix.

  from  0341199   gnu: Add python-isodate.
   new  1a09650   guix package: Avoid spurious warnings from 'find-files'.

The 1 revisions listed above as new are entirely new to this
repository and will be described in separate emails.  The revisions
listed as adds were already present in the repository and have only
been added to this reference.


Summary of changes:
 guix/scripts/package.scm |   18 ++
 1 files changed, 14 insertions(+), 4 deletions(-)



branch master updated (ca8343b - 3698f52)

2015-01-21 Thread Ludovic Courts
civodul pushed a change to branch master
in repository guix.

  from  ca8343b   gnu: phonon: Shuffle inputs.
   new  a101c89   gnu: libtool: Update to 2.4.5.
   new  3698f52   store: Change 'run-with-store' to return a single value.

The 2 revisions listed above as new are entirely new to this
repository and will be described in separate emails.  The revisions
listed as adds were already present in the repository and have only
been added to this reference.


Summary of changes:
 gnu/packages/autotools.scm |   16 
 guix/store.scm |8 ++--
 2 files changed, 18 insertions(+), 6 deletions(-)



02/02: store: Change 'run-with-store' to return a single value.

2015-01-21 Thread Ludovic Courts
civodul pushed a commit to branch master
in repository guix.

commit 3698f524d5d1777aebec653c444783800a70417a
Author: Ludovic Courtès l...@gnu.org
Date:   Wed Jan 21 19:31:10 2015 +0100

store: Change 'run-with-store' to return a single value.

* guix/store.scm (run-with-store): Wrap 'run-with-state' in
  'call-with-values'.  Return only the first value.
---
 guix/store.scm |8 ++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/guix/store.scm b/guix/store.scm
index 63425b3..a12abc8 100644
--- a/guix/store.scm
+++ b/guix/store.scm
@@ -917,10 +917,14 @@ permission bits are kept.
  (guile-for-build (%guile-for-build))
  (system (%current-system)))
   Run MVAL, a monadic value in the store monad, in STORE, an open store
-connection.
+connection, and return the result.
   (parameterize ((%guile-for-build guile-for-build)
  (%current-system system))
-(run-with-state mval store)))
+(call-with-values (lambda ()
+(run-with-state mval store))
+  (lambda (result store)
+;; Discard the state.
+result
 
 
 ;;;



01/02: gnu: libtool: Update to 2.4.5.

2015-01-21 Thread Ludovic Courts
civodul pushed a commit to branch master
in repository guix.

commit a101c891e1164ecb30145c798f441c285ec139ad
Author: Ludovic Courtès l...@gnu.org
Date:   Wed Jan 21 19:30:28 2015 +0100

gnu: libtool: Update to 2.4.5.

* gnu/packages/autotools.scm (libtool): Update to 2.4.5.
  (libltdl): Adjust 'version' and 'source' to remain at 2.4.4.
---
 gnu/packages/autotools.scm |   16 
 1 files changed, 12 insertions(+), 4 deletions(-)

diff --git a/gnu/packages/autotools.scm b/gnu/packages/autotools.scm
index 8e72562..7f20b26 100644
--- a/gnu/packages/autotools.scm
+++ b/gnu/packages/autotools.scm
@@ -238,14 +238,14 @@ Makefile, simplifying the entire process for the 
developer.)
 (define-public libtool
   (package
 (name libtool)
-(version 2.4.4)
+(version 2.4.5)
 (source (origin
   (method url-fetch)
   (uri (string-append mirror://gnu/libtool/libtool-
   version .tar.xz))
   (sha256
(base32
-0v3zq08qxv7k5067mpqrkjkjl3wphhg06i696mka90mzadc5nad8))
+0zhphv4n9bdd6sz66lqfrfqcsnv89mg2bykgi5w9401va4vc3al4))
   (patches
(list (search-patch libtool-skip-tests.patch)
 (build-system gnu-build-system)
@@ -295,8 +295,16 @@ complexity of working with shared libraries across 
platforms.)
   ;; Libtool's extensive test suite isn't run.
   (package
 (name libltdl)
-(version (package-version libtool))
-(source (package-source libtool))
+(version 2.4.4)
+(source (origin
+  (method url-fetch)
+  (uri (string-append mirror://gnu/libtool/libtool-
+  version .tar.xz))
+  (sha256
+   (base32
+0v3zq08qxv7k5067mpqrkjkjl3wphhg06i696mka90mzadc5nad8))
+  (patches
+   (list (search-patch libtool-skip-tests.patch)
 (build-system gnu-build-system)
 (arguments
  '(#:configure-flags '(--enable-ltdl-install) ;really install it



01/03: monads: Add the state monad.

2015-01-17 Thread Ludovic Courts
civodul pushed a commit to branch master
in repository guix.

commit 81a97734e04fa40412b2d44ccfae1b4796257648
Author: Ludovic Courtès l...@gnu.org
Date:   Sat Jan 17 18:46:41 2015 +0100

monads: Add the state monad.

* guix/monads.scm (state-return, state-bind, run-with-state,
  current-state, set-current-state, state-push, state-pop): New
  procedures.
  (%state-monad): New variable.
* tests/monads.scm (%monads): Add %STATE-MONAD.
  (%monad-run): Add 'run-with-state'.
  (values-list): New macro.
  (set-current-state, state-push etc.): New tests.
---
 .dir-locals.el   |1 +
 guix/monads.scm  |   65 +-
 tests/monads.scm |   35 +++-
 3 files changed, 98 insertions(+), 3 deletions(-)

diff --git a/.dir-locals.el b/.dir-locals.el
index b099068..b82d049 100644
--- a/.dir-locals.el
+++ b/.dir-locals.el
@@ -51,6 +51,7 @@
(eval . (put 'mlet* 'scheme-indent-function 2))
(eval . (put 'mlet 'scheme-indent-function 2))
(eval . (put 'run-with-store 'scheme-indent-function 1))
+   (eval . (put 'run-with-state 'scheme-indent-function 1))
 
;; Recognize '~', '+', and '$', as used for gexps, as quotation symbols.
;; This notably allows '(' in Paredit to not insert a space when the
diff --git a/guix/monads.scm b/guix/monads.scm
index 7fec3d5..f97f4ad 100644
--- a/guix/monads.scm
+++ b/guix/monads.scm
@@ -46,7 +46,16 @@
 anym
 
 ;; Concrete monads.
-%identity-monad))
+%identity-monad
+
+%state-monad
+state-return
+state-bind
+current-state
+set-current-state
+state-push
+state-pop
+run-with-state))
 
 ;;; Commentary:
 ;;;
@@ -291,4 +300,58 @@ lifted in MONAD, for which PROC returns true.
   (bind   identity-bind)
   (return identity-return))
 
+
+;;;
+;;; State monad.
+;;;
+
+(define-inlinable (state-return value)
+  (lambda (state)
+(values value state)))
+
+(define-inlinable (state-bind mvalue mproc)
+  Bind MVALUE, a value in the state monad, and pass it to MPROC.
+  (lambda (state)
+(call-with-values
+(lambda ()
+  (mvalue state))
+  (lambda (value state)
+;; Note: as of Guile 2.0.11, declaring a variable to hold the result
+;; of (mproc value) prevents a bit of unfolding/inlining.
+((mproc value) state)
+
+(define-monad %state-monad
+  (bind state-bind)
+  (return state-return))
+
+(define* (run-with-state mval #:optional (state '()))
+  Run monadic value MVAL starting with STATE as the initial state.  Return
+two values: the resulting value, and the resulting state.
+  (mval state))
+
+(define-inlinable (current-state)
+  Return the current state as a monadic value.
+  (lambda (state)
+(values state state)))
+
+(define-inlinable (set-current-state value)
+  Set the current state to VALUE and return the previous state as a monadic
+value.
+  (lambda (state)
+(values state value)))
+
+(define (state-pop)
+  Pop a value from the current state and return it as a monadic value.  The
+state is assumed to be a list.
+  (lambda (state)
+(match state
+  ((head . tail)
+   (values head tail)
+
+(define (state-push value)
+  Push VALUE to the current state, which is assumed to be a list, and return
+the previous state as a monadic value.
+  (lambda (state)
+(values state (cons value state
+
 ;;; monads.scm end here
diff --git a/tests/monads.scm b/tests/monads.scm
index 347a255..57a8e66 100644
--- a/tests/monads.scm
+++ b/tests/monads.scm
@@ -37,11 +37,16 @@
   (open-connection-for-tests))
 
 (define %monads
-  (list %identity-monad %store-monad))
+  (list %identity-monad %store-monad %state-monad))
 
 (define %monad-run
   (list identity
-(cut run-with-store %store )))
+(cut run-with-store %store )
+(cut run-with-state  '(
+
+(define-syntax-rule (values-list exp)
+  (call-with-values (lambda () exp)
+list))
 
 
 (test-begin monads)
@@ -206,6 +211,32 @@
  %monads
  %monad-run))
 
+(test-equal set-current-state
+  (list '(a a d) 'd)
+  (values-list
+   (run-with-state
+   (mlet* %state-monad ((init  (current-state))
+(init2 (set-current-state 'b)))
+ (mbegin %state-monad
+   (set-current-state 'c)
+   (set-current-state 'd)
+   (mlet %state-monad ((last (current-state)))
+ (return (list init init2 last)
+ 'a)))
+
+(test-equal state-push etc.
+  (list '((z . 2) (p . (1)) (a . (1))) '(2 1))
+  (values-list
+   (run-with-state
+   (mbegin %state-monad
+ (state-push 1);(1)
+ (state-push 2);(2 1)
+ (mlet* %state-monad ((z (state-pop));(1)
+  (p (current-state))
+  (a (state-push z)));(2 1)
+   (return `((z . ,z) (p . ,p) (a . 

branch master updated (5db3719 - 561fb6c)

2015-01-17 Thread Ludovic Courts
civodul pushed a change to branch master
in repository guix.

  from  5db3719   gnu: linux-libre: Update to 3.18.3
   new  81a9773   monads: Add the state monad.
   new  4e190c2   store: Make '%store-monad' an alias for '%state-monad'.
   new  561fb6c   doc: Document '%state-monad' and update '%store-monad' 
description.

The 3 revisions listed above as new are entirely new to this
repository and will be described in separate emails.  The revisions
listed as adds were already present in the repository and have only
been added to this reference.


Summary of changes:
 .dir-locals.el|1 +
 doc/guix.texi |   64 ---
 guix/monads.scm   |   71 
 guix/packages.scm |9 +++---
 guix/store.scm|   38 +++-
 tests/monads.scm  |   35 -
 6 files changed, 178 insertions(+), 40 deletions(-)



02/03: store: Make '%store-monad' an alias for '%state-monad'.

2015-01-17 Thread Ludovic Courts
civodul pushed a commit to branch master
in repository guix.

commit 4e190c2803be09ea7d500087cb1a2e3efeb27ab5
Author: Ludovic Courtès l...@gnu.org
Date:   Sat Jan 17 23:19:13 2015 +0100

store: Make '%store-monad' an alias for '%state-monad'.

* guix/store.scm (define-alias): New macro.
  (%store-monad, store-return, store-bind): Define as aliases of the
  corresponding %STATE-MONAD part.
  (store-lift, text-file, interned-file): Return STORE as a second
  value.
  (run-with-store): Use 'run-with-state'.
* guix/packages.scm (set-guile-for-build, package-file): Return STORE as
  a second value.
* guix/monads.scm: Remove part of the module commentary.
---
 guix/monads.scm   |4 
 guix/packages.scm |9 +
 guix/store.scm|   38 +++---
 3 files changed, 20 insertions(+), 31 deletions(-)

diff --git a/guix/monads.scm b/guix/monads.scm
index f97f4ad..62397da 100644
--- a/guix/monads.scm
+++ b/guix/monads.scm
@@ -67,10 +67,6 @@
 ;;; Monadic Programming in Scheme (see
 ;;; http://okmij.org/ftp/Scheme/monad-in-Scheme.html).
 ;;;
-;;; The store monad allows us to (1) build sequences of operations in the
-;;; store, and (2) make the store an implicit part of the execution context,
-;;; rather than a parameter of every single function.
-;;;
 ;;; Code:
 
 ;; Record type for monads manipulated at run time.
diff --git a/guix/packages.scm b/guix/packages.scm
index db14f9e..de87681 100644
--- a/guix/packages.scm
+++ b/guix/packages.scm
@@ -898,7 +898,7 @@ symbolic output name, such as \out\.  Note that this 
procedure calls
 code of derivations to GUILE, a package object.
   (lambda (store)
 (let ((guile (package-derivation store guile)))
-  (%guile-for-build guile
+  (values (%guile-for-build guile) store
 
 (define* (package-file package
#:optional file
@@ -917,9 +917,10 @@ cross-compilation target triplet.
 (let* ((system (or system (%current-system)))
(drv(compute-derivation store package system))
(out(derivation-output-path drv output)))
-  (if file
-  (string-append out / file)
-  out
+  (values (if file
+  (string-append out / file)
+  out)
+  store
 
 (define package-derivation
   (store-lift package-derivation))
diff --git a/guix/store.scm b/guix/store.scm
index 6fd34bc..c3a1c57 100644
--- a/guix/store.scm
+++ b/guix/store.scm
@@ -852,25 +852,15 @@ be used internally by the daemon's build hook.
 ;;; Store monad.
 ;;;
 
-;; return:: a - StoreM a
-(define-inlinable (store-return value)
-  Return VALUE from a monadic function.
-  ;; The monadic value is just this.
-  (lambda (store)
-value))
-
-;; =:: StoreM a - (a - StoreM b) - StoreM b
-(define-inlinable (store-bind mvalue mproc)
-  Bind MVALUE in MPROC.
-  (lambda (store)
-(let* ((value   (mvalue store))
-   (mresult (mproc value)))
-  (mresult store
+(define-syntax-rule (define-alias new old)
+  (define-syntax new (identifier-syntax old)))
 
-;; This is essentially a state monad
-(define-monad %store-monad
-  (bind   store-bind)
-  (return store-return))
+;; The store monad allows us to (1) build sequences of operations in the
+;; store, and (2) make the store an implicit part of the execution context,
+;; rather than a parameter of every single function.
+(define-alias %store-monad %state-monad)
+(define-alias store-return state-return)
+(define-alias store-bind state-bind)
 
 (define (store-lift proc)
   Lift PROC, a procedure whose first argument is a connection to the store,
@@ -878,7 +868,7 @@ in the store monad.
   (define result
 (lambda args
   (lambda (store)
-(apply proc store args
+(values (apply proc store args) store
 
   (set-object-property! result 'documentation
 (procedure-property proc 'documentation))
@@ -898,7 +888,8 @@ taking the store as its first argument.
   Return as a monadic value the absolute file name in the store of the file
 containing TEXT, a string.
   (lambda (store)
-(add-text-to-store store name text '(
+(values (add-text-to-store store name text '())
+store)))
 
 (define* (interned-file file #:optional name
 #:key (recursive? #t))
@@ -909,8 +900,9 @@ When RECURSIVE? is true, the contents of FILE are added 
recursively; if FILE
 designates a flat file and RECURSIVE? is true, its contents are added, and its
 permission bits are kept.
   (lambda (store)
-(add-to-store store (or name (basename file))
-  recursive? sha256 file)))
+(values (add-to-store store (or name (basename file))
+  recursive? sha256 file)
+store)))
 
 (define %guile-for-build
   ;; The derivation of the Guile to be used within the build environment,
@@ -925,7 +917,7 @@ permission bits are kept.
 connection.
   (parameterize 

03/03: doc: Document '%state-monad' and update '%store-monad' description.

2015-01-17 Thread Ludovic Courts
civodul pushed a commit to branch master
in repository guix.

commit 561fb6c31fbbc9ae91bc2ce338cefc841b284644
Author: Ludovic Courtès l...@gnu.org
Date:   Sat Jan 17 23:43:41 2015 +0100

doc: Document '%state-monad' and update '%store-monad' description.

* doc/guix.texi (The Store Monad): Document '%state-monad' and related
  procedures.  Describe '%store-monad' as an alias for '%state-monad'.
* guix/monads.scm: Update commentary.
---
 doc/guix.texi   |   64 ++
 guix/monads.scm |2 +-
 2 files changed, 60 insertions(+), 6 deletions(-)

diff --git a/doc/guix.texi b/doc/guix.texi
index 50388c5..857653d 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -2148,7 +2148,7 @@ provides a framework for working with @dfn{monads}, and a 
particularly
 useful monad for our uses, the @dfn{store monad}.  Monads are a
 construct that allows two things: associating ``context'' with values
 (in our case, the context is the store), and building sequences of
-computations (here computations includes accesses to the store.)  Values
+computations (here computations include accesses to the store.)  Values
 in a monad---values that carry this additional context---are called
 @dfn{monadic values}; procedures that return such values are called
 @dfn{monadic procedures}.
@@ -2257,14 +2257,68 @@ monadic expressions are ignored.  In that sense, it is 
analogous to
 @code{begin}, but applied to monadic expressions.
 @end deffn
 
+@cindex state monad
+The @code{(guix monads)} module provides the @dfn{state monad}, which
+allows an additional value---the state---to be @emph{threaded} through
+monadic procedure calls.
+
+@defvr {Scheme Variable} %state-monad
+The state monad.  Procedures in the state monad can access and change
+the state that is threaded.
+
+Consider the example below.  The @code{square} procedure returns a value
+in the state monad.  It returns the square of its argument, but also
+increments the current state value:
+
+@example
+(define (square x)
+  (mlet %state-monad ((count (current-state)))
+(mbegin %state-monad
+  (set-current-state (+ 1 count))
+  (return (* x x)
+
+(run-with-state (sequence %state-monad (map square (iota 3))) 0)
+@result{} (0 1 4)
+@result{} 3
+@end example
+
+When ``run'' through @var{%state-monad}, we obtain that additional state
+value, which is the number of @code{square} calls.
+@end defvr
+
+@deffn {Monadic Procedure} current-state
+Return the current state as a monadic value.
+@end deffn
+
+@deffn {Monadic Procedure} set-current-state @var{value}
+Set the current state to @var{value} and return the previous state as a
+monadic value.
+@end deffn
+
+@deffn {Monadic Procedure} state-push @var{value}
+Push @var{value} to the current state, which is assumed to be a list,
+and return the previous state as a monadic value.
+@end deffn
+
+@deffn {Monadic Procedure} state-pop
+Pop a value from the current state and return it as a monadic value.
+The state is assumed to be a list.
+@end deffn
+
+@deffn {Scheme Procedure} run-with-state @var{mval} [@var{state}]
+Run monadic value @var{mval} starting with @var{state} as the initial
+state.  Return two values: the resulting value, and the resulting state.
+@end deffn
+
 The main interface to the store monad, provided by the @code{(guix
 store)} module, is as follows.
 
 @defvr {Scheme Variable} %store-monad
-The store monad.  Values in the store monad encapsulate accesses to the
-store.  When its effect is needed, a value of the store monad must be
-``evaluated'' by passing it to the @code{run-with-store} procedure (see
-below.)
+The store monad---an alias for @var{%state-monad}.
+
+Values in the store monad encapsulate accesses to the store.  When its
+effect is needed, a value of the store monad must be ``evaluated'' by
+passing it to the @code{run-with-store} procedure (see below.)
 @end defvr
 
 @deffn {Scheme Procedure} run-with-store @var{store} @var{mval} 
[#:guile-for-build] [#:system (%current-system)]
diff --git a/guix/monads.scm b/guix/monads.scm
index 62397da..5bb860a 100644
--- a/guix/monads.scm
+++ b/guix/monads.scm
@@ -60,7 +60,7 @@
 ;;; Commentary:
 ;;;
 ;;; This module implements the general mechanism of monads, and provides in
-;;; particular an instance of the store monad.  The API was inspired by that
+;;; particular an instance of the state monad.  The API was inspired by that
 ;;; of Racket's better-monads module (see
 ;;; 
http://planet.racket-lang.org/package-source/toups/functional.plt/1/1/planet-docs/better-monads-guide/index.html).
 ;;; The implementation and use case were influenced by Oleg Kysielov's



02/02: gnu: emms: Let the build system install emms-print-metadata.1.

2015-01-19 Thread Ludovic Courts
civodul pushed a commit to branch master
in repository guix.

commit c72aed6d8c000efcc4cd3a912b13773e9ed46453
Author: Ludovic Courtès l...@gnu.org
Date:   Mon Jan 19 16:37:05 2015 +0100

gnu: emms: Let the build system install emms-print-metadata.1.

Reported by effa`` on #guix.

* gnu/packages/emacs.scm (emms)[arguments] pre-install: Remove
  'copy-file' invocation.
---
 gnu/packages/emacs.scm |   12 +---
 1 files changed, 5 insertions(+), 7 deletions(-)

diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm
index 9ccf34c..f4d7ac9 100644
--- a/gnu/packages/emacs.scm
+++ b/gnu/packages/emacs.scm
@@ -1,6 +1,6 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2014 Taylan Ulrich Bayirli/Kammer taylanbayi...@gmail.com
-;;; Copyright © 2013, 2014 Ludovic Courtès l...@gnu.org
+;;; Copyright © 2013, 2014, 2015 Ludovic Courtès l...@gnu.org
 ;;; Copyright © 2014 Mark H Weaver m...@netris.org
 ;;; Copyright © 2014 Alex Kost alez...@gmail.com
 ;;;
@@ -482,13 +482,12 @@ operations.)
  (alist-cons-before
   'install 'pre-install
   (lambda* (#:key outputs #:allow-other-keys)
-;; The 'install' rule expects 'emms-print-metadata.1' to
-;; be already installed.
+;; The 'install' rule expects the target directory to
+;; exist.
 (let* ((out  (assoc-ref outputs out))
(man1 (string-append out /share/man/man1)))
   (mkdir-p man1)
-  (copy-file emms-print-metadata.1
- (string-append man1 
/emms-print-metadata.1
+  #t))
   (alist-cons-after
'install 'post-install
(lambda* (#:key outputs #:allow-other-keys)
@@ -505,8 +504,7 @@ operations.)
#:tests? #f))
 (native-inputs `((emacs ,emacs);for (guix build emacs-utils)
  (texinfo ,texinfo)))
-(inputs `(;(perl ,perl) ;for 'emms-print-metadata.pl'
-  (alsa-utils ,alsa-utils)
+(inputs `((alsa-utils ,alsa-utils)
   (vorbis-tools ,vorbis-tools)
   (mpg321 ,mpg321)
   (taglib ,taglib)



branch master updated (5100231 - c72aed6)

2015-01-19 Thread Ludovic Courts
civodul pushed a change to branch master
in repository guix.

  from  5100231   gnu: Add CUPS.
   new  d35c5e2   tests: Adjust syscall tests for 2.6ish Linux.
   new  c72aed6   gnu: emms: Let the build system install 
emms-print-metadata.1.

The 2 revisions listed above as new are entirely new to this
repository and will be described in separate emails.  The revisions
listed as adds were already present in the repository and have only
been added to this reference.


Summary of changes:
 gnu/packages/emacs.scm |   12 +---
 tests/syscalls.scm |   14 +++---
 2 files changed, 12 insertions(+), 14 deletions(-)



01/02: tests: Adjust syscall tests for 2.6ish Linux.

2015-01-19 Thread Ludovic Courts
civodul pushed a commit to branch master
in repository guix.

commit d35c5e29b6cae013aa0f4e8b075670010b9c9ce1
Author: Ludovic Courtès l...@gnu.org
Date:   Mon Jan 19 15:44:12 2015 +0100

tests: Adjust syscall tests for 2.6ish Linux.

* tests/syscalls.scm (set-network-interface-flags,
  set-network-interface-address): Accept EACCES as a valid result.
---
 tests/syscalls.scm |   14 +++---
 1 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/tests/syscalls.scm b/tests/syscalls.scm
index 21d6637..f26331e 100644
--- a/tests/syscalls.scm
+++ b/tests/syscalls.scm
@@ -1,5 +1,5 @@
 ;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2014 Ludovic Courtès l...@gnu.org
+;;; Copyright © 2014, 2015 Ludovic Courtès l...@gnu.org
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -91,15 +91,15 @@
(system-error-errno args)
 
 (test-skip (if (zero? (getuid)) 1 0))
-(test-equal set-network-interface-flags
-  EPERM
+(test-assert set-network-interface-flags
   (let ((sock (socket AF_INET SOCK_STREAM 0)))
 (catch 'system-error
   (lambda ()
 (set-network-interface-flags sock lo IFF_UP))
   (lambda args
 (close-port sock)
-(system-error-errno args)
+;; We get EPERM with Linux 3.18ish and EACCES with 2.6.32.
+(memv (system-error-errno args) (list EPERM EACCES))
 
 (test-equal network-interface-address lo
   (make-socket-address AF_INET (inet-pton AF_INET 127.0.0.1) 0)
@@ -108,8 +108,7 @@
 (close-port sock)
 addr))
 
-(test-equal set-network-interface-address
-  EPERM
+(test-assert set-network-interface-address
   (let ((sock (socket AF_INET SOCK_STREAM 0)))
 (catch 'system-error
   (lambda ()
@@ -120,7 +119,8 @@
 0)))
   (lambda args
 (close-port sock)
-(system-error-errno args)
+;; We get EPERM with Linux 3.18ish and EACCES with 2.6.32.
+(memv (system-error-errno args) (list EPERM EACCES))
 
 (test-end)
 



branch core-updates updated (54e6128 - df5188d)

2015-01-14 Thread Ludovic Courts
civodul pushed a change to branch core-updates
in repository guix.

  from  54e6128   gnu: tre: Build a locale for the tests.
   new  58caebf   build: Use the canonical list of supported systems in 
'assert-*'.
   new  619c952   check-available-binaries: Use 'with-store'.
   new  df5188d   check-available-binaries: Use 'substitution-oracle'.

The 3 revisions listed above as new are entirely new to this
repository and will be described in separate emails.  The revisions
listed as adds were already present in the repository and have only
been added to this reference.


Summary of changes:
 build-aux/check-available-binaries.scm  |   53 +++
 build-aux/check-final-inputs-self-contained.scm |5 +--
 2 files changed, 26 insertions(+), 32 deletions(-)



03/03: check-available-binaries: Use 'substitution-oracle'.

2015-01-14 Thread Ludovic Courts
civodul pushed a commit to branch core-updates
in repository guix.

commit df5188ddfa0c004009c7fcb0ce09a27bb50b9a59
Author: Ludovic Courtès l...@gnu.org
Date:   Wed Jan 14 18:28:46 2015 +0100

check-available-binaries: Use 'substitution-oracle'.

* build-aux/check-available-binaries.scm: Use 'substitution-oracle'.
  Changer caller and 'warn' accordingly.
---
 build-aux/check-available-binaries.scm |   20 ++--
 1 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/build-aux/check-available-binaries.scm 
b/build-aux/check-available-binaries.scm
index ebe94d2..7ac4352 100644
--- a/build-aux/check-available-binaries.scm
+++ b/build-aux/check-available-binaries.scm
@@ -37,18 +37,18 @@
%bootstrap-tarballs )
   '(mips64el-linux-gnuabi64)))
  (total  (append native cross)))
-(define (warn proc)
-  (lambda (drv)
-(or (proc drv)
-(begin
-  (format (current-error-port) ~a is not substitutable~%
-  drv)
-  #f
+(define (warn item system)
+  (format (current-error-port) ~a (~a) is not substitutable~%
+  item system)
+  #f)
 
 (set-build-options store #:use-substitutes? #t)
-(let ((result (every (compose (warn (cut has-substitutes? store ))
-  derivation-output-path)
- total)))
+(let* ((substitutable? (substitution-oracle store total))
+   (result (every (lambda (drv)
+(let ((out (derivation-output-path drv)))
+  (or (substitutable? out)
+  (warn out (derivation-system drv)
+  total)))
   (when result
 (format (current-error-port) ~a packages found substitutable~%
 (length total)))



<    3   4   5   6   7   8   9   10   11   12   >