mirror of
https://gitlab.com/nonguix/nonguix.git
synced 2024-11-22 08:28:09 +01:00
nongnu: make-linux-xanmod-source: Patch upstream kernel source instead.
* nongnu/packages/linux.scm (make-linux-xanmod-source): Patch upstream linux source instead of downloading the auto-generated tarball from GitLab. (make-linux-xanmod)[arguments]<#:phases>: Delete 'remove-localversion, moved to snippet. (linux-xanmod-source,linux-xanmod-lts-source): Adjust accordingly. Signed-off-by: Jonathan Brielmaier <jonathan.brielmaier@web.de>
This commit is contained in:
parent
f325d88cb6
commit
1eaa24df40
1 changed files with 42 additions and 12 deletions
|
@ -147,12 +147,43 @@ on hardware which requires nonfree software to function."))))
|
||||||
;;; Linux-XanMod
|
;;; Linux-XanMod
|
||||||
;;;
|
;;;
|
||||||
|
|
||||||
(define (make-linux-xanmod-source version xanmod-revision hash-string)
|
(define* (make-linux-xanmod-source version xanmod-revision
|
||||||
|
#:key xanmod-branch kernel-hash xanmod-hash)
|
||||||
|
|
||||||
|
(define %upstream-linux-source
|
||||||
|
(@@ (gnu packages linux) %upstream-linux-source))
|
||||||
|
|
||||||
|
(define kernel-source
|
||||||
|
(%upstream-linux-source (version-major+minor version) kernel-hash))
|
||||||
|
|
||||||
|
(define xanmod-patch
|
||||||
(origin
|
(origin
|
||||||
(method url-fetch)
|
(method url-fetch)
|
||||||
(uri (string-append "https://gitlab.com/xanmod/linux/-/archive/"
|
(uri (string-append
|
||||||
version "-" xanmod-revision ".tar.bz2"))
|
"mirror://sourceforge/xanmod/releases/" xanmod-branch "/"
|
||||||
(sha256 hash-string)))
|
version "-" xanmod-revision "/patch-"
|
||||||
|
version "-" xanmod-revision ".xz"))
|
||||||
|
(sha256 xanmod-hash)))
|
||||||
|
|
||||||
|
(origin
|
||||||
|
(inherit kernel-source)
|
||||||
|
(modules '((guix build utils)))
|
||||||
|
(snippet
|
||||||
|
#~(begin
|
||||||
|
(let* ((xz-name (basename #+xanmod-patch))
|
||||||
|
(patch-xz-name (string-append (string-drop-right xz-name 3)
|
||||||
|
".patch.xz"))
|
||||||
|
(patch-name (string-drop-right patch-xz-name 3)))
|
||||||
|
(copy-file #+xanmod-patch patch-xz-name)
|
||||||
|
(invoke #+(file-append xz "/bin/unxz") patch-xz-name)
|
||||||
|
(invoke #+(file-append patch "/bin/patch")
|
||||||
|
"--force" "--no-backup-if-mismatch"
|
||||||
|
#+@(origin-patch-flags kernel-source)
|
||||||
|
"--input" patch-name)
|
||||||
|
(for-each delete-file
|
||||||
|
(list patch-name
|
||||||
|
;; EXTRAVERSION is used instead.
|
||||||
|
"localversion")))))))
|
||||||
|
|
||||||
(define* (make-linux-xanmod version xanmod-revision source
|
(define* (make-linux-xanmod version xanmod-revision source
|
||||||
#:key
|
#:key
|
||||||
|
@ -173,11 +204,6 @@ on hardware which requires nonfree software to function."))))
|
||||||
(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
|
|
||||||
(lambda _
|
|
||||||
(when (file-exists? "localversion")
|
|
||||||
(delete-file "localversion"))))
|
|
||||||
(add-before 'configure 'add-xanmod-defconfig
|
(add-before 'configure 'add-xanmod-defconfig
|
||||||
(lambda _
|
(lambda _
|
||||||
(rename-file
|
(rename-file
|
||||||
|
@ -221,7 +247,9 @@ stable, responsive and smooth desktop experience."))))
|
||||||
(make-linux-xanmod-source
|
(make-linux-xanmod-source
|
||||||
linux-xanmod-version
|
linux-xanmod-version
|
||||||
linux-xanmod-revision
|
linux-xanmod-revision
|
||||||
(base32 "020f97pd45lg9nw38j4hz4kqd2ch81fqdp3qkpnzpxf8kihzn2li")))
|
#:xanmod-branch "main"
|
||||||
|
#:kernel-hash (base32 "117qmckqrabja9f9260vhrg08wkz4q3syzyaa9msfbl042y4nmvs")
|
||||||
|
#:xanmod-hash (base32 "1n10yl5wgqk0n6ijnnzlmidk61hazhhwzgjf7kkg9cgk7nsjs626")))
|
||||||
|
|
||||||
(define-public linux-xanmod-lts-version "6.1.61")
|
(define-public linux-xanmod-lts-version "6.1.61")
|
||||||
(define-public linux-xanmod-lts-revision "xanmod1")
|
(define-public linux-xanmod-lts-revision "xanmod1")
|
||||||
|
@ -229,7 +257,9 @@ stable, responsive and smooth desktop experience."))))
|
||||||
(make-linux-xanmod-source
|
(make-linux-xanmod-source
|
||||||
linux-xanmod-lts-version
|
linux-xanmod-lts-version
|
||||||
linux-xanmod-lts-revision
|
linux-xanmod-lts-revision
|
||||||
(base32 "1rp9g9qdrr2l0wwxx4myz6kr3agznama2r6q8an505l8mwdgwll8")))
|
#:xanmod-branch "lts"
|
||||||
|
#:kernel-hash (base32 "1ssxn81jfl0jf9brczfrrwd1f1vmf594jvhrs7zgcc54a5qg389c")
|
||||||
|
#:xanmod-hash (base32 "036yl7a8x2y8mjwyb061vaw9zwabdddpvs7sii9ip27i34k0cl11")))
|
||||||
|
|
||||||
;; Linux-XanMod packages
|
;; Linux-XanMod packages
|
||||||
(define-public linux-xanmod
|
(define-public linux-xanmod
|
||||||
|
|
Loading…
Reference in a new issue