diff options
author | Maxim Cournoyer <maxim.cournoyer@gmail.com> | 2022-01-25 23:36:11 -0500 |
---|---|---|
committer | Maxim Cournoyer <maxim.cournoyer@gmail.com> | 2022-01-25 23:48:37 -0500 |
commit | 0d41fe4855588fb659b8adafe215d5573517a79b (patch) | |
tree | 38b274bd03375f4fa5b7d3a9fb3f64a19786bef2 /guix/build-system | |
parent | 7c57821c68d199ad56a8ed750b36eccc7ef238dd (diff) | |
parent | 1a5302435ff0d2822b823f5a6fe01faa7a85c629 (diff) |
Merge branch 'staging' into core-updates.
With "conflicts" resolved in (mostly in favor of master/staging):
gnu/packages/admin.scm
gnu/packages/gnuzilla.scm
gnu/packages/gtk.scm
gnu/packages/kerberos.scm
gnu/packages/linux.scm
guix/lint.scm
Diffstat (limited to 'guix/build-system')
-rw-r--r-- | guix/build-system/clojure.scm | 9 | ||||
-rw-r--r-- | guix/build-system/cmake.scm | 3 | ||||
-rw-r--r-- | guix/build-system/go.scm | 26 | ||||
-rw-r--r-- | guix/build-system/guile.scm | 3 | ||||
-rw-r--r-- | guix/build-system/linux-module.scm | 93 | ||||
-rw-r--r-- | guix/build-system/meson.scm | 13 | ||||
-rw-r--r-- | guix/build-system/node.scm | 9 | ||||
-rw-r--r-- | guix/build-system/qt.scm | 3 |
8 files changed, 100 insertions, 59 deletions
diff --git a/guix/build-system/clojure.scm b/guix/build-system/clojure.scm index 39b7f44e89..2a0713d297 100644 --- a/guix/build-system/clojure.scm +++ b/guix/build-system/clojure.scm @@ -81,8 +81,7 @@ #:allow-other-keys #:rest arguments) "Return a bag for NAME." - (let ((private-keywords '(#:source #:target - #:inputs #:native-inputs + (let ((private-keywords '(#:target #:inputs #:native-inputs #:clojure #:jdk #:zip))) (if target @@ -108,8 +107,10 @@ #:key source (source-dirs `',%source-dirs) + (java-source-dirs `',%java-source-dirs) (test-dirs `',%test-dirs) (compile-dir %compile-dir) + (java-compile-dir %java-compile-dir) (jar-names `',(package-name->jar-names name)) (main-class %main-class) @@ -143,9 +144,11 @@ #:source #+source #:source-dirs #$source-dirs + #:java-source-dirs #$java-source-dirs #:test-dirs #$test-dirs #:compile-dir #$compile-dir - + #:java-compile-dir #$java-compile-dir + #:jar-names #$jar-names #:main-class #$main-class #:omit-source? #$omit-source? diff --git a/guix/build-system/cmake.scm b/guix/build-system/cmake.scm index 2056c04153..0aabc95b90 100644 --- a/guix/build-system/cmake.scm +++ b/guix/build-system/cmake.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2013, 2014, 2015, 2020, 2021 Ludovic Courtès <ludo@gnu.org> +;;; Copyright © 2013-2015, 2020-2022 Ludovic Courtès <ludo@gnu.org> ;;; Copyright © 2013 Cyril Roelandt <tipecaml@gmail.com> ;;; Copyright © 2017 Ricardo Wurmus <rekado@elephly.net> ;;; Copyright © 2020 Efraim Flashner <efraim@flashner.co.il> @@ -240,6 +240,7 @@ build system." #:parallel-tests? #$parallel-tests? #:validate-runpath? #$validate-runpath? #:patch-shebangs? #$patch-shebangs? + #:make-dynamic-linker-cache? #f ;cross-compiling #:strip-binaries? #$strip-binaries? #:strip-flags #$strip-flags #:strip-directories #$strip-directories)))) diff --git a/guix/build-system/go.scm b/guix/build-system/go.scm index 18824c79d9..5e0e5bbad3 100644 --- a/guix/build-system/go.scm +++ b/guix/build-system/go.scm @@ -2,8 +2,9 @@ ;;; Copyright © 2016 Petter <petter@mykolab.ch> ;;; Copyright © 2017 Leo Famulari <leo@famulari.name> ;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net> -;;; Copyright © 2021 Ludovic Courtès <ludo@gnu.org> +;;; Copyright © 2021-2022 Ludovic Courtès <ludo@gnu.org> ;;; Copyright © 2021 Efraim Flashner <efraim@flashner.co.il> +;;; Copyright © 2021 Sarah Morgensen <iskarian@mgsn.dev> ;;; ;;; This file is part of GNU Guix. ;;; @@ -112,6 +113,9 @@ commit hash and its date rather than a proper release tag." (let ((go (resolve-interface '(gnu packages golang)))) (module-ref go 'go))) +(define (make-go-std) + (module-ref (resolve-interface '(gnu packages golang)) 'make-go-std)) + (define* (lower name #:key source inputs native-inputs outputs system target (go (default-go)) @@ -121,6 +125,14 @@ commit hash and its date rather than a proper release tag." (define private-keywords '(#:target #:go #:inputs #:native-inputs)) + (define inputs-with-cache + ;; XXX: Avoid a circular dependency. This should be rewritten with + ;; 'package-mapping' or similar. + (let ((go-std-name (string-append (package-name go) "-std"))) + (if (string-prefix? go-std-name name) + inputs + (cons `(,go-std-name ,((make-go-std) go)) inputs)))) + (bag (name name) (system system) @@ -130,7 +142,7 @@ commit hash and its date rather than a proper release tag." '()) ,@`(("go" ,go)) ,@native-inputs - ,@(if target '() inputs) + ,@(if target '() inputs-with-cache) ,@(if target ;; Use the standard cross inputs of ;; 'gnu-build-system'. @@ -138,7 +150,7 @@ commit hash and its date rather than a proper release tag." '()) ;; Keep the standard inputs of 'gnu-build-system'. ,@(standard-packages))) - (host-inputs (if target inputs '())) + (host-inputs (if target inputs-with-cache '())) ;; The cross-libc is really a target package, but for bootstrapping ;; reasons, we can't put it in 'host-inputs'. Namely, 'cross-gcc' is a @@ -172,7 +184,8 @@ commit hash and its date rather than a proper release tag." (imported-modules %go-build-system-modules) (modules '((guix build go-build-system) (guix build union) - (guix build utils)))) + (guix build utils))) + (substitutable? #t)) (define builder (with-imported-modules imported-modules #~(begin @@ -182,6 +195,7 @@ commit hash and its date rather than a proper release tag." #:system #$system #:phases #$phases #:outputs #$(outputs->gexp outputs) + #:substitutable? #$substitutable? #:goarch #$goarch #:goos #$goos #:search-paths '#$(sexp->gexp @@ -222,7 +236,8 @@ commit hash and its date rather than a proper release tag." (imported-modules %go-build-system-modules) (modules '((guix build go-build-system) (guix build union) - (guix build utils)))) + (guix build utils))) + (substitutable? #t)) "Cross-build NAME using GO, where TARGET is a GNU triplet and with INPUTS." (define builder #~(begin @@ -261,6 +276,7 @@ commit hash and its date rather than a proper release tag." #:unpack-path #$unpack-path #:build-flags #$build-flags #:tests? #$tests? + #:make-dynamic-linker-cache? #f ;cross-compiling #:allow-go-reference? #$allow-go-reference? #:inputs %build-inputs))) diff --git a/guix/build-system/guile.scm b/guix/build-system/guile.scm index f64f214675..36a88e181a 100644 --- a/guix/build-system/guile.scm +++ b/guix/build-system/guile.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2018, 2019, 2021 Ludovic Courtès <ludo@gnu.org> +;;; Copyright © 2018-2019, 2021-2022 Ludovic Courtès <ludo@gnu.org> ;;; ;;; This file is part of GNU Guix. ;;; @@ -162,6 +162,7 @@ #:native-search-paths '#$(map search-path-specification->sexp native-search-paths) + #:make-dynamic-linker-cache? #f ;cross-compiling #:phases #$phases)))) (mlet %store-monad ((guile (package->derivation (or guile (default-guile)) diff --git a/guix/build-system/linux-module.scm b/guix/build-system/linux-module.scm index 57fce8e96e..e82a9ca65c 100644 --- a/guix/build-system/linux-module.scm +++ b/guix/build-system/linux-module.scm @@ -61,53 +61,52 @@ `(("linux" ,linux))) (arguments (substitute-keyword-arguments (package-arguments linux) - ((#:phases phases) - `(modify-phases ,phases - (replace 'build - (lambda _ - (invoke "make" "modules_prepare"))) - (delete 'strip) ; faster. - (replace 'install - (lambda* (#:key inputs outputs #:allow-other-keys) - (let* ((out (assoc-ref outputs "out")) - (out-lib-build (string-append out "/lib/modules/build"))) - ;; Delete some huge items that we probably don't need. - ;; TODO: Only preserve the minimum, i.e. [Kbuild], Kconfig, - ;; scripts, include, ".config". - (copy-recursively "." out-lib-build) - (for-each (lambda (name) - (when (file-exists? name) - (delete-file-recursively name))) - (map (lambda (name) - (string-append out-lib-build "/" name)) - '("arch" ; 137 MB - ;"tools" ; 44 MB ; Note: is built by our 'build phase. - "tools/testing" ; 14 MB - "tools/perf" ; 17 MB - "drivers" ; 600 MB - "Documentation" ; 52 MB - "fs" ; 43 MB - "net" ; 33 MB - "samples" ; 2 MB - "sound"))) ; 40 MB - ;; Reinstate arch/**/dts since "scripts/dtc" depends on it. - ;; Reinstate arch/**/include directories. - ;; Reinstate arch/**/Makefile. - ;; Reinstate arch/**/module.lds. - (for-each - (lambda (name) - (mkdir-p (dirname (string-append out-lib-build "/" name))) - (copy-recursively name - (string-append out-lib-build "/" name))) - (append (find-files "arch" "^(dts|include)$" #:directories? #t) - (find-files "arch" "^(Makefile|module.lds)$"))) - (let* ((linux (assoc-ref inputs "linux"))) - (install-file (string-append linux "/System.map") - out-lib-build) - (let ((source (string-append linux "/Module.symvers"))) - (when (file-exists? source) - (install-file source out-lib-build)))) - #t))))))))) + ((#:phases phases) + #~(modify-phases #$phases + (replace 'build + (lambda _ + (invoke "make" "modules_prepare"))) + (delete 'strip) ; faster + (replace 'install + (lambda* (#:key inputs #:allow-other-keys) + (let ((out-lib-build (string-append #$output "/lib/modules/build"))) + ;; Delete some huge items that we probably don't need. + ;; TODO: Only preserve the minimum, i.e. [Kbuild], Kconfig, + ;; scripts, include, ".config". + (copy-recursively "." out-lib-build) + (for-each (lambda (name) + (when (file-exists? name) + (delete-file-recursively name))) + (map (lambda (name) + (string-append out-lib-build "/" name)) + '("arch" ; 137 MB + ;;"tools" ; 44 MB built by our 'build phase + "tools/testing" ; 14 MB + "tools/perf" ; 17 MB + "drivers" ; 600 MB + "Documentation" ; 52 MB + "fs" ; 43 MB + "net" ; 33 MB + "samples" ; 2 MB + "sound"))) ; 40 MB + ;; Reinstate arch/**/dts since "scripts/dtc" depends on it. + ;; Reinstate arch/**/include directories. + ;; Reinstate arch/**/Makefile. + ;; Reinstate arch/**/module.lds. + (for-each + (lambda (name) + (mkdir-p (dirname (string-append out-lib-build "/" name))) + (copy-recursively name + (string-append out-lib-build "/" name))) + (append (find-files "arch" "^(dts|include)$" + #:directories? #t) + (find-files "arch" "^(Makefile|module.lds)$"))) + (let* ((linux #$(this-package-input "linux"))) + (install-file (string-append linux "/System.map") + out-lib-build) + (let ((source (string-append linux "/Module.symvers"))) + (when (file-exists? source) + (install-file source out-lib-build))))))))))))) (define* (lower name #:key source inputs native-inputs outputs diff --git a/guix/build-system/meson.scm b/guix/build-system/meson.scm index ba7441a3eb..ad604f8871 100644 --- a/guix/build-system/meson.scm +++ b/guix/build-system/meson.scm @@ -287,6 +287,19 @@ SOURCE has a 'meson.build' file." #~(begin (use-modules #$@(sexp->gexp modules)) + (define %build-host-inputs + #+(input-tuples->gexp build-inputs)) + + (define %build-target-inputs + (append #$(input-tuples->gexp host-inputs) + #+(input-tuples->gexp target-inputs))) + + (define %build-inputs + (append %build-host-inputs %build-target-inputs)) + + (define %outputs + #$(outputs->gexp outputs)) + (define build-phases #$(let ((phases (if (pair? phases) (sexp->gexp phases) phases))) (if glib-or-gtk? diff --git a/guix/build-system/node.scm b/guix/build-system/node.scm index 735f8dd06e..24bd677bfc 100644 --- a/guix/build-system/node.scm +++ b/guix/build-system/node.scm @@ -2,6 +2,8 @@ ;;; Copyright © 2016 Jelle Licht <jlicht@fsfe.org> ;;; Copyright © 2019 Timothy Sample <samplet@ngyro.com> ;;; Copyright © 2021 Ludovic Courtès <ludo@gnu.org> +;;; Copyright © 2021 Pierre Langlois <pierre.langlois@gmx.com> +;;; Copyright © 2021 Philip McGrath <philip@philipmcgrath.com> ;;; ;;; This file is part of GNU Guix. ;;; @@ -61,10 +63,15 @@ `(("source" ,source)) '()) ,@inputs - ;; Keep the standard inputs of 'gnu-build-system'. ,@(standard-packages))) (build-inputs `(("node" ,node) + ;; Many packages with native addons need + ;; libuv headers. The libuv version must + ;; be exactly the same as for the node + ;; package we are adding implicitly, + ;; so we take care of adding libuv, too. + ("libuv" ,@(assoc-ref (package-inputs node) "libuv")) ,@native-inputs)) (outputs outputs) (build node-build) diff --git a/guix/build-system/qt.scm b/guix/build-system/qt.scm index 003a065aa6..a0b968cef3 100644 --- a/guix/build-system/qt.scm +++ b/guix/build-system/qt.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2013, 2014, 2015, 2021 Ludovic Courtès <ludo@gnu.org> +;;; Copyright © 2013-2015, 2021-2022 Ludovic Courtès <ludo@gnu.org> ;;; Copyright © 2013 Cyril Roelandt <tipecaml@gmail.com> ;;; Copyright © 2017 Ricardo Wurmus <rekado@elephly.net> ;;; Copyright © 2019 Hartmut Goebel <h.goebel@crazy-compilers.com> @@ -247,6 +247,7 @@ build system." #:parallel-tests? #$parallel-tests? #:validate-runpath? #$validate-runpath? #:patch-shebangs? #$patch-shebangs? + #:make-dynamic-linker-cache? #f ;cross-compiling #:strip-binaries? #$strip-binaries? #:strip-flags #$strip-flags #:strip-directories #$strip-directories)))) |