aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/packages')
-rw-r--r--gnu/packages/linux.scm83
1 files changed, 42 insertions, 41 deletions
diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index a4341fe1ab..ac1d010393 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -782,12 +782,13 @@ corresponding UPSTREAM-SOURCE (an origin), using the given DEBLOB-SCRIPTS."
;;;
(define* (kernel-config arch #:key variant)
- "Return the absolute file name of the Linux-Libre build configuration file
-for ARCH and optionally VARIANT, or #f if there is no such configuration."
+ "Return a file-like object of the Linux-Libre build configuration file for
+ARCH and optionally VARIANT, or #f if there is no such configuration."
(let* ((name (string-append (if variant (string-append variant "-") "")
(if (string=? "i386" arch) "i686" arch) ".conf"))
- (file (string-append "linux-libre/" name)))
- (search-auxiliary-file file)))
+ (file (string-append "linux-libre/" name))
+ (config (search-auxiliary-file file)))
+ (and config (local-file config))))
(define %default-extra-linux-options
`(;; Make the kernel config available at /proc/config.gz
@@ -895,8 +896,9 @@ for ARCH and optionally VARIANT, or #f if there is no such configuration."
(define* (make-linux-libre version gnu-revision hash-string supported-systems
#:key
(extra-version #f)
- ;; A function that takes an arch and a variant.
- ;; See kernel-config for an example.
+ ;; A function that takes an arch and a variant, and
+ ;; return a file-like object. See kernel-config
+ ;; for an example.
(configuration-file #f)
(defconfig "defconfig")
(extra-options %default-extra-linux-options)
@@ -980,8 +982,20 @@ for ARCH and optionally VARIANT, or #f if there is no such configuration."
#$(and extra-version
(string-append "-" extra-version)))))
(replace 'configure
- (lambda* (#:key inputs #:allow-other-keys)
- (let ((config (assoc-ref inputs "kconfig")))
+ (lambda _
+ (let ((config
+ #$(match (let ((arch (platform-linux-architecture
+ (lookup-platform-by-target-or-system
+ (or (%current-target-system)
+ (%current-system))))))
+ (and configuration-file arch
+ (configuration-file
+ arch
+ #:variant (version-major+minor version))))
+ (#f ;no config for this platform
+ #f)
+ ((? file-like? config)
+ config))))
;; Use a custom kernel configuration file or a default
;; configuration file.
(if config
@@ -989,15 +1003,15 @@ for ARCH and optionally VARIANT, or #f if there is no such configuration."
(copy-file config ".config")
(chmod ".config" #o666))
(invoke "make" #$defconfig))
- ;; Appending works even when the option wasn't in the
- ;; file. The last one prevails if duplicated.
+ ;; Appending works even when the option wasn't in the file.
+ ;; The last one prevails if duplicated.
(let ((port (open-file ".config" "a"))
(extra-configuration #$(config->string extra-options)))
(display extra-configuration port)
(close-port port))
(invoke "make" "oldconfig"))))
(replace 'install
- (lambda* (#:key inputs #:allow-other-keys)
+ (lambda _
(let ((moddir (string-append #$output "/lib/modules"))
(dtbdir (string-append #$output "/lib/dtbs")))
;; Install kernel image, kernel configuration and link map.
@@ -1012,11 +1026,11 @@ for ARCH and optionally VARIANT, or #f if there is no such configuration."
;; Install kernel modules
(mkdir-p moddir)
(invoke "make"
- ;; Disable depmod because the Guix system's
- ;; module directory is an union of potentially
- ;; multiple packages. It is not possible to use
- ;; depmod to usefully calculate a dependency
- ;; graph while building only one of them.
+ ;; Disable depmod because the Guix system's module
+ ;; directory is an union of potentially multiple
+ ;; packages. It is not possible to use depmod to
+ ;; usefully calculate a dependency graph while
+ ;; building only one of them.
"DEPMOD=true"
(string-append "MODULE_DIR=" moddir)
(string-append "INSTALL_PATH=" #$output)
@@ -1029,8 +1043,8 @@ for ARCH and optionally VARIANT, or #f if there is no such configuration."
(version (match versions
((x) x))))
;; There are symlinks to the build and source directory.
- ;; Both will point to target /tmp/guix-build* and thus
- ;; not be useful in a profile. Delete the symlinks.
+ ;; Both will point to target /tmp/guix-build* and thus not
+ ;; be useful in a profile. Delete the symlinks.
(false-if-file-not-found
(delete-file
(string-append moddir "/" version "/build")))
@@ -1038,29 +1052,16 @@ for ARCH and optionally VARIANT, or #f if there is no such configuration."
(delete-file
(string-append moddir "/" version "/source"))))))))))
(native-inputs
- `(("perl" ,perl)
- ("bc" ,bc)
- ("openssl" ,openssl)
- ("elfutils" ,elfutils) ;needed to enable CONFIG_STACK_VALIDATION
- ("flex" ,flex)
- ("bison" ,bison)
-
- ;; These are needed to compile the GCC plugins.
- ("gmp" ,gmp)
- ("mpfr" ,mpfr)
- ("mpc" ,mpc)
- ,@(match (let ((arch (platform-linux-architecture
- (lookup-platform-by-target-or-system
- (or (%current-target-system)
- (%current-system))))))
- (and configuration-file arch
- (configuration-file
- arch
- #:variant (version-major+minor version))))
- (#f ;no config for this platform
- '())
- ((? string? config)
- `(("kconfig" ,config))))))
+ (list perl
+ bc
+ openssl
+ elfutils ;needed to enable CONFIG_STACK_VALIDATION
+ flex
+ bison
+ ;; These are needed to compile the GCC plugins.
+ gmp
+ mpfr
+ mpc))
(home-page "https://www.gnu.org/software/linux-libre/")
(synopsis "100% free redistribution of a cleaned Linux kernel")
(description "GNU Linux-Libre is a free (as in freedom) variant of the
tip'>* gnu/packages/version-control.scm (vcsh): Update to 1.20190621. [arguments]: Add an 'install-bash-completion phase. Signed-off-by: Tobias Geerinckx-Rice <me@tobias.gr> Michael Rohleder 2021-05-03gnu: stgit: Update to 1.1....* gnu/packages/version-control.scm (stgit): Update to 1.1. Tobias Geerinckx-Rice 2021-04-20gnu: cvs-fast-export: Update to 1.56....* gnu/packages/version-control.scm (cvs-fast-export): Update to 1.56. Tobias Geerinckx-Rice 2021-04-12gnu: ghq: Update to 1.1.7....* gnu/packages/version-control.scm (ghq): Update to 1.1.7. Tobias Geerinckx-Rice 2021-03-30gnu: grokmirror: Update to 2.0.8....* gnu/packages/version-control.scm (grokmirror): Update to 2.0.8. Signed-off-by: Efraim Flashner <efraim@flashner.co.il> Xinglu Chen 2021-03-29gnu: git-lfs: Update to 2.13.3....* gnu/packages/version-control.scm (git-lfs): Update to 2.13.3. Tobias Geerinckx-Rice 2021-03-27gnu: git: Update to 2.31.1....* gnu/packages/version-control.scm (git): Update to 2.31.1. Tobias Geerinckx-Rice 2021-03-19gnu: Add git2cl....* gnu/packages/version-control.scm (git2cl): New variable. Signed-off-by: Ludovic Courtès <ludo@gnu.org> Xinglu Chen 2021-03-17gnu: tig: Update to 2.5.3....* gnu/packages/version-control.scm (tig): Update to 2.5.3. Co-authored-by: jgart <jgart@dismail.de> Co-authored-by: donotshake <donotshake:matrix.org> Signed-off-by: Ludovic Courtès <ludo@gnu.org> LibreMiami 2021-03-16gnu: b4: Fix setup.py version incompatibility....* gnu/packages/version-control.scm (b4)[source]: Add snippet to not require too specific of a version. Reported-by: Kyle Meyer <kyle@kyleam.com> Efraim Flashner 2021-03-16gnu: git: Fix git-manpages native input's hash....This is a follow-up to commit ab9629b7c91ff7d6392a03512cfe442823267777. * gnu/packages/version-control.scm (git)[native-inputs]: Fix git-manpages's hash. Léo Le Bouter 2021-03-16gnu: git: Update to 2.31.0....* gnu/packages/version-control.scm (git): Update to 2.31.0. Léo Le Bouter 2021-03-10gnu: git: Update to 2.30.2 [fixes CVE-2021-21300]....* gnu/packages/version-control.scm (git): Update to 2.30.2. Léo Le Bouter 2021-03-02gnu: stgit: Update to 1.0....* gnu/packages/version-control.scm (stgit): Update to 1.0. Signed-off-by: Ludovic Courtès <ludo@gnu.org> Stefan Reichör 2021-02-22gnu: gita: Update to 0.12.9....* gnu/packages/version-control.scm (gita): Update to 0.12.9. Signed-off-by: Léo Le Bouter <lle-bout@zaclys.net> Stefan Reichör 2021-02-21gnu: git: Add credential-libsecret output....* gnu/packages/version-control.scm (git)[native-inputs]: Add pkg-config. [inputs]: Add glib and libsecret. [outputs]: Add "credential-libsecret". [arguments]: Add 'install-credential-libsecret phase to #:phases to build and install "git-credential-libsecret" to "credential-libsecret" output. (git-minimal)[arguments]: Delete the 'install-credential-libsecret phase. Signed-off-by: Chris Marusich <cmmarusich@gmail.com> Léo Le Bouter