From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Craven Subject: [PATCH 1/2] gnu: Add btrfs-progs/static. Date: Wed, 30 Nov 2016 19:36:34 +0100 Message-ID: <20161130183635.6513-1-david@craven.ch> Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:38590) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cC9kX-0003b2-2w for guix-devel@gnu.org; Wed, 30 Nov 2016 13:36:58 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cC9kS-000777-8U for guix-devel@gnu.org; Wed, 30 Nov 2016 13:36:57 -0500 Received: from so254-10.mailgun.net ([198.61.254.10]:13426) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cC9kS-00076S-3t for guix-devel@gnu.org; Wed, 30 Nov 2016 13:36:52 -0500 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: guix-devel@gnu.org * gnu/packages/linux.scm (btrfs-progs/static): New variable. --- gnu/packages/linux.scm | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm index a4639bd..8b6cce4 100644 --- a/gnu/packages/linux.scm +++ b/gnu/packages/linux.scm @@ -2714,6 +2714,36 @@ easy administration.") ;; GPL2: Everything else. (license (list license:gpl2 license:gpl2+)))) +(define-public btrfs-progs/static + (package + (name "btrfs-progs-static") + (version (package-version btrfs-progs)) + (build-system trivial-build-system) + (source #f) + (arguments + `(#:modules ((guix build utils)) + #:builder + (begin + (use-modules (guix build utils) + (ice-9 ftw) + (srfi srfi-26)) + + (let* ((btrfs (assoc-ref %build-inputs "btrfs-progs:static")) + (out (assoc-ref %outputs "out")) + (source (string-append btrfs "/bin/btrfs.static")) + (target (string-append out "/bin/btrfs"))) + (mkdir-p (dirname target)) + (copy-file source target) + (remove-store-references target) + (chmod target #o555))))) + (inputs `(("btrfs-progs:static" ,btrfs-progs "static"))) + (synopsis "Statically-linked btrfs command from btrfsprogs") + (description + "This package provides statically-linked command of btrfs taken +from the btrfsprogs package. It is meant to be used in initrds.") + (home-page (package-home-page btrfs-progs)) + (license (package-license btrfs-progs)))) + (define-public freefall (package (name "freefall") -- 2.9.0