From d4aaf954011646413e7c2ca39a34030821e84910 Mon Sep 17 00:00:00 2001
From: Ludovic Courtès <ludo@gnu.org>
Date: Wed, 6 Jan 2016 22:56:01 +0100
Subject: build-system/gnu: Make 'package-with-explicit-inputs' idempotent.

* guix/build-system/gnu.scm (package-with-explicit-inputs): Use
  'ensure-keyword-arguments' instead of appending to ARGS.
* gnu/packages/commencement.scm (static-bash-for-glibc): Add missing
  #:guile argument.
---
 guix/build-system/gnu.scm | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

(limited to 'guix/build-system')

diff --git a/guix/build-system/gnu.scm b/guix/build-system/gnu.scm
index c83c50b76e..9c53825c4a 100644
--- a/guix/build-system/gnu.scm
+++ b/guix/build-system/gnu.scm
@@ -96,10 +96,11 @@ builder, or the distro's final Guile when GUILE is #f."
     (package (inherit p)
       (location (if (pair? loc) (source-properties->location loc) loc))
       (arguments
-       (let ((args (package-arguments p)))
-         `(#:guile ,guile
-           #:implicit-inputs? #f
-           ,@args)))
+       ;; 'ensure-keyword-arguments' guarantees that this procedure is
+       ;; idempotent.
+       (ensure-keyword-arguments (package-arguments p)
+                                 `(#:guile ,guile
+                                   #:implicit-inputs? #f)))
       (replacement
        (let ((replacement (package-replacement p)))
          (and replacement
-- 
cgit v1.2.3


From 17ad0a2714271dd3567808637f451d86f1291cab Mon Sep 17 00:00:00 2001
From: Ludovic Courtès <ludo@gnu.org>
Date: Fri, 8 Jan 2016 19:06:26 +0100
Subject: build-system/python: 'pypi-uri' takes an optional file name
 extension.

Suggested by swedebugia <swedebugia@riseup.net>.

* guix/build-system/python.scm (pypi-uri): Add 'extension' parameter and
use it.
---
 guix/build-system/python.scm | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

(limited to 'guix/build-system')

diff --git a/guix/build-system/python.scm b/guix/build-system/python.scm
index 2532210a49..86efc1a715 100644
--- a/guix/build-system/python.scm
+++ b/guix/build-system/python.scm
@@ -1,5 +1,5 @@
 ;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2013, 2014, 2015 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2013, 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org>
 ;;; Copyright © 2013 Andreas Enge <andreas@enge.fr>
 ;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org>
 ;;;
@@ -41,12 +41,13 @@
 ;;
 ;; Code:
 
-(define (pypi-uri name version)
+(define* (pypi-uri name version #:optional (extension ".tar.gz"))
   "Return a URI string for the Python package hosted on the Python Package
-Index (PyPI) corresponding to NAME and VERSION."
+Index (PyPI) corresponding to NAME and VERSION.  EXTENSION is the file name
+extension, such as '.tar.gz'."
   (string-append "https://pypi.python.org/packages/source/"
                  (string-take name 1) "/" name "/"
-                 name "-" version ".tar.gz"))
+                 name "-" version extension))
 
 (define %python-build-system-modules
   ;; Build-side modules imported by default.
-- 
cgit v1.2.3


From b8a35309f848f676cf7d4b3bbec9b92de554e27a Mon Sep 17 00:00:00 2001
From: Ludovic Courtès <ludo@gnu.org>
Date: Wed, 13 Jan 2016 17:38:42 +0100
Subject: build-system/gnu: 'dist-package' can be passed the phases.

* guix/build-system/gnu.scm (dist-package): Add #:phases parameter and
honor it.
---
 guix/build-system/gnu.scm | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

(limited to 'guix/build-system')

diff --git a/guix/build-system/gnu.scm b/guix/build-system/gnu.scm
index 9c53825c4a..67ae46faed 100644
--- a/guix/build-system/gnu.scm
+++ b/guix/build-system/gnu.scm
@@ -178,9 +178,10 @@ use `--strip-all' as the arguments to `strip'."
               flags)))))
     (replacement (and=> (package-replacement p) static-package))))
 
-(define* (dist-package p source)
+(define* (dist-package p source #:key (phases '%dist-phases))
   "Return a package that runs takes source files from the SOURCE directory,
-runs `make distcheck' and whose result is one or more source tarballs."
+runs `make distcheck' and whose result is one or more source tarballs.  The
+exact build phases are defined by PHASES."
   (let ((s source))
     (package (inherit p)
       (name (string-append (package-name p) "-dist"))
@@ -199,7 +200,7 @@ runs `make distcheck' and whose result is one or more source tarballs."
             `((guix build gnu-dist)
               ,@modules))
            ((#:phases _)
-            '%dist-phases))))
+            phases))))
       (native-inputs
        ;; Add autotools & co. as inputs.
        (let ((ref (lambda (module var)
-- 
cgit v1.2.3