summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Griffin <a@ajgrf.com>2019-05-11 13:13:50 -0500
committerAlex Griffin <a@ajgrf.com>2019-05-11 13:13:50 -0500
commit05a13c9b3095e79893a481d16ad1a8f0f2b1fda0 (patch)
tree22c7abbe605a7ca52b69def371b12b6a42bb1ff9
parent9333cb2b681331d976977df0da5f0d362e5e1bc8 (diff)
Add corrupt-linux function to ease support for more kernels
-rw-r--r--nonfree/packages/linux.scm24
1 files changed, 15 insertions, 9 deletions
diff --git a/nonfree/packages/linux.scm b/nonfree/packages/linux.scm
index cccdf88..06533c0 100644
--- a/nonfree/packages/linux.scm
+++ b/nonfree/packages/linux.scm
@@ -21,25 +21,31 @@
#:use-module (guix build-system trivial)
#:use-module ((guix licenses) #:prefix license:))
-(define-public linux
+(define (linux-urls version)
+ "Return a list of URLS for Linux VERSION."
+ (let ((major-version (string-take version 1)))
+ (list (string-append "https://www.kernel.org/pub/linux/kernel/v"
+ major-version ".x/linux-" version ".tar.xz"))))
+
+(define (corrupt-linux freedo version hash)
(package
- (inherit linux-libre)
+ (inherit freedo)
(name "linux")
- (version "5.0.15")
+ (version version)
(source (origin
(method url-fetch)
- (uri (string-append
- "https://cdn.kernel.org/pub/linux/kernel/v5.x/"
- "linux-" version ".tar.xz"))
- (sha256
- (base32
- "01zb8lz1lxcff2j8yxzm0ayfazi07c2n7v1i3v8wbq8k9r2vhgjw"))))
+ (uri (linux-urls version))
+ (sha256 (base32 hash))))
(home-page "https://www.kernel.org/")
(synopsis "Linux kernel with nonfree binary blobs included")
(description
"The unmodified Linux kernel, including nonfree blobs, for running GuixSD
on hardware which requires nonfree software to function.")))
+(define-public linux
+ (corrupt-linux linux-libre "5.0.15"
+ "01zb8lz1lxcff2j8yxzm0ayfazi07c2n7v1i3v8wbq8k9r2vhgjw"))
+
(define-public linux-firmware
(let ((commit "92e17d0dd2437140fab044ae62baf69b35d7d1fa")
(revision "1"))