|
|
@ -34,46 +34,54 @@ |
|
|
|
(define config->string |
|
|
|
(define config->string |
|
|
|
(@@ (gnu packages linux) config->string)) |
|
|
|
(@@ (gnu packages linux) config->string)) |
|
|
|
|
|
|
|
|
|
|
|
(define %xanmod-version "6.3.5") |
|
|
|
|
|
|
|
(define %xanmod-revision "xanmod1") |
|
|
|
;;; |
|
|
|
|
|
|
|
;;; Linux-XanMod |
|
|
|
|
|
|
|
;;; |
|
|
|
|
|
|
|
|
|
|
|
(define linux-xanmod-source |
|
|
|
(define (make-linux-xanmod-source version xanmod-revision hash-string) |
|
|
|
(origin |
|
|
|
(origin |
|
|
|
(method url-fetch) |
|
|
|
(method url-fetch) |
|
|
|
(uri (string-append "https://github.com/xanmod/linux/archive/" |
|
|
|
(uri (string-append "https://gitlab.com/xanmod/linux/-/archive/" |
|
|
|
%xanmod-version "-" %xanmod-revision ".tar.gz")) |
|
|
|
version "-" xanmod-revision ".tar.bz2")) |
|
|
|
(sha256 |
|
|
|
(sha256 hash-string))) |
|
|
|
(base32 "02858lsjal8gf0sbn3rp866zqx8fj8wjcbdgkxqs8y8ziyqlrh8w")))) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(define-public linux-xanmod |
|
|
|
(define* (make-linux-xanmod version xanmod-revision source |
|
|
|
(let ((base (customize-linux #:name "linux-xanmod" |
|
|
|
#:key |
|
|
|
#:source linux-xanmod-source |
|
|
|
(name "linux-xanmod") |
|
|
|
#:defconfig "config_x86-64-v1" |
|
|
|
(xanmod-defconfig "config_x86-64-v1")) |
|
|
|
;; Extraversion is used instead. |
|
|
|
(let ((defconfig xanmod-defconfig) ;to be used in phases. |
|
|
|
|
|
|
|
(base (customize-linux #:name name |
|
|
|
|
|
|
|
#:source source |
|
|
|
|
|
|
|
#:defconfig xanmod-defconfig |
|
|
|
|
|
|
|
;; EXTRAVERSION is used instead. |
|
|
|
#:configs (config->string |
|
|
|
#:configs (config->string |
|
|
|
'(("CONFIG_LOCALVERSION" . ""))) |
|
|
|
'(("CONFIG_LOCALVERSION" . ""))) |
|
|
|
#:extra-version %xanmod-revision))) |
|
|
|
#:extra-version xanmod-revision))) |
|
|
|
(package |
|
|
|
(package |
|
|
|
(inherit base) |
|
|
|
(inherit base) |
|
|
|
(version %xanmod-version) |
|
|
|
(version version) |
|
|
|
(arguments |
|
|
|
(arguments |
|
|
|
(substitute-keyword-arguments (package-arguments base) |
|
|
|
(substitute-keyword-arguments (package-arguments base) |
|
|
|
((#:phases phases) |
|
|
|
((#:phases phases) |
|
|
|
#~(modify-phases #$phases |
|
|
|
#~(modify-phases #$phases |
|
|
|
|
|
|
|
;; EXTRAVERSION is used instead. |
|
|
|
(add-after 'unpack 'remove-localversion |
|
|
|
(add-after 'unpack 'remove-localversion |
|
|
|
(lambda _ |
|
|
|
(lambda _ |
|
|
|
(when (file-exists? "localversion") |
|
|
|
(when (file-exists? "localversion") |
|
|
|
(delete-file "localversion")))) |
|
|
|
(delete-file "localversion")))) |
|
|
|
(add-before 'configure 'add-defconfig |
|
|
|
(add-before 'configure 'add-xanmod-defconfig |
|
|
|
(lambda _ |
|
|
|
(lambda _ |
|
|
|
(copy-file "CONFIGS/xanmod/gcc/config_x86-64-v1" ".config") |
|
|
|
(rename-file |
|
|
|
|
|
|
|
(string-append "CONFIGS/xanmod/gcc/" #$defconfig) |
|
|
|
|
|
|
|
".config") |
|
|
|
|
|
|
|
|
|
|
|
;; Adapted from `make-linux-libre*'. |
|
|
|
;; Adapted from `make-linux-libre*'. |
|
|
|
(chmod ".config" #o666) |
|
|
|
(chmod ".config" #o666) |
|
|
|
(let ((port (open-file ".config" "a")) |
|
|
|
(let ((port (open-file ".config" "a")) |
|
|
|
(extra-configuration #$(config->string |
|
|
|
(extra-configuration |
|
|
|
;; FIXME: There might be other |
|
|
|
#$(config->string |
|
|
|
;; support missing. |
|
|
|
;; FIXME: There might be other support missing. |
|
|
|
(append '(("CONFIG_BLK_DEV_NVME" . #t) |
|
|
|
(append '(("CONFIG_BLK_DEV_NVME" . #t) |
|
|
|
("CONFIG_CRYPTO_XTS" . m) |
|
|
|
("CONFIG_CRYPTO_XTS" . m) |
|
|
|
("CONFIG_VIRTIO_CONSOLE" . m)) |
|
|
|
("CONFIG_VIRTIO_CONSOLE" . m)) |
|
|
@ -82,7 +90,9 @@ |
|
|
|
(close-port port)) |
|
|
|
(close-port port)) |
|
|
|
(invoke "make" "oldconfig") |
|
|
|
(invoke "make" "oldconfig") |
|
|
|
|
|
|
|
|
|
|
|
(rename-file ".config" "arch/x86/configs/config_x86-64-v1"))))))) |
|
|
|
(rename-file |
|
|
|
|
|
|
|
".config" |
|
|
|
|
|
|
|
(string-append "arch/x86/configs/" #$defconfig)))))))) |
|
|
|
(native-inputs |
|
|
|
(native-inputs |
|
|
|
(modify-inputs (package-native-inputs base) |
|
|
|
(modify-inputs (package-native-inputs base) |
|
|
|
;; cpio is needed for CONFIG_IKHEADERS. |
|
|
|
;; cpio is needed for CONFIG_IKHEADERS. |
|
|
@ -92,6 +102,19 @@ |
|
|
|
(synopsis |
|
|
|
(synopsis |
|
|
|
"Linux kernel distribution with custom settings and new features") |
|
|
|
"Linux kernel distribution with custom settings and new features") |
|
|
|
(description |
|
|
|
(description |
|
|
|
"General-purpose Linux kernel distribution with custom settings and new |
|
|
|
"This package provides XanMod kernel, a general-purpose Linux kernel |
|
|
|
features. Built to provide a stable, responsive and smooth desktop |
|
|
|
distribution with custom settings and new features. It's built to provide a |
|
|
|
experience.")))) |
|
|
|
stable, responsive and smooth desktop experience.")))) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(define linux-xanmod-version "6.3.7") |
|
|
|
|
|
|
|
(define linux-xanmod-revision "xanmod1") |
|
|
|
|
|
|
|
(define linux-xanmod-source |
|
|
|
|
|
|
|
(make-linux-xanmod-source |
|
|
|
|
|
|
|
linux-xanmod-version |
|
|
|
|
|
|
|
linux-xanmod-revision |
|
|
|
|
|
|
|
(base32 "1q8w3w7hgh1dq2dbvsvnv0p8wigxzsqpch5fn439m8r33pzg6zy7"))) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(define-public linux-xanmod |
|
|
|
|
|
|
|
(make-linux-xanmod linux-xanmod-version |
|
|
|
|
|
|
|
linux-xanmod-revision |
|
|
|
|
|
|
|
linux-xanmod-source)) |
|
|
|