From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Craven Subject: [PATCH 11/17] gnu: Add make-linux-libre-source. Date: Fri, 9 Sep 2016 14:34:20 +0200 Message-ID: <20160909123426.18499-11-david@craven.ch> References: <20160909013641.GA9202@jasmine> <20160909123426.18499-1-david@craven.ch> Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:52651) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1biL1C-0000CX-5O for guix-devel@gnu.org; Fri, 09 Sep 2016 08:34:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1biL19-0003Pt-66 for guix-devel@gnu.org; Fri, 09 Sep 2016 08:34:54 -0400 Received: from so254-10.mailgun.net ([198.61.254.10]:33290) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1biL17-0003IT-Vv for guix-devel@gnu.org; Fri, 09 Sep 2016 08:34:51 -0400 In-Reply-To: <20160909123426.18499-1-david@craven.ch> 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-libre.scm (make-linux-libre-source): New variable. (linux-libre, linux-libre-4.4, linux-libre-4.1): Use make-linux-libre-source. (linux-libre-urls): Remove. --- gnu/packages/linux.scm | 60 +++++++++++++++++++++++++------------------------- 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm index f629045..6771bd2 100644 --- a/gnu/packages/linux.scm +++ b/gnu/packages/linux.scm @@ -92,21 +92,24 @@ ((string-prefix? "aarch64" arch) "arm64") (else arch)))) -(define (linux-libre-urls version) - "Return a list of URLs for Linux-Libre VERSION." - (list (string-append - "http://linux-libre.fsfla.org/pub/linux-libre/releases/" - version "-gnu/linux-libre-" version "-gnu.tar.xz") - - ;; XXX: Work around . - (string-append - "ftp://alpha.gnu.org/gnu/guix/mirror/linux-libre-" - version "-gnu.tar.xz") - - ;; Maybe this URL will become valid eventually. - (string-append - "mirror://gnu/linux-libre/" version "-gnu/linux-libre-" - version "-gnu.tar.xz"))) +(define-public (make-linux-libre-source version hash) + (origin + (method url-fetch) + (uri (list (string-append + "http://linux-libre.fsfla.org/pub/linux-libre/releases/" + version "-gnu/linux-libre-" version "-gnu.tar.xz") + + ;; XXX: Work around . + (string-append + "ftp://alpha.gnu.org/gnu/guix/mirror/linux-libre-" + version "-gnu.tar.xz") + + ;; Maybe this URL will become valid eventually. + (string-append + "mirror://gnu/linux-libre/" version "-gnu/linux-libre-" + version "-gnu.tar.xz"))) + (sha256 (base32 hash)) + (patches (origin-patches %boot-logo-patch)))) (define-public linux-libre-headers (let* ((version "4.1.18") @@ -142,12 +145,10 @@ (package (name "linux-libre-headers") (version version) - (source (origin - (method url-fetch) - (uri (linux-libre-urls version)) - (sha256 - (base32 - "1bddh2rg645lavhjkk9z75vflba5y0g73z2fjwgbfrj5jb44x9i7")))) + (source + (make-linux-libre-source + version + "1bddh2rg645lavhjkk9z75vflba5y0g73z2fjwgbfrj5jb44x9i7")) (build-system gnu-build-system) (native-inputs `(("perl" ,perl))) (arguments @@ -271,7 +272,7 @@ for SYSTEM and optionally VARIANT, or #f if there is no such configuration." "CONFIG_CIFS=m\n" "CONFIG_9P_FS=m\n")) -(define* (make-linux-libre version hash +(define* (make-linux-libre version source #:key (configuration-file #f) (defconfig "defconfig") @@ -280,11 +281,7 @@ for SYSTEM and optionally VARIANT, or #f if there is no such configuration." (package (name "linux-libre") (version version) - (source (origin - (method url-fetch) - (uri (linux-libre-urls version)) - (sha256 (base32 hash)) - (patches (origin-patches %boot-logo-patch)))) + (source source) (build-system gnu-build-system) (supported-systems '("x86_64-linux" "i686-linux")) (native-inputs @@ -363,32 +360,35 @@ It has been modified to remove all non-free binary blobs.") (define-public linux-libre (let* ((version "4.7.2") + (hash "1rp09y2hv0hvdybm2n2im9717kzxmklpgzs8k1bmdfzqxyg8cb85") (conf (kernel-config (or (%current-target-system) (%current-system)) #:variant (version-major+minor version)))) (make-linux-libre version - "1rp09y2hv0hvdybm2n2im9717kzxmklpgzs8k1bmdfzqxyg8cb85" + (make-linux-libre-source version hash) #:configuration-file conf))) (define-public linux-libre-4.4 (let* ((version "4.4.19") + (hash "0nddjs7prmb0g7g3w2k4qfyq02a9szm5nvsgflxcaarbq1slibb5") (conf (kernel-config (or (%current-target-system) (%current-system)) #:variant (version-major+minor version)))) (make-linux-libre version - "0nddjs7prmb0g7g3w2k4qfyq02a9szm5nvsgflxcaarbq1slibb5" + (make-linux-libre-source version hash) #:configuration-file conf))) (define-public linux-libre-4.1 (let* ((version "4.1.31") + (hash "0grffah921k136w1qwcswxv6m810s8q54nr2rk7kyqka3a1b81yw") (conf (kernel-config (or (%current-target-system) (%current-system)) #:variant (version-major+minor version)))) (make-linux-libre version - "0grffah921k136w1qwcswxv6m810s8q54nr2rk7kyqka3a1b81yw" + (make-linux-libre-source version hash) #:configuration-file conf))) -- 2.9.0