[1/2] gnu: man-db: Use modify-phases syntax.

Message ID 20160907084707.11557-1-rekado@elephly.net
State New
Headers

Commit Message

Ricardo Wurmus Sept. 7, 2016, 8:47 a.m. UTC
  * gnu/packages/man.scm (man-db)[arguments]: Use modify-phases syntax.
---
 gnu/packages/man.scm | 25 ++++++++++++-------------
 1 file changed, 12 insertions(+), 13 deletions(-)
  

Comments

Efraim Flashner Sept. 7, 2016, 9:05 a.m. UTC | #1
On Wed, Sep 07, 2016 at 10:47:06AM +0200, Ricardo Wurmus wrote:
> * gnu/packages/man.scm (man-db)[arguments]: Use modify-phases syntax.
> ---
>  gnu/packages/man.scm | 25 ++++++++++++-------------
>  1 file changed, 12 insertions(+), 13 deletions(-)
> 
> diff --git a/gnu/packages/man.scm b/gnu/packages/man.scm
> index 9ffbba9..a5ee2d3 100644
> --- a/gnu/packages/man.scm
> +++ b/gnu/packages/man.scm
> @@ -1,7 +1,7 @@
>  ;;; GNU Guix --- Functional package management for GNU
>  ;;; Copyright © 2012, 2014, 2015 Ludovic Courtès <ludo@gnu.org>
>  ;;; Copyright © 2014 David Thompson <dthompson2@worcester.edu>
> -;;; Copyright © 2015 Ricardo Wurmus <rekado@elephly.net>
> +;;; Copyright © 2015, 2016 Ricardo Wurmus <rekado@elephly.net>
>  ;;; Copyright © 2015 Alex Kost <alezost@gmail.com>
>  ;;; Copyright © 2015, 2016 Efraim Flashner <efraim@flashner.co.il>
>  ;;;
> @@ -69,18 +69,17 @@ a flexible and convenient way.")
>      (build-system gnu-build-system)
>      (arguments
>       '(#:phases
> -       (alist-cons-after
> -        'patch-source-shebangs 'patch-test-shebangs
> -        (lambda* (#:key outputs #:allow-other-keys)
> -          ;; Patch shebangs in test scripts.
> -          (let ((out (assoc-ref outputs "out")))
> -            (for-each (lambda (file)
> -                        (substitute* file
> -                          (("#! /bin/sh")
> -                           (string-append "#!" (which "sh")))))
> -                      (remove file-is-directory?
> -                              (find-files "src/tests" ".*")))))
> -        %standard-phases)
> +       (modify-phases %standard-phases
> +         (add-after 'patch-source-shebangs 'patch-test-shebangs
> +           (lambda* (#:key outputs #:allow-other-keys)
> +             ;; Patch shebangs in test scripts.
> +             (let ((out (assoc-ref outputs "out")))
> +               (for-each (lambda (file)
> +                           (substitute* file
> +                             (("#! /bin/sh")
> +                              (string-append "#!" (which "sh")))))
> +                         (remove file-is-directory?
> +                                 (find-files "src/tests" ".*")))))))
>         #:configure-flags
>         (let ((groff (assoc-ref %build-inputs "groff"))
>               (less  (assoc-ref %build-inputs "less"))
> -- 
> 2.9.2
> 

The patches look good to me. Also my quick test didn't show it causing
mass rebuilds.
  
Ludovic Courtès Sept. 7, 2016, 1:32 p.m. UTC | #2
Efraim Flashner <efraim@flashner.co.il> skribis:

> On Wed, Sep 07, 2016 at 10:47:06AM +0200, Ricardo Wurmus wrote:
>> * gnu/packages/man.scm (man-db)[arguments]: Use modify-phases syntax.

[...]

> The patches look good to me. Also my quick test didn't show it causing
> mass rebuilds.

Same here.

Thanks for finding out what the problem was!

Ludo’.
  
Ricardo Wurmus Sept. 7, 2016, 6:56 p.m. UTC | #3
Ludovic Courtès <ludo@gnu.org> writes:

> Efraim Flashner <efraim@flashner.co.il> skribis:
>
>> On Wed, Sep 07, 2016 at 10:47:06AM +0200, Ricardo Wurmus wrote:
>>> * gnu/packages/man.scm (man-db)[arguments]: Use modify-phases syntax.
>
> [...]
>
>> The patches look good to me. Also my quick test didn't show it causing
>> mass rebuilds.
>
> Same here.
>
> Thanks for finding out what the problem was!

Pushed as ea55a39530d6604cde07d5b23ba529a07a76ea7b.  Thanks!

~~ Ricardo
  

Patch

diff --git a/gnu/packages/man.scm b/gnu/packages/man.scm
index 9ffbba9..a5ee2d3 100644
--- a/gnu/packages/man.scm
+++ b/gnu/packages/man.scm
@@ -1,7 +1,7 @@ 
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2012, 2014, 2015 Ludovic Courtès <ludo@gnu.org>
 ;;; Copyright © 2014 David Thompson <dthompson2@worcester.edu>
-;;; Copyright © 2015 Ricardo Wurmus <rekado@elephly.net>
+;;; Copyright © 2015, 2016 Ricardo Wurmus <rekado@elephly.net>
 ;;; Copyright © 2015 Alex Kost <alezost@gmail.com>
 ;;; Copyright © 2015, 2016 Efraim Flashner <efraim@flashner.co.il>
 ;;;
@@ -69,18 +69,17 @@  a flexible and convenient way.")
     (build-system gnu-build-system)
     (arguments
      '(#:phases
-       (alist-cons-after
-        'patch-source-shebangs 'patch-test-shebangs
-        (lambda* (#:key outputs #:allow-other-keys)
-          ;; Patch shebangs in test scripts.
-          (let ((out (assoc-ref outputs "out")))
-            (for-each (lambda (file)
-                        (substitute* file
-                          (("#! /bin/sh")
-                           (string-append "#!" (which "sh")))))
-                      (remove file-is-directory?
-                              (find-files "src/tests" ".*")))))
-        %standard-phases)
+       (modify-phases %standard-phases
+         (add-after 'patch-source-shebangs 'patch-test-shebangs
+           (lambda* (#:key outputs #:allow-other-keys)
+             ;; Patch shebangs in test scripts.
+             (let ((out (assoc-ref outputs "out")))
+               (for-each (lambda (file)
+                           (substitute* file
+                             (("#! /bin/sh")
+                              (string-append "#!" (which "sh")))))
+                         (remove file-is-directory?
+                                 (find-files "src/tests" ".*")))))))
        #:configure-flags
        (let ((groff (assoc-ref %build-inputs "groff"))
              (less  (assoc-ref %build-inputs "less"))