From mboxrd@z Thu Jan 1 00:00:00 1970 From: Leo Famulari Subject: Re: [PATCH 3/3] gnu: btrfs-progs: Add "static" output. Date: Sat, 2 Apr 2016 20:50:53 -0400 Message-ID: <20160403005053.GC4959@jasmine> References: <1459603774-9455-1-git-send-email-tobias.geerinckx.rice@gmail.com> <1459603774-9455-4-git-send-email-tobias.geerinckx.rice@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:59842) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1amWFp-0001c3-3D for guix-devel@gnu.org; Sat, 02 Apr 2016 20:51:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1amWFl-0000lU-Sy for guix-devel@gnu.org; Sat, 02 Apr 2016 20:51:01 -0400 Received: from out3-smtp.messagingengine.com ([66.111.4.27]:53771) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1amWFl-0000lQ-PA for guix-devel@gnu.org; Sat, 02 Apr 2016 20:50:57 -0400 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 81D4F201F1 for ; Sat, 2 Apr 2016 20:50:57 -0400 (EDT) Content-Disposition: inline In-Reply-To: <1459603774-9455-4-git-send-email-tobias.geerinckx.rice@gmail.com> 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-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: Tobias Geerinckx-Rice Cc: guix-devel@gnu.org On Sat, Apr 02, 2016 at 03:29:34PM +0200, Tobias Geerinckx-Rice wrote: > * gnu/packages/linux.scm (btrfs-progs)[outputs]: New field. > [inputs]: Add "static" outputs of util-linux for libuuid and libblkid. > [arguments]: Add 'build-static and 'install-static phases. > --- > gnu/packages/linux.scm | 16 +++++++++++++++- > 1 file changed, 15 insertions(+), 1 deletion(-) > > diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm > index 0260b0e..a3f61c2 100644 > --- a/gnu/packages/linux.scm > +++ b/gnu/packages/linux.scm > @@ -2507,12 +2507,26 @@ and copy/paste text in the console and in xterm.") > (base32 > "1znf2zhb56zbmdjk3lq107678xwsqwc5gczspypmc5i31qnppy7f")))) > (build-system gnu-build-system) > + (outputs '("out" > + "static")) ; static versions of binaries in "out" (~16MiB!) > (arguments > - '(#:test-target "test" > + '(#:phases (modify-phases %standard-phases > + (add-after 'build 'build-static > + (lambda _ (zero? (system* "make" "static")))) > + (add-after 'install 'install-static > + (let ((staticbin (string-append (assoc-ref %outputs "static") > + "/bin"))) > + (lambda _ > + (zero? (system* "make" > + (string-append "bindir=" staticbin) > + "install-static")))))) > + #:test-target "test" > #:parallel-tests? #f)) ; tests fail when run in parallel > (inputs `(("e2fsprogs" ,e2fsprogs) > ("libblkid" ,util-linux) > + ("libblkid:static" ,util-linux "static") > ("libuuid" ,util-linux) > + ("libuuid:static" ,util-linux "static") I really like giving a descriptive name to uses of "grab-bag" packages like util-linux. LGTM! > ("zlib" ,zlib) > ("lzo" ,lzo))) > (native-inputs `(("pkg-config" ,pkg-config) > -- > 2.7.0 > >