guix-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] gnu: whois: Move mkpasswd to its own output.


From: ng0
Subject: Re: [PATCH] gnu: whois: Move mkpasswd to its own output.
Date: Mon, 09 Jan 2017 10:28:24 +0000

Ludovic Courtès <address@hidden> writes:

> Hi!
>
> ng0 <address@hidden> skribis:
>
>> * gnu/packages/networking.scm (whois): Move mkpasswd to output "mkpasswd".
>> [outputs]: Add "mkpasswd".
>> [arguments]: Add new phase "move-mkpasswd".
>> Remove TODO comment about unbundling.
>> ---
>>  gnu/packages/networking.scm | 19 ++++++++++++++++---
>>  1 file changed, 16 insertions(+), 3 deletions(-)
>>
>> diff --git a/gnu/packages/networking.scm b/gnu/packages/networking.scm
>> index 3c7c07349..03165e62d 100644
>> --- a/gnu/packages/networking.scm
>> +++ b/gnu/packages/networking.scm
>> @@ -8,7 +8,7 @@
>>  ;;; Copyright © 2016 John Darrington <address@hidden>
>>  ;;; Copyright © 2016 Nicolas Goaziou <address@hidden>
>>  ;;; Copyright © 2016 Eric Bavier <address@hidden>
>> -;;; Copyright © 2016 ng0 <address@hidden>
>> +;;; Copyright © 2016, 2017 ng0 <address@hidden>
>>  ;;; Copyright © 2016 Arun Isaac <address@hidden>
>>  ;;; Copyright © 2016 Benz Schenk <address@hidden>
>>  ;;;
>> @@ -440,7 +440,6 @@ and up to 1 Mbit/s downstream.")
>>          (base32
>>           "0r3bbxpwsxssa99d8dcjnp79mw1cjwqxgmqjm1537q277jwsk0yc"))))
>>      (build-system gnu-build-system)
>> -    ;; TODO: unbundle mkpasswd binary + its po files.
>>      (arguments
>>       `(#:tests? #f ; Does not exist
>>         #:make-flags (list "CC=gcc"
>> @@ -452,7 +451,21 @@ and up to 1 Mbit/s downstream.")
>>             (lambda _
>>               (setenv "HAVE_ICONV" "1")
>>               (setenv "HAVE_LIBIDN" "1")
>> -             #t)))))
>> +             #t))
>> +         (add-after 'install 'move-mkpasswd
>> +                    (lambda* (#:key outputs #:allow-other-keys)
>> +                      ;; Move mkpasswd related files to "mkpasswd".
>> +                      (let ((out (assoc-ref outputs "out"))
>> +                            (mp (assoc-ref outputs "mkpasswd")))
>> +                        (mkdir-p (string-append mp "/share/man/man1"))
>> +                        (mkdir-p (string-append mp "/bin"))
>> +              (rename-file (string-append out "/share/man/man1/mkpasswd.1")
>> +                           (string-append mp "/share/man/man1/mkpasswd.1"))
>> +              (rename-file (string-append out "/bin/mkpasswd")
>> +                           (string-append mp "/bin/mkpasswd"))
>> +              #t))))))
>> +    (outputs '("out"
>> +               "mkpasswd")) ; 28KiB binary, 16KiB man1
>
> Why to you call that “unbundling”?

Wrong choice of words.

> Also, I don’t find it useful to have a separate output just for a few
> kilobytes.  Could you explain?

Mkpasswd has nothing to do with whois, and upstream says so. I
think we should be able to install whois and just have whois, not
some random "historical bundled" binary in addition to whois.
I'm just stating the sizes as in comparison to the other outputs
they sometimes matter even if its just KiB.

Like I've written in the opening email, another approach could be
to simply delete mkpasswd from the output build and create an
'mkpasswd' package (inheriting from whois) which does the same
for whois.

> Thanks,
> Ludo’.
>

-- 
♥Ⓐ  ng0 -- https://www.inventati.org/patternsinthechaos/



reply via email to

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