From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marius Bakke Subject: [PATCH 1/6] gnu: Add fatfsck-static. Date: Sat, 5 Nov 2016 12:55:06 +0000 Message-ID: <20161105125511.29383-2-mbakke@fastmail.com> References: <20161105125511.29383-1-mbakke@fastmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:38667) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c30VX-0001OQ-0n for guix-devel@gnu.org; Sat, 05 Nov 2016 08:55:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c30VW-00012S-04 for guix-devel@gnu.org; Sat, 05 Nov 2016 08:55:39 -0400 Received: from out2-smtp.messagingengine.com ([66.111.4.26]:37429) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1c30VV-00012C-So for guix-devel@gnu.org; Sat, 05 Nov 2016 08:55:37 -0400 In-Reply-To: <20161105125511.29383-1-mbakke@fastmail.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" To: guix-devel@gnu.org Cc: Marius Bakke * gnu/packages/disk.scm (dosfstools/static): New private variable. (fatfsck/static): New variable. --- gnu/packages/disk.scm | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/gnu/packages/disk.scm b/gnu/packages/disk.scm index db050d6..477c25a 100644 --- a/gnu/packages/disk.scm +++ b/gnu/packages/disk.scm @@ -6,6 +6,7 @@ ;;; Copyright © 2016 Efraim Flashner ;;; Copyright © 2016 Jan Nieuwenhuizen ;;; Copyright © 2016 Roel Janssen +;;; Copyright © 2016 Marius Bakke ;;; ;;; This file is part of GNU Guix. ;;; @@ -27,6 +28,7 @@ #:use-module (guix packages) #:use-module (guix download) #:use-module (guix build-system gnu) + #:use-module (guix build-system trivial) #:use-module (gnu packages) #:use-module (gnu packages base) #:use-module (gnu packages docbook) @@ -197,6 +199,40 @@ to recover data more efficiently by only reading the necessary blocks.") which respectively make and check MS-DOS FAT file systems.") (license license:gpl3+))) +(define dosfstools/static + (static-package + (package (inherit dosfstools)))) + +(define-public fatfsck/static + (package + (name "fatfsck-static") + (version (package-version dosfstools)) + (build-system trivial-build-system) + (source #f) + (arguments + `(#:modules ((guix build utils)) + #:builder + (begin + (use-modules (guix build utils)) + (let ((source (string-append (assoc-ref %build-inputs "dosfstools") + "/sbin/")) + (exe "fsck.fat") + (bin (string-append (assoc-ref %outputs "out") "/sbin"))) + (mkdir-p bin) + (with-directory-excursion bin + (copy-file (string-append source exe) exe) + (remove-store-references exe) + (chmod exe #o555) + ;; Add fsck.vfat symlink to match the Linux driver name. + (symlink exe "fsck.vfat") + #t))))) + (inputs `(("dosfstools" ,dosfstools/static))) + (home-page (package-home-page dosfstools)) + (synopsis "Statically linked fsck.fat from dosfstools") + (description "This package provides a statically-linked fsck.fat +and a fsck.vfat compatibility symlink for use in an initrd.") + (license (package-license dosfstools)))) + (define-public sdparm (package (name "sdparm") -- 2.10.2