nongnu: corrupt-linux: Apply Guix modifications.

This is a follow-up to commit 7ac8fe6e2a, which
only applies Nonguix modifications to kernel configuration.

* nongnu/packages/linux.scm (corrupt-linux): Modify freedo phases first and
use ‘customize-linux’ later.
This commit is contained in:
Hilton Chain 2025-05-23 15:06:55 +08:00
parent 7ac8fe6e2a
commit ada9bbca1c
No known key found for this signature in database
GPG key ID: ACC66D09CA528292

View file

@ -131,35 +131,37 @@ some freedo package or an output of package-version procedure."
(pristine-source (package-source freedo)) (pristine-source (package-source freedo))
(inputs (map gexp-input-thing (extract-gexp-inputs pristine-source))) (inputs (map gexp-input-thing (extract-gexp-inputs pristine-source)))
(sources (filter origin? inputs)) (sources (filter origin? inputs))
(hash (find-source-hash sources url)) (hash (find-source-hash sources url)))
(base (customize-linux
#:name name
#:linux freedo
#:source (origin
(method url-fetch)
(uri url)
(hash hash))
#:configs configs
#:defconfig defconfig)))
(package (package
(inherit base) (inherit
(version version) (customize-linux
(arguments #:name name
(substitute-keyword-arguments (package-arguments base) #:linux
((#:phases phases) (package
#~(modify-phases #$phases (inherit freedo)
;; Make sure the resulted package is compatible with (version version)
;; customize-linux. (arguments
(add-before 'configure 'nonguix-configure (substitute-keyword-arguments (package-arguments freedo)
(lambda _ ((#:phases phases '%standard-phases)
(let ((defconfig #~(modify-phases #$phases
(format #f "arch/~a/configs/nonguix_defconfig" ;; Make sure the resulted package is compatible with
#$(linux-srcarch)))) ;; customize-linux.
(invoke "make" "defconfig") (add-before 'configure 'nonguix-configure
(modify-defconfig (lambda args
".config" '#$(get-extra-configs this-package)) (let ((defconfig
(invoke "make" "savedefconfig") (format #f "arch/~a/configs/nonguix_defconfig"
(rename-file "defconfig" defconfig)))))))) #$(linux-srcarch))))
(apply (assoc-ref #$phases 'configure) args)
(modify-defconfig
".config" '#$(get-extra-configs this-package))
(invoke "make" "savedefconfig")
(rename-file "defconfig" defconfig)))))))))
#:source (origin
(method url-fetch)
(uri url)
(hash hash))
#:configs configs
#:defconfig defconfig))
(home-page "https://www.kernel.org/") (home-page "https://www.kernel.org/")
(synopsis "Linux kernel with nonfree binary blobs included") (synopsis "Linux kernel with nonfree binary blobs included")
(description (description