mirror of
https://codeberg.org/guix/guix.git
synced 2025-10-02 02:15:12 +00:00
gnu: linux-libre: Use modify-phases.
* gnu/packages/linux.scm (linux-libre): Use modify-phases.
This commit is contained in:
parent
885009c5b9
commit
614d1738e2
1 changed files with 39 additions and 41 deletions
|
@ -258,9 +258,41 @@ for SYSTEM and optionally VARIANT, or #f if there is no such configuration."
|
||||||
(search-path %load-path file)))
|
(search-path %load-path file)))
|
||||||
|
|
||||||
(define-public linux-libre
|
(define-public linux-libre
|
||||||
(let* ((version "4.7.3")
|
(package
|
||||||
(build-phase
|
(name "linux-libre")
|
||||||
'(lambda* (#:key system inputs #:allow-other-keys #:rest args)
|
(version "4.7.3")
|
||||||
|
(source (origin
|
||||||
|
(method url-fetch)
|
||||||
|
(uri (linux-libre-urls version))
|
||||||
|
(sha256
|
||||||
|
(base32
|
||||||
|
"18sy1vh4x66hsk0qbq8g5299my082d530zm8c7xnbakq7350igi6"))))
|
||||||
|
(build-system gnu-build-system)
|
||||||
|
(supported-systems '("x86_64-linux" "i686-linux"))
|
||||||
|
(native-inputs
|
||||||
|
`(("perl" ,perl)
|
||||||
|
("bc" ,bc)
|
||||||
|
("openssl" ,openssl)
|
||||||
|
("module-init-tools" ,module-init-tools)
|
||||||
|
("patch/freedo+gnu" ,%boot-logo-patch)
|
||||||
|
|
||||||
|
,@(let ((conf (kernel-config
|
||||||
|
(or (%current-target-system)
|
||||||
|
(%current-system))
|
||||||
|
#:variant (version-major+minor version))))
|
||||||
|
(if conf
|
||||||
|
`(("kconfig" ,conf))
|
||||||
|
'()))))
|
||||||
|
(arguments
|
||||||
|
`(#:modules ((guix build gnu-build-system)
|
||||||
|
(guix build utils)
|
||||||
|
(srfi srfi-1)
|
||||||
|
(ice-9 match))
|
||||||
|
#:phases
|
||||||
|
(modify-phases %standard-phases
|
||||||
|
(delete 'configure)
|
||||||
|
(replace 'build
|
||||||
|
(lambda* (#:key system inputs #:allow-other-keys #:rest args)
|
||||||
;; Avoid introducing timestamps
|
;; Avoid introducing timestamps
|
||||||
(setenv "KCONFIG_NOTIMESTAMP" "1")
|
(setenv "KCONFIG_NOTIMESTAMP" "1")
|
||||||
(setenv "KBUILD_BUILD_TIMESTAMP" (getenv "SOURCE_DATE_EPOCH"))
|
(setenv "KBUILD_BUILD_TIMESTAMP" (getenv "SOURCE_DATE_EPOCH"))
|
||||||
|
@ -310,8 +342,8 @@ for SYSTEM and optionally VARIANT, or #f if there is no such configuration."
|
||||||
;; Call the default `build' phase so `-j' is correctly
|
;; Call the default `build' phase so `-j' is correctly
|
||||||
;; passed.
|
;; passed.
|
||||||
(apply build #:make-flags "all" args))))
|
(apply build #:make-flags "all" args))))
|
||||||
(install-phase
|
(replace 'install
|
||||||
`(lambda* (#:key inputs outputs #:allow-other-keys)
|
(lambda* (#:key inputs outputs #:allow-other-keys)
|
||||||
(let* ((out (assoc-ref outputs "out"))
|
(let* ((out (assoc-ref outputs "out"))
|
||||||
(moddir (string-append out "/lib/modules"))
|
(moddir (string-append out "/lib/modules"))
|
||||||
(mit (assoc-ref inputs "module-init-tools")))
|
(mit (assoc-ref inputs "module-init-tools")))
|
||||||
|
@ -328,47 +360,13 @@ for SYSTEM and optionally VARIANT, or #f if there is no such configuration."
|
||||||
(string-append "INSTALL_MOD_PATH=" out)
|
(string-append "INSTALL_MOD_PATH=" out)
|
||||||
"INSTALL_MOD_STRIP=1"
|
"INSTALL_MOD_STRIP=1"
|
||||||
"modules_install"))))))
|
"modules_install"))))))
|
||||||
(package
|
|
||||||
(name "linux-libre")
|
|
||||||
(version version)
|
|
||||||
(source (origin
|
|
||||||
(method url-fetch)
|
|
||||||
(uri (linux-libre-urls version))
|
|
||||||
(sha256
|
|
||||||
(base32
|
|
||||||
"18sy1vh4x66hsk0qbq8g5299my082d530zm8c7xnbakq7350igi6"))))
|
|
||||||
(build-system gnu-build-system)
|
|
||||||
(supported-systems '("x86_64-linux" "i686-linux"))
|
|
||||||
(native-inputs `(("perl" ,perl)
|
|
||||||
("bc" ,bc)
|
|
||||||
("openssl" ,openssl)
|
|
||||||
("module-init-tools" ,module-init-tools)
|
|
||||||
("patch/freedo+gnu" ,%boot-logo-patch)
|
|
||||||
|
|
||||||
,@(let ((conf (kernel-config
|
|
||||||
(or (%current-target-system)
|
|
||||||
(%current-system))
|
|
||||||
#:variant (version-major+minor version))))
|
|
||||||
(if conf
|
|
||||||
`(("kconfig" ,conf))
|
|
||||||
'()))))
|
|
||||||
(arguments
|
|
||||||
`(#:modules ((guix build gnu-build-system)
|
|
||||||
(guix build utils)
|
|
||||||
(srfi srfi-1)
|
|
||||||
(ice-9 match))
|
|
||||||
#:phases (alist-replace
|
|
||||||
'build ,build-phase
|
|
||||||
(alist-replace
|
|
||||||
'install ,install-phase
|
|
||||||
(alist-delete 'configure %standard-phases)))
|
|
||||||
#:tests? #f))
|
#:tests? #f))
|
||||||
|
(home-page "http://www.gnu.org/software/linux-libre/")
|
||||||
(synopsis "100% free redistribution of a cleaned Linux kernel")
|
(synopsis "100% free redistribution of a cleaned Linux kernel")
|
||||||
(description
|
(description
|
||||||
"GNU Linux-Libre is a free (as in freedom) variant of the Linux kernel.
|
"GNU Linux-Libre is a free (as in freedom) variant of the Linux kernel.
|
||||||
It has been modified to remove all non-free binary blobs.")
|
It has been modified to remove all non-free binary blobs.")
|
||||||
(license license:gpl2)
|
(license license:gpl2)))
|
||||||
(home-page "http://www.gnu.org/software/linux-libre/"))))
|
|
||||||
|
|
||||||
(define-public linux-libre-4.4
|
(define-public linux-libre-4.4
|
||||||
(package
|
(package
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue