From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: [PATCH] gnu: whois: Move mkpasswd to its own output. Date: Mon, 09 Jan 2017 10:34:48 +0100 Message-ID: <87k2a4poef.fsf@gnu.org> References: <20170104180705.5733-1-ng0@libertad.pw> <20170104180705.5733-2-ng0@libertad.pw> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:56041) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cQWLv-00015W-B4 for guix-devel@gnu.org; Mon, 09 Jan 2017 04:34:57 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cQWLr-0000hn-IJ for guix-devel@gnu.org; Mon, 09 Jan 2017 04:34:55 -0500 In-Reply-To: <20170104180705.5733-2-ng0@libertad.pw> (ng0@libertad.pw's message of "Wed, 4 Jan 2017 18:07:05 +0000") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: ng0 Cc: guix-devel@gnu.org Hi! ng0 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 =C2=A9 2016 John Darrington > ;;; Copyright =C2=A9 2016 Nicolas Goaziou > ;;; Copyright =C2=A9 2016 Eric Bavier > -;;; Copyright =C2=A9 2016 ng0 > +;;; Copyright =C2=A9 2016, 2017 ng0 > ;;; Copyright =C2=A9 2016 Arun Isaac > ;;; Copyright =C2=A9 2016 Benz Schenk > ;;; > @@ -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=3Dgcc" > @@ -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 =E2=80=9Cunbundling=E2=80=9D? Also, I don=E2=80=99t find it useful to have a separate output just for a f= ew kilobytes. Could you explain? Thanks, Ludo=E2=80=99.