guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] gnu: bind-utils: Build and install “nsupdate”.


From: Mathieu Lirzin
Subject: Re: [PATCH] gnu: bind-utils: Build and install “nsupdate”.
Date: Thu, 14 Jan 2016 01:46:41 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)

Hi,

Ricardo Wurmus <address@hidden> writes:

>>From ba328617777728c3534be6796b6b32a9a90954b6 Mon Sep 17 00:00:00 2001
> From: Ricardo Wurmus <address@hidden>
> Date: Wed, 13 Jan 2016 16:06:36 +0100
> Subject: [PATCH] gnu: bind-utils: Build and install "nsupdate".
>
> * gnu/packages/dns.scm (bind-utils)[arguments]: Generalize "build" and
>   "install" phases.
> ---
>  gnu/packages/dns.scm | 105 
> ++++++++++++++++++++++++++++-----------------------
>  1 file changed, 58 insertions(+), 47 deletions(-)
>
> diff --git a/gnu/packages/dns.scm b/gnu/packages/dns.scm
> index 8357dad..0a42722 100644
> --- a/gnu/packages/dns.scm
> +++ b/gnu/packages/dns.scm
[...]
> +      (arguments
> +       `(#:tests? #f ; no test phase implemented
> +         #:configure-flags
> +         (list (string-append "--with-openssl="
> +                              (assoc-ref %build-inputs "openssl"))
> +               (string-append "--with-dlz-mysql="
> +                              (assoc-ref %build-inputs "mysql"))
> +               (string-append "--with-pkcs11="
> +                              (assoc-ref %build-inputs "p11-kit")))

What about:

       #:configure-flags
       (map (lambda (opt val)
              (string-append opt (assoc-ref %build-inputs val)))
            '("--with-openssl=" "--with-dlz-mysql=" "--with-pkcs11=")
            '("openssl" "mysql" "p11-kit"))

> +         #:modules ((srfi srfi-1)
> +                    (srfi srfi-26)
> +                    ,@%gnu-build-system-modules)
> +         #:phases
> +         (modify-phases %standard-phases
> +           (replace 'build
> +             (lambda _
> +               (fold (lambda (dir pass)
> +                       (and pass (zero? (system* "make" "-C" dir))))
> +                     #t
> +                     (append
> +                      (map (cut string-append "lib/" <>)
> +                           (list ,@libs))
> +                      (map (cut string-append "bin/" <>)
> +                           (list ,@bins))))))
> +           (replace 'install
> +             (lambda _
> +               (fold (lambda (dir pass)
> +                       (and pass (zero? (system* "make" "-C" dir 
> "install"))))
> +                     #t
> +                     (map (cut string-append "bin/" <>)
> +                          (list ,@bins))))))))

and this:

       (let ((libs '("dns" "isc" "bind9" "isccfg" "lwres"))
             (bins '("dig" "nsupdate")))
         (modify-phases %standard-phases
           (replace 'build
             (lambda _
               (every (lambda (dir)
                        (zero? (system* "make" "-C" dir)))
                      (append (map (cut string-append "lib/" <>) libs)
                              (map (cut string-append "bin/" <>) bins)))))
           (replace 'install
             (lambda _
               (every (lambda (dir)
                        (zero? (system* "make" "-C" dir "install")))
                      (map (cut string-append "bin/" <>) bins))))))))


Otherwise LGTM.

--
Mathieu Lirzin



reply via email to

[Prev in Thread] Current Thread [Next in Thread]