diff options
Diffstat (limited to 'guix')
56 files changed, 450 insertions, 259 deletions
diff --git a/guix/build-system/agda.scm b/guix/build-system/agda.scm index 64983dff60..ec6ad860e0 100644 --- a/guix/build-system/agda.scm +++ b/guix/build-system/agda.scm @@ -38,7 +38,7 @@ (define %agda-build-system-modules `((guix build agda-build-system) - ,@%gnu-build-system-modules)) + ,@%default-gnu-imported-modules)) (define %default-modules '((guix build agda-build-system) @@ -69,7 +69,6 @@ (list "ghc" (default-haskell)) (standard-packages)) '()) - ,(assoc "locales" (standard-packages)) ,@native-inputs)) (outputs outputs) (build agda-build) diff --git a/guix/build-system/android-ndk.scm b/guix/build-system/android-ndk.scm index aa7cc06279..b8cd56b871 100644 --- a/guix/build-system/android-ndk.scm +++ b/guix/build-system/android-ndk.scm @@ -31,7 +31,7 @@ (define %android-ndk-build-system-modules ;; Build-side modules imported by default. `((guix build android-ndk-build-system) - ,@%gnu-build-system-modules)) + ,@%default-gnu-imported-modules)) (define* (android-ndk-build name inputs #:key diff --git a/guix/build-system/ant.scm b/guix/build-system/ant.scm index 84bf951fab..9816cc061c 100644 --- a/guix/build-system/ant.scm +++ b/guix/build-system/ant.scm @@ -43,7 +43,7 @@ (guix build maven plugin) (guix build maven pom) (guix build java-utils) - ,@%gnu-build-system-modules)) + ,@%default-gnu-imported-modules)) (define (default-jdk) "Return the default JDK package." diff --git a/guix/build-system/asdf.scm b/guix/build-system/asdf.scm index 2b17cee37b..26b5a5008a 100644 --- a/guix/build-system/asdf.scm +++ b/guix/build-system/asdf.scm @@ -56,7 +56,7 @@ `((guix build asdf-build-system) (guix build lisp-utils) (guix build union) - ,@%gnu-build-system-modules)) + ,@%default-gnu-imported-modules)) (define %asdf-build-modules ;; Used (visible) build-side modules diff --git a/guix/build-system/cargo.scm b/guix/build-system/cargo.scm index c029cc1dda..658a2e525e 100644 --- a/guix/build-system/cargo.scm +++ b/guix/build-system/cargo.scm @@ -70,7 +70,7 @@ to NAME and VERSION." (define %cargo-utils-modules ;; Build-side modules imported by default. `((guix build cargo-utils) - ,@%gnu-build-system-modules)) + ,@%default-gnu-imported-modules)) (define %cargo-build-system-modules ;; Build-side modules imported by default. diff --git a/guix/build-system/chicken.scm b/guix/build-system/chicken.scm index 9f518e66e6..e6fcfa7ee3 100644 --- a/guix/build-system/chicken.scm +++ b/guix/build-system/chicken.scm @@ -42,7 +42,7 @@ EXTENSION is the file name extension, such as '.tar.gz'." ;; Build-side modules imported and used by default. `((guix build chicken-build-system) (guix build union) - ,@%gnu-build-system-modules)) + ,@%default-gnu-imported-modules)) (define (default-chicken) ;; Lazily resolve the binding to avoid a circular dependency. diff --git a/guix/build-system/cmake.scm b/guix/build-system/cmake.scm index aa187c9844..0b8a651ee0 100644 --- a/guix/build-system/cmake.scm +++ b/guix/build-system/cmake.scm @@ -42,7 +42,7 @@ (define %cmake-build-system-modules ;; Build-side modules imported by default. `((guix build cmake-build-system) - ,@%gnu-build-system-modules)) + ,@%default-gnu-imported-modules)) (define (default-cmake target) "Return the default CMake package." @@ -116,6 +116,7 @@ (imported-modules %cmake-build-system-modules) (modules '((guix build cmake-build-system) (guix build utils))) + allowed-references disallowed-references) "Build SOURCE using CMAKE, and with INPUTS. This assumes that SOURCE provides a 'CMakeLists.txt' file as its build system." @@ -158,6 +159,7 @@ provides a 'CMakeLists.txt' file as its build system." #:target #f #:graft? #f #:substitutable? substitutable? + #:allowed-references allowed-references #:disallowed-references disallowed-references #:guile-for-build guile))) @@ -193,6 +195,7 @@ provides a 'CMakeLists.txt' file as its build system." (imported-modules %cmake-build-system-modules) (modules '((guix build cmake-build-system) (guix build utils))) + allowed-references disallowed-references) "Cross-build NAME using CMAKE for TARGET, where TARGET is a GNU triplet and with INPUTS. This assumes that SOURCE provides a 'CMakeLists.txt' file as its @@ -250,6 +253,8 @@ build system." #:target target #:graft? #f #:substitutable? substitutable? + #:allowed-references allowed-references + #:disallowed-references disallowed-references #:guile-for-build guile))) (define cmake-build-system diff --git a/guix/build-system/composer.scm b/guix/build-system/composer.scm index 2ad7bbb36a..48ad90f253 100644 --- a/guix/build-system/composer.scm +++ b/guix/build-system/composer.scm @@ -62,7 +62,7 @@ ;; Build-side modules imported by default. `((guix build composer-build-system) (guix build union) - ,@%gnu-build-system-modules)) + ,@%default-gnu-imported-modules)) (define* (lower name #:key source inputs native-inputs outputs system target diff --git a/guix/build-system/copy.scm b/guix/build-system/copy.scm index d58931b33c..1f2937e0f1 100644 --- a/guix/build-system/copy.scm +++ b/guix/build-system/copy.scm @@ -46,7 +46,7 @@ (define %copy-build-system-modules ;; Build-side modules imported by default. `((guix build copy-build-system) - ,@%gnu-build-system-modules)) + ,@%default-gnu-imported-modules)) (define (default-glibc) "Return the default glibc package." diff --git a/guix/build-system/dub.scm b/guix/build-system/dub.scm index 951c084398..831a34af0d 100644 --- a/guix/build-system/dub.scm +++ b/guix/build-system/dub.scm @@ -59,7 +59,7 @@ (define %dub-build-system-modules ;; Build-side modules imported by default. `((guix build dub-build-system) - ,@%gnu-build-system-modules)) + ,@%default-gnu-imported-modules)) (define* (dub-build name inputs #:key diff --git a/guix/build-system/elm.scm b/guix/build-system/elm.scm index f5321f811b..7405db3d98 100644 --- a/guix/build-system/elm.scm +++ b/guix/build-system/elm.scm @@ -88,7 +88,7 @@ given VERSION with sha256 checksum HASH." `((guix build elm-build-system) (guix build json) (guix build union) - ,@%gnu-build-system-modules)) + ,@%default-gnu-imported-modules)) (define %elm-default-modules ;; Modules in scope in the build-side environment. diff --git a/guix/build-system/emacs.scm b/guix/build-system/emacs.scm index ebf97a5344..03273d738b 100644 --- a/guix/build-system/emacs.scm +++ b/guix/build-system/emacs.scm @@ -46,7 +46,7 @@ ;; Build-side modules imported by default. `((guix build emacs-build-system) (guix build emacs-utils) - ,@%gnu-build-system-modules)) + ,@%default-gnu-imported-modules)) (define (default-emacs) "Return the default Emacs package." diff --git a/guix/build-system/font.scm b/guix/build-system/font.scm index c57c304f52..a4eeca00ca 100644 --- a/guix/build-system/font.scm +++ b/guix/build-system/font.scm @@ -40,7 +40,7 @@ (define %font-build-system-modules ;; Build-side modules imported by default. `((guix build font-build-system) - ,@%gnu-build-system-modules)) + ,@%default-gnu-imported-modules)) (define* (lower name #:key source inputs native-inputs outputs system target @@ -76,6 +76,7 @@ (tests? #t) (test-target "test") (configure-flags ''()) + (license-file-regexp '%license-file-regexp) (phases '%standard-phases) (outputs '("out")) (search-paths '()) @@ -97,6 +98,7 @@ #:system #$system #:test-target #$test-target #:tests? #$tests? + #:license-file-regexp #$license-file-regexp #:phases #$(if (pair? phases) (sexp->gexp phases) phases) diff --git a/guix/build-system/glib-or-gtk.scm b/guix/build-system/glib-or-gtk.scm index 726d19efad..5d026ec5ab 100644 --- a/guix/build-system/glib-or-gtk.scm +++ b/guix/build-system/glib-or-gtk.scm @@ -72,7 +72,7 @@ (define %glib-or-gtk-build-system-modules ;; Build-side modules imported and used by default. `((guix build glib-or-gtk-build-system) - ,@%gnu-build-system-modules)) + ,@%default-gnu-imported-modules)) (define (default-glib) "Return the default glib package from which we use diff --git a/guix/build-system/gnu.scm b/guix/build-system/gnu.scm index cdbb547773..3a314d34b7 100644 --- a/guix/build-system/gnu.scm +++ b/guix/build-system/gnu.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2012-2023 Ludovic Courtès <ludo@gnu.org> +;;; Copyright © 2012-2024 Ludovic Courtès <ludo@gnu.org> ;;; ;;; This file is part of GNU Guix. ;;; @@ -19,6 +19,7 @@ (define-module (guix build-system gnu) #:use-module (guix store) #:use-module (guix utils) + #:use-module (guix deprecation) #:use-module (guix memoization) #:use-module (guix gexp) #:use-module (guix monads) @@ -27,7 +28,8 @@ #:use-module (guix packages) #:use-module (srfi srfi-1) #:use-module (ice-9 match) - #:export (%gnu-build-system-modules + #:export (%default-gnu-imported-modules + %default-gnu-modules %strip-flags %strip-directories gnu-build @@ -48,14 +50,17 @@ ;; ;; Code: -(define %gnu-build-system-modules +(define %default-gnu-imported-modules ;; Build-side modules imported and used by default. '((guix build gnu-build-system) (guix build utils) (guix build gremlin) (guix elf))) -(define %default-modules +(define-deprecated/public-alias %gnu-build-system-modules + %default-gnu-imported-modules) + +(define %default-gnu-modules ;; Modules in scope in the build-side environment. '((guix build gnu-build-system) (guix build utils))) @@ -184,21 +189,22 @@ flags for VARIABLE, the associated value is augmented." (input input)) inputs)) - (package (inherit p) + (package + (inherit p) (arguments (let ((args (package-arguments p))) (substitute-keyword-arguments args ((#:configure-flags flags) (let* ((var= (string-append variable "=")) (len (string-length var=))) - `(cons ,(string-append var= value) - (map (lambda (flag) - (if (string-prefix? ,var= flag) - (string-append - ,(string-append var= value " ") - (substring flag ,len)) - flag)) - ,flags))))))) + #~(cons #$(string-append var= value) + (map (lambda (flag) + (if (string-prefix? #$var= flag) + (string-append + #$(string-append var= value " ") + (substring flag #$len)) + flag)) + #$flags))))))) (replacement (let ((replacement (package-replacement p))) (and replacement @@ -237,10 +243,10 @@ exact build phases are defined by PHASES." (arguments ;; Use the right phases and modules. (substitute-keyword-arguments (package-arguments p) - ((#:modules modules %default-modules) + ((#:modules modules %default-gnu-modules) `((guix build gnu-dist) ,@modules)) - ((#:imported-modules modules %gnu-build-system-modules) + ((#:imported-modules modules %default-gnu-imported-modules) `((guix build gnu-dist) ,@modules)) ((#:phases _ #f) @@ -356,11 +362,12 @@ standard packages used as implicit inputs of the GNU build system." (make-dynamic-linker-cache? #t) (license-file-regexp %license-file-regexp) (phases '%standard-phases) - (locale "en_US.utf8") + (locale "C.UTF-8") + (separate-from-pid1? #t) (system (%current-system)) (build (nix-system->gnu-triplet system)) - (imported-modules %gnu-build-system-modules) - (modules %default-modules) + (imported-modules %default-gnu-imported-modules) + (modules %default-gnu-modules) (substitutable? #t) allowed-references disallowed-references) @@ -399,6 +406,7 @@ are allowed to refer to." (sexp->gexp phases) phases) #:locale #$locale + #:separate-from-pid1? #$separate-from-pid1? #:bootstrap-scripts #$bootstrap-scripts #:configure-flags #$(if (pair? configure-flags) (sexp->gexp configure-flags) @@ -499,11 +507,12 @@ is one of `host' or `target'." (license-file-regexp %license-file-regexp) (phases '%standard-phases) - (locale "en_US.utf8") + (locale "C.UTF-8") + (separate-from-pid1? #t) (system (%current-system)) (build (nix-system->gnu-triplet system)) - (imported-modules %gnu-build-system-modules) - (modules %default-modules) + (imported-modules %default-gnu-imported-modules) + (modules %default-gnu-modules) (substitutable? #t) allowed-references disallowed-references) @@ -545,6 +554,7 @@ platform." (sexp->gexp phases) phases) #:locale #$locale + #:separate-from-pid1? #$separate-from-pid1? #:bootstrap-scripts #$bootstrap-scripts #:configure-flags #$configure-flags #:make-flags #$make-flags diff --git a/guix/build-system/go.scm b/guix/build-system/go.scm index 0934fded07..329e760f66 100644 --- a/guix/build-system/go.scm +++ b/guix/build-system/go.scm @@ -107,7 +107,7 @@ commit hash and its date rather than a proper release tag." ;; Build-side modules imported and used by default. `((guix build go-build-system) (guix build union) - ,@%gnu-build-system-modules)) + ,@%default-gnu-imported-modules)) (define (default-go) ;; Lazily resolve the binding to avoid a circular dependency. @@ -184,6 +184,8 @@ commit hash and its date rather than a proper release tag." (unpack-path "") (build-flags ''()) (tests? #t) + (parallel-build? #t) + (parallel-tests? #t) (allow-go-reference? #f) (system (%current-system)) (goarch #f) @@ -214,6 +216,8 @@ commit hash and its date rather than a proper release tag." #:unpack-path #$unpack-path #:build-flags #$build-flags #:tests? #$tests? + #:parallel-build? #$parallel-build? + #:parallel-tests? #$parallel-tests? #:allow-go-reference? #$allow-go-reference? #:inputs #$(input-tuples->gexp inputs))))) diff --git a/guix/build-system/guile.scm b/guix/build-system/guile.scm index bd3bb1c870..ee59bb15f2 100644 --- a/guix/build-system/guile.scm +++ b/guix/build-system/guile.scm @@ -36,7 +36,7 @@ (define %guile-build-system-modules ;; Build-side modules imported by default. `((guix build guile-build-system) - ,@%gnu-build-system-modules)) + ,@%default-gnu-imported-modules)) (define* (lower name #:key source inputs native-inputs outputs system target @@ -64,7 +64,7 @@ ,@native-inputs ,@(if implicit-inputs? (map (cute assoc <> (standard-packages)) - '("tar" "gzip" "bzip2" "xz" "locales")) + '("tar" "gzip" "bzip2" "xz")) '()))) (outputs outputs) (build (if target guile-cross-build guile-build)) diff --git a/guix/build-system/haskell.scm b/guix/build-system/haskell.scm index f8568e33db..b0019dd014 100644 --- a/guix/build-system/haskell.scm +++ b/guix/build-system/haskell.scm @@ -55,7 +55,7 @@ to NAME and VERSION." (define %haskell-build-system-modules ;; Build-side modules imported by default. `((guix build haskell-build-system) - ,@%gnu-build-system-modules)) + ,@%default-gnu-imported-modules)) (define (default-haskell) "Return the default Haskell package." diff --git a/guix/build-system/julia.scm b/guix/build-system/julia.scm index b5521e38e4..e098749683 100644 --- a/guix/build-system/julia.scm +++ b/guix/build-system/julia.scm @@ -42,7 +42,7 @@ (define %julia-build-system-modules ;; Build-side modules imported by default. `((guix build julia-build-system) - ,@%gnu-build-system-modules)) + ,@%default-gnu-imported-modules)) (define (default-julia) "Return the default Julia package." diff --git a/guix/build-system/linux-module.scm b/guix/build-system/linux-module.scm index e46195b53c..d0654a923e 100644 --- a/guix/build-system/linux-module.scm +++ b/guix/build-system/linux-module.scm @@ -41,7 +41,7 @@ (define %linux-module-build-system-modules ;; Build-side modules imported by default. `((guix build linux-module-build-system) - ,@%gnu-build-system-modules)) + ,@%default-gnu-imported-modules)) (define (default-linux) "Return the default Linux package." diff --git a/guix/build-system/maven.scm b/guix/build-system/maven.scm index 4bbeaed6a4..03e4e96b89 100644 --- a/guix/build-system/maven.scm +++ b/guix/build-system/maven.scm @@ -46,7 +46,7 @@ ;; Build-side modules imported by default. `((guix build maven-build-system) (guix build maven pom) - ,@%gnu-build-system-modules)) + ,@%default-gnu-imported-modules)) (define (default-maven) "Return the default maven package." diff --git a/guix/build-system/minify.scm b/guix/build-system/minify.scm index b377b506b5..98c6e75980 100644 --- a/guix/build-system/minify.scm +++ b/guix/build-system/minify.scm @@ -39,7 +39,7 @@ (define %minify-build-system-modules ;; Build-side modules imported by default. `((guix build minify-build-system) - ,@%gnu-build-system-modules)) + ,@%default-gnu-imported-modules)) (define (default-esbuild) "Return the default package to minify JavaScript source files." diff --git a/guix/build-system/mix.scm b/guix/build-system/mix.scm index 1b04053d70..4a3ba9fb60 100644 --- a/guix/build-system/mix.scm +++ b/guix/build-system/mix.scm @@ -38,11 +38,6 @@ #:use-module (srfi srfi-26) #:export (mix-build-system hexpm-uri)) -;; Lazily resolve bindings to avoid circular dependencies. -(define (default-glibc-utf8-locales) - (let* ((base (resolve-interface '(gnu packages base)))) - (module-ref base 'glibc-utf8-locales))) - (define (default-elixir-hex) (let ((elixir (resolve-interface '(gnu packages elixir)))) (module-ref elixir 'elixir-hex))) @@ -90,7 +85,7 @@ See: https://github.com/hexpm/specifications/blob/main/endpoints.md" (system (%current-system)) (guile #f) (imported-modules `((guix build mix-build-system) - ,@%gnu-build-system-modules)) + ,@%default-gnu-imported-modules)) (modules '((guix build mix-build-system) (guix build utils)))) "Build SOURCE using Elixir, and with INPUTS." @@ -144,7 +139,6 @@ See: https://github.com/hexpm/specifications/blob/main/endpoints.md" #:key (elixir (default-elixir)) (elixir-hex (default-elixir-hex)) - (glibc-utf8-locales (default-glibc-utf8-locales)) (inputs '()) (native-inputs '()) (propagated-inputs '()) @@ -159,11 +153,10 @@ See: https://github.com/hexpm/specifications/blob/main/endpoints.md" (let ((private-keywords '(#:inputs #:native-inputs #:outputs #:system #:target - #:elixir #:elixir-hex #:glibc-utf8-locales + #:elixir #:elixir-hex #:rebar3 #:erlang)) (build-inputs `(,@(standard-packages) - ("glibc-utf8-locales" ,glibc-utf8-locales) ("erlang" ,(lookup-package-input elixir "erlang")) ("rebar3" ,rebar3) ("elixir" ,elixir) diff --git a/guix/build-system/node.scm b/guix/build-system/node.scm index 3f73390809..57fe5f6030 100644 --- a/guix/build-system/node.scm +++ b/guix/build-system/node.scm @@ -37,7 +37,7 @@ ;; Build-side modules imported by default. `((guix build node-build-system) (guix build json) - ,@%gnu-build-system-modules)) + ,@%default-gnu-imported-modules)) (define (default-node) "Return the default Node package." diff --git a/guix/build-system/ocaml.scm b/guix/build-system/ocaml.scm index 582d00b4cd..2f2e6dd62e 100644 --- a/guix/build-system/ocaml.scm +++ b/guix/build-system/ocaml.scm @@ -65,7 +65,7 @@ (define %ocaml-build-system-modules ;; Build-side modules imported by default. `((guix build ocaml-build-system) - ,@%gnu-build-system-modules)) + ,@%default-gnu-imported-modules)) (define (default-ocaml) "Return the default OCaml package." diff --git a/guix/build-system/perl.scm b/guix/build-system/perl.scm index 3f7a2dea27..98d48fec7c 100644 --- a/guix/build-system/perl.scm +++ b/guix/build-system/perl.scm @@ -45,7 +45,7 @@ (define %perl-build-system-modules ;; Build-side modules imported by default. `((guix build perl-build-system) - ,@%gnu-build-system-modules)) + ,@%default-gnu-imported-modules)) (define (default-perl) "Return the default Perl package." diff --git a/guix/build-system/pyproject.scm b/guix/build-system/pyproject.scm index 2a2c3af3f3..9a27ebee35 100644 --- a/guix/build-system/pyproject.scm +++ b/guix/build-system/pyproject.scm @@ -98,7 +98,9 @@ (guile #f) (imported-modules %pyproject-build-system-modules) (modules '((guix build pyproject-build-system) - (guix build utils)))) + (guix build utils))) + allowed-references + disallowed-references) "Build SOURCE using PYTHON, and with INPUTS." (define build (with-imported-modules imported-modules @@ -131,7 +133,9 @@ #:system system #:graft? #f ;consistent with 'gnu-build' #:target #f - #:guile-for-build guile))) + #:guile-for-build guile + #:allowed-references allowed-references + #:disallowed-references disallowed-references))) (define pyproject-build-system (build-system diff --git a/guix/build-system/python.scm b/guix/build-system/python.scm index cca009fb28..a51c033d01 100644 --- a/guix/build-system/python.scm +++ b/guix/build-system/python.scm @@ -59,7 +59,7 @@ extension, such as '.tar.gz'." (define %python-build-system-modules ;; Build-side modules imported by default. `((guix build python-build-system) - ,@%gnu-build-system-modules)) + ,@%default-gnu-imported-modules)) (define (default-python) "Return the default Python package." @@ -179,7 +179,9 @@ pre-defined variants." (guile #f) (imported-modules %python-build-system-modules) (modules '((guix build python-build-system) - (guix build utils)))) + (guix build utils))) + allowed-references + disallowed-references) "Build SOURCE using PYTHON, and with INPUTS. This assumes that SOURCE provides a 'setup.py' file as its build system." (define build @@ -204,14 +206,15 @@ provides a 'setup.py' file as its build system." search-paths)) #:inputs %build-inputs))))) - (mlet %store-monad ((guile (package->derivation (or guile (default-guile)) system #:graft? #f))) (gexp->derivation name build #:system system #:graft? #f ;consistent with 'gnu-build' #:target #f - #:guile-for-build guile))) + #:guile-for-build guile + #:allowed-references allowed-references + #:disallowed-references disallowed-references))) (define python-build-system (build-system diff --git a/guix/build-system/qt.scm b/guix/build-system/qt.scm index 978aed0fc1..bce2ead212 100644 --- a/guix/build-system/qt.scm +++ b/guix/build-system/qt.scm @@ -4,6 +4,7 @@ ;;; Copyright © 2017 Ricardo Wurmus <rekado@elephly.net> ;;; Copyright © 2019 Hartmut Goebel <h.goebel@crazy-compilers.com> ;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net> +;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be> ;;; Copyright © 2022 Maxim Cournoyer <maxim.cournoyer@gmail.com> ;;; ;;; This file is part of GNU Guix. @@ -142,7 +143,9 @@ (system (%current-system)) (imported-modules %qt-build-system-modules) (modules '((guix build qt-build-system) - (guix build utils)))) + (guix build utils))) + allowed-references + disallowed-references) "Build SOURCE using CMAKE, and with INPUTS. This assumes that SOURCE provides a 'CMakeLists.txt' file as its build system." (define builder @@ -181,7 +184,9 @@ provides a 'CMakeLists.txt' file as its build system." (gexp->derivation name builder #:graft? #f ;consistent with 'gnu-build' #:system system - #:guile-for-build guile))) + #:guile-for-build guile + #:allowed-references allowed-references + #:disallowed-references disallowed-references))) ;;; @@ -214,7 +219,9 @@ provides a 'CMakeLists.txt' file as its build system." (build (nix-system->gnu-triplet system)) (imported-modules %qt-build-system-modules) (modules '((guix build qt-build-system) - (guix build utils)))) + (guix build utils))) + allowed-references + disallowed-references) "Cross-build NAME using CMAKE for TARGET, where TARGET is a GNU triplet and with INPUTS. This assumes that SOURCE provides a 'CMakeLists.txt' file as its build system." @@ -268,7 +275,9 @@ build system." (gexp->derivation name builder #:graft? #f ;consistent with 'gnu-build' #:system system - #:guile-for-build guile))) + #:guile-for-build guile + #:allowed-references allowed-references + #:disallowed-references disallowed-references))) (define qt-build-system (build-system diff --git a/guix/build-system/r.scm b/guix/build-system/r.scm index 7ab4db82b6..0e6c1d8577 100644 --- a/guix/build-system/r.scm +++ b/guix/build-system/r.scm @@ -68,7 +68,7 @@ release corresponding to NAME and VERSION." (define %r-build-system-modules ;; Build-side modules imported by default. `((guix build r-build-system) - ,@%gnu-build-system-modules)) + ,@%default-gnu-imported-modules)) (define (default-r) "Return the default R package." diff --git a/guix/build-system/rakudo.scm b/guix/build-system/rakudo.scm index 3b30fdfd0e..ee13c50791 100644 --- a/guix/build-system/rakudo.scm +++ b/guix/build-system/rakudo.scm @@ -41,7 +41,7 @@ (define %rakudo-build-system-modules ;; Build-side modules imported by default. `((guix build rakudo-build-system) - ,@%gnu-build-system-modules)) + ,@%default-gnu-imported-modules)) (define (default-rakudo) "Return the default Rakudo package." diff --git a/guix/build-system/rebar.scm b/guix/build-system/rebar.scm index de1294ec3f..7c7cc5870f 100644 --- a/guix/build-system/rebar.scm +++ b/guix/build-system/rebar.scm @@ -56,7 +56,7 @@ and VERSION." (define %rebar-build-system-modules ;; Build-side modules imported by default. `((guix build rebar-build-system) - ,@%gnu-build-system-modules)) + ,@%default-gnu-imported-modules)) (define (default-rebar3) "Return the default Rebar3 package." diff --git a/guix/build-system/renpy.scm b/guix/build-system/renpy.scm index 3039e3c63b..015dd7c210 100644 --- a/guix/build-system/renpy.scm +++ b/guix/build-system/renpy.scm @@ -44,7 +44,7 @@ `((guix build renpy-build-system) (guix build json) (guix build python-build-system) - ,@%gnu-build-system-modules)) + ,@%default-gnu-imported-modules)) (define* (lower name #:key source inputs native-inputs outputs system target diff --git a/guix/build-system/ruby.scm b/guix/build-system/ruby.scm index a3793a9381..33aab5f719 100644 --- a/guix/build-system/ruby.scm +++ b/guix/build-system/ruby.scm @@ -39,7 +39,7 @@ NAME and VERSION." (define %ruby-build-system-modules ;; Build-side modules imported by default. `((guix build ruby-build-system) - ,@%gnu-build-system-modules)) + ,@%default-gnu-imported-modules)) (define (default-ruby) "Return the default Ruby package." diff --git a/guix/build-system/scons.scm b/guix/build-system/scons.scm index 046ddef740..e76c419b1e 100644 --- a/guix/build-system/scons.scm +++ b/guix/build-system/scons.scm @@ -39,7 +39,7 @@ (define %scons-build-system-modules ;; Build-side modules imported by default. `((guix build scons-build-system) - ,@%gnu-build-system-modules)) + ,@%default-gnu-imported-modules)) (define (default-scons) "Return the default SCons package." diff --git a/guix/build-system/texlive.scm b/guix/build-system/texlive.scm index 88372faa58..2baa35466b 100644 --- a/guix/build-system/texlive.scm +++ b/guix/build-system/texlive.scm @@ -78,7 +78,7 @@ level package ID." ;; Build-side modules imported by default. `((guix build texlive-build-system) (guix build union) - ,@%gnu-build-system-modules)) + ,@%default-gnu-imported-modules)) (define (default-texlive-bin) "Return the default texlive-bin package." diff --git a/guix/build-system/waf.scm b/guix/build-system/waf.scm index 91b3d0d100..5f24615514 100644 --- a/guix/build-system/waf.scm +++ b/guix/build-system/waf.scm @@ -42,7 +42,7 @@ (define %waf-build-system-modules ;; Build-side modules imported by default. `((guix build waf-build-system) - ,@%gnu-build-system-modules)) + ,@%default-gnu-imported-modules)) (define* (lower name #:key source inputs native-inputs outputs system target diff --git a/guix/build-system/zig.scm b/guix/build-system/zig.scm index 1fa4782a2e..ad8a96b607 100644 --- a/guix/build-system/zig.scm +++ b/guix/build-system/zig.scm @@ -39,7 +39,7 @@ (define %zig-build-system-modules ;; Build-side modules imported by default. `((guix build zig-build-system) - ,@%gnu-build-system-modules)) + ,@%default-gnu-imported-modules)) (define* (zig-build name inputs #:key diff --git a/guix/build/agda-build-system.scm b/guix/build/agda-build-system.scm index 49836d5dea..8770710b90 100644 --- a/guix/build/agda-build-system.scm +++ b/guix/build/agda-build-system.scm @@ -29,7 +29,8 @@ (define* (set-locpath #:key inputs native-inputs #:allow-other-keys) (let ((locales (assoc-ref (or native-inputs inputs) "locales"))) - (setenv "GUIX_LOCPATH" (string-append locales "/lib/locale")))) + (when locales + (setenv "GUIX_LOCPATH" (string-append locales "/lib/locale"))))) (define %agda-possible-extensions (cons diff --git a/guix/build/cargo-build-system.scm b/guix/build/cargo-build-system.scm index 70ddf063d2..fc200764c7 100644 --- a/guix/build/cargo-build-system.scm +++ b/guix/build/cargo-build-system.scm @@ -119,7 +119,7 @@ libraries or executables." (error "Possible pre-generated files found:" pregenerated-files)))) (define* (configure #:key inputs - target + target system (vendor-dir "guix-vendor") #:allow-other-keys) "Vendor Cargo.toml dependencies as guix inputs." @@ -179,6 +179,10 @@ libraries or executables." ;; Prevent targeting the build machine. (setenv "CRATE_CC_NO_DEFAULTS" "1")) + ;; Support 16k kernel page sizes on aarch64 with jemalloc. + (when (string-prefix? "aarch64" (or target system)) + (setenv "JEMALLOC_SYS_WITH_LG_PAGE" "14")) + ;; Configure cargo to actually use this new directory with all the crates. (setenv "CARGO_HOME" (string-append (getcwd) "/.cargo")) (mkdir-p ".cargo") diff --git a/guix/build/copy-build-system.scm b/guix/build/copy-build-system.scm index fb2d1db056..25d3f4c57a 100644 --- a/guix/build/copy-build-system.scm +++ b/guix/build/copy-build-system.scm @@ -2,6 +2,7 @@ ;;; Copyright © 2019 Julien Lepiller <julien@lepiller.eu> ;;; Copyright © 2020 Pierre Neidhardt <mail@ambrevar.xyz> ;;; Copyright © 2021 Efraim Flashner <efraim@flashner.co.il> +;;; Copyright © 2023 Bruno Victal <mirai@makinata.eu> ;;; ;;; This file is part of GNU Guix. ;;; @@ -40,9 +41,9 @@ An install plan is a list of plans in the form: - (SOURCE TARGET [FILTERS]) + (SOURCE TARGET [FILTERS] [#:output OUTPUT]) -In the above, FILTERS are optional. +In the above, FILTERS and OUTPUT are optional. - When SOURCE matches a file or directory without trailing slash, install it to TARGET. @@ -63,6 +64,9 @@ In the above, FILTERS are optional. If both `#:include*` and `#:exclude*` are specified, the exclusion is done on the inclusion list. +- When a package has multiple outputs, the `#:output` argument can be used +to specify which output label the files should be installed to. + Examples: - `(\"foo/bar\" \"share/my-app/\")`: Install bar to \"share/my-app/bar\". @@ -72,7 +76,9 @@ Examples: - `(\"foo/\" \"share/my-app\" #:include (\"sub/file\"))`: Install only \"foo/sub/file\" to \"share/my-app/sub/file\". - `(\"foo/sub\" \"share/my-app\" #:include (\"file\"))`: Install \"foo/sub/file\" to -\"share/my-app/file\"." +\"share/my-app/file\". +- `(\"foo/doc\" \"share/my-app/doc\" #:output \"doc\")`: Install \"foo/doc\" to +\"share/my-app/doc\" within the \"doc\" output." (define (install-simple source target) "Install SOURCE to TARGET. TARGET must point to a store location. @@ -133,8 +139,10 @@ given, then the predicate always returns DEFAULT-VALUE." (string-append target "/"))) file-list)))) - (define* (install source target #:key include exclude include-regexp exclude-regexp) - (let ((final-target (string-append (assoc-ref outputs "out") "/" target)) + (define* (install source target + #:key include exclude include-regexp exclude-regexp + (output "out")) + (let ((final-target (string-append (assoc-ref outputs output) "/" target)) (filters? (or include exclude include-regexp exclude-regexp))) (when (and (not (file-is-directory? source)) filters?) diff --git a/guix/build/font-build-system.scm b/guix/build/font-build-system.scm index e4784bc17d..0b1542394a 100644 --- a/guix/build/font-build-system.scm +++ b/guix/build/font-build-system.scm @@ -23,6 +23,7 @@ #:use-module (srfi srfi-1) #:use-module (srfi srfi-26) #:export (%standard-phases + %license-file-regexp font-build)) ;; Commentary: @@ -56,6 +57,11 @@ archive, or a font file." (for-each (cut install-file <> (string-append fonts "/web")) (find-files source "\\.(woff|woff2)$")))) +(define %license-file-regexp + ;; Regexp matching license files commonly found in font packages. + "^((COPY(ING|RIGHT)|LICEN[CS]E).*\ +|(([Cc]opy[Rr]ight|[Ll]icen[cs]es?|IPA_.*|OFL(-?1\\.?1)?)(\\.(txt|md)?))$)") + (define %standard-phases (modify-phases gnu:%standard-phases (replace 'unpack unpack) diff --git a/guix/build/gnu-build-system.scm b/guix/build/gnu-build-system.scm index ef5873d793..0b94416a8d 100644 --- a/guix/build/gnu-build-system.scm +++ b/guix/build/gnu-build-system.scm @@ -2,7 +2,7 @@ ;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021 Ludovic Courtès <ludo@gnu.org> ;;; Copyright © 2018 Mark H Weaver <mhw@netris.org> ;;; Copyright © 2020 Brendan Tildesley <mail@brendan.scot> -;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com> +;;; Copyright © 2021, 2022 Maxim Cournoyer <maxim.cournoyer@gmail.com> ;;; ;;; This file is part of GNU Guix. ;;; @@ -72,6 +72,42 @@ there are none." ((first . _) first) (_ #f))) +(define* (separate-from-pid1 #:key (separate-from-pid1? #t) + #:allow-other-keys) + "When running as PID 1 and SEPARATE-FROM-PID1? is true, run build phases as +a child process; PID 1 then becomes responsible for reaping child processes." + (if separate-from-pid1? + (if (= 1 (getpid)) + (dynamic-wind + (const #t) + (lambda () + (match (primitive-fork) + (0 #t) + (builder-pid + (format (current-error-port) + "build process now running as PID ~a~%" + builder-pid) + (let loop () + ;; Running as PID 1 so take responsibility for reaping + ;; child processes. + (match (waitpid WAIT_ANY) + ((pid . status) + (if (= pid builder-pid) + (if (zero? status) + (primitive-exit 0) + (begin + (format (current-error-port) + "build process ~a exited with status ~a~%" + pid status) + (primitive-exit 1))) + (loop)))))))) + (const #t)) + (format (current-error-port) "not running as PID 1 (PID: ~a)~%" + (getpid))) + (format (current-error-port) + "build process running as PID ~a; not forking~%" + (getpid)))) + (define* (set-paths #:key target inputs native-inputs (search-paths '()) (native-search-paths '()) #:allow-other-keys) @@ -123,7 +159,7 @@ there are none." native-search-paths))) (define* (install-locale #:key - (locale "en_US.utf8") + (locale "C.UTF-8") (locale-category LC_ALL) #:allow-other-keys) "Try to install LOCALE; emit a warning if that fails. The main goal is to @@ -608,21 +644,36 @@ and 'man/'. This phase moves directories to the right place if needed." (((names . directories) ...) (for-each process-directory directories)))) -(define* (compress-documentation #:key outputs +(define* (compress-documentation #:key + outputs (compress-documentation? #t) - (documentation-compressor "gzip") - (documentation-compressor-flags + (info-compressor "gzip") + (info-compressor-flags '("--best" "--no-name")) - (compressed-documentation-extension ".gz") + (info-compressor-file-extension ".gz") + (man-compressor (if (which "zstd") + "zstd" + info-compressor)) + (man-compressor-flags + (if (which "zstd") + (list "-19" "--rm" + "--threads" (number->string + (parallel-job-count))) + info-compressor-flags)) + (man-compressor-file-extension + (if (which "zstd") + ".zst" + info-compressor-file-extension)) #:allow-other-keys) - "When COMPRESS-DOCUMENTATION? is true, compress man pages and Info files -found in OUTPUTS using DOCUMENTATION-COMPRESSOR, called with -DOCUMENTATION-COMPRESSOR-FLAGS." - (define (retarget-symlink link) + "When COMPRESS-INFO-MANUALS? is true, compress Info files found in OUTPUTS +using INFO-COMPRESSOR, called with INFO-COMPRESSOR-FLAGS. Similarly, when +COMPRESS-MAN-PAGES? is true, compress man pages files found in OUTPUTS using +MAN-COMPRESSOR, using MAN-COMPRESSOR-FLAGS." + (define (retarget-symlink link extension) (let ((target (readlink link))) (delete-file link) - (symlink (string-append target compressed-documentation-extension) - (string-append link compressed-documentation-extension)))) + (symlink (string-append target extension) + (string-append link extension)))) (define (has-links? file) ;; Return #t if FILE has hard links. @@ -640,23 +691,23 @@ DOCUMENTATION-COMPRESSOR-FLAGS." (symbolic-link? target-absolute)) (lambda args (if (= ENOENT (system-error-errno args)) - (begin - (format (current-error-port) - "The symbolic link '~a' target is missing: '~a'\n" - symlink target-absolute) - #f) + (format (current-error-port) + "The symbolic link '~a' target is missing: '~a'\n" + symlink target-absolute) (apply throw args)))))) - (define (maybe-compress-directory directory regexp) + (define (maybe-compress-directory directory regexp + compressor + compressor-flags + compressor-extension) (when (directory-exists? directory) (match (find-files directory regexp) - (() ;nothing to compress + (() ;nothing to compress #t) - ((files ...) ;one or more files + ((files ...) ;one or more files (format #t "compressing documentation in '~a' with ~s and flags ~s~%" - directory documentation-compressor - documentation-compressor-flags) + directory compressor compressor-flags) (call-with-values (lambda () (partition symbolic-link? files)) @@ -666,20 +717,26 @@ DOCUMENTATION-COMPRESSOR-FLAGS." ;; unchanged ('gzip' would refuse to compress them anyway.) ;; Also, do not retarget symbolic links pointing to other ;; symbolic links, since these are not compressed. - (for-each retarget-symlink + (for-each (cut retarget-symlink <> compressor-extension) (filter (lambda (symlink) (and (not (points-to-symlink? symlink)) (string-match regexp symlink))) symlinks)) - (apply invoke documentation-compressor - (append documentation-compressor-flags + (apply invoke compressor + (append compressor-flags (remove has-links? regular-files))))))))) (define (maybe-compress output) (maybe-compress-directory (string-append output "/share/man") - "\\.[0-9]+$") + "\\.[0-9]+[:alpha:]*$" + man-compressor + man-compressor-flags + man-compressor-file-extension) (maybe-compress-directory (string-append output "/share/info") - "\\.info(-[0-9]+)?$")) + "\\.info(-[0-9]+)?$" + info-compressor + info-compressor-flags + info-compressor-file-extension)) (if compress-documentation? (match outputs @@ -872,7 +929,8 @@ that traversing all the RUNPATH entries entails." ;; Standard build phases, as a list of symbol/procedure pairs. (let-syntax ((phases (syntax-rules () ((_ p ...) `((p . ,p) ...))))) - (phases set-SOURCE-DATE-EPOCH set-paths install-locale unpack + (phases separate-from-pid1 + set-SOURCE-DATE-EPOCH set-paths install-locale unpack bootstrap patch-usr-bin-file patch-source-shebangs configure patch-generated-file-shebangs diff --git a/guix/build/go-build-system.scm b/guix/build/go-build-system.scm index 7f25e05d0d..5346110e86 100644 --- a/guix/build/go-build-system.scm +++ b/guix/build/go-build-system.scm @@ -4,7 +4,7 @@ ;;; Copyright © 2019 Maxim Cournoyer <maxim.cournoyer@gmail.com> ;;; Copyright © 2020 Jack Hill <jackhill@jackhill.us> ;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net> -;;; Copyright © 2020, 2021 Efraim Flashner <efraim@flashner.co.il> +;;; Copyright © 2020, 2021, 2023 Efraim Flashner <efraim@flashner.co.il> ;;; Copyright © 2021 Sarah Morgensen <iskarian@mgsn.dev> ;;; ;;; This file is part of GNU Guix. @@ -227,9 +227,10 @@ unpacking." (when (string-null? import-path) (display "WARNING: The Go import path is unset.\n")) - (when (string-null? unpack-path) - (set! unpack-path import-path)) - (let ((dest (string-append (getenv "GOPATH") "/src/" unpack-path))) + (let ((dest (string-append (getenv "GOPATH") "/src/" + (if (string-null? unpack-path) + import-path + unpack-path)))) (mkdir-p dest) (if (file-is-directory? source) (copy-recursively source dest #:keep-mtime? #t) @@ -254,8 +255,12 @@ unpacking." (_ #f)) inputs)))) -(define* (build #:key import-path build-flags #:allow-other-keys) +(define* (build #:key import-path build-flags (parallel-build? #t) + #:allow-other-keys) "Build the package named by IMPORT-PATH." + (let* ((njobs (if parallel-build? (parallel-job-count) 1))) + (setenv "GOMAXPROCS" (number->string njobs))) + (with-throw-handler #t (lambda _ @@ -272,9 +277,12 @@ unpacking." (invoke "go" "env")))) ;; Can this also install commands??? -(define* (check #:key tests? import-path #:allow-other-keys) +(define* (check #:key tests? import-path (parallel-tests? #t) + #:allow-other-keys) "Run the tests for the package named by IMPORT-PATH." (when tests? + (let* ((njobs (if parallel-tests? (parallel-job-count) 1))) + (setenv "GOMAXPROCS" (number->string njobs))) (invoke "go" "test" import-path)) #t) diff --git a/guix/build/utils.scm b/guix/build/utils.scm index 2352a627e9..94714bf397 100644 --- a/guix/build/utils.scm +++ b/guix/build/utils.scm @@ -9,6 +9,7 @@ ;;; Copyright © 2020, 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com> ;;; Copyright © 2021, 2022 Maxime Devos <maximedevos@telenet.be> ;;; Copyright © 2021 Brendan Tildesley <mail@brendan.scot> +;;; Copyright © 2023 Carlo Zancanaro <carlo@zancanaro.id.au> ;;; ;;; This file is part of GNU Guix. ;;; @@ -176,6 +177,7 @@ decompress FILE-NAME, based on its file extension, else false." ((string-suffix? "lz" file-name) "lzip") ((string-suffix? "zip" file-name) "unzip") ((string-suffix? "xz" file-name) "xz") + ((string-suffix? "zst" file-name) "zstd") (else #f))) ;no compression used/unknown file extension (define (tarball? file-name) @@ -185,7 +187,7 @@ decompress FILE-NAME, based on its file extension, else false." (define (%xz-parallel-args) "The xz arguments required to enable bit-reproducible, multi-threaded compression." - (list "--memlimit=50%" + (list "--memlimit=20%" (format #f "--threads=~a" (max 2 (parallel-job-count))))) @@ -430,32 +432,38 @@ name." (log (current-output-port)) (follow-symlinks? #f) (copy-file copy-file) - keep-mtime? keep-permissions?) - "Copy SOURCE directory to DESTINATION. Follow symlinks if FOLLOW-SYMLINKS? -is true; otherwise, just preserve them. Call COPY-FILE to copy regular files. -When KEEP-MTIME? is true, keep the modification time of the files in SOURCE on -those of DESTINATION. When KEEP-PERMISSIONS? is true, preserve file -permissions. Write verbose output to the LOG port." + keep-mtime? keep-permissions? + (select? (const #t))) + "Copy SOURCE directory to DESTINATION. Follow symlinks if FOLLOW-SYMLINKS? is +true; otherwise, just preserve them. Call COPY-FILE to copy regular files. When +KEEP-MTIME? is true, keep the modification time of the files in SOURCE on those of +DESTINATION. When KEEP-PERMISSIONS? is true, preserve file permissions. Write +verbose output to the LOG port. Call (SELECT? FILE STAT) for each entry in source, +where FILE is the entry's absolute file name and STAT is the result of 'lstat' (or +'stat' if FOLLOW-SYMLINKS? is true); exclude entries for which SELECT? does not +return true." (define strip-source (let ((len (string-length source))) (lambda (file) (substring file len)))) - (file-system-fold (const #t) ; enter? + (file-system-fold (lambda (file stat result) ; enter? + (select? file stat)) (lambda (file stat result) ; leaf (let ((dest (string-append destination (strip-source file)))) - (format log "`~a' -> `~a'~%" file dest) - (case (stat:type stat) - ((symlink) - (let ((target (readlink file))) - (symlink target dest))) - (else - (copy-file file dest) - (when keep-permissions? - (chmod dest (stat:perms stat))))) - (when keep-mtime? - (set-file-time dest stat)))) + (when (select? file stat) + (format log "`~a' -> `~a'~%" file dest) + (case (stat:type stat) + ((symlink) + (let ((target (readlink file))) + (symlink target dest))) + (else + (copy-file file dest) + (when keep-permissions? + (chmod dest (stat:perms stat))))) + (when keep-mtime? + (set-file-time dest stat))))) (lambda (dir stat result) ; down (let ((target (string-append destination (strip-source dir)))) @@ -729,18 +737,22 @@ effects, such as displaying warnings or error messages." (define* (alist-cons-before reference key value alist #:optional (key=? equal?)) "Insert the KEY/VALUE pair before the first occurrence of a pair whose key -is REFERENCE in ALIST. Use KEY=? to compare keys." +is REFERENCE in ALIST. Use KEY=? to compare keys. An error is raised when no +such pair exists." (let-values (((before after) (break (match-lambda ((k . _) (key=? k reference))) alist))) - (append before (alist-cons key value after)))) + (match after + ((_ _ ...) + (append before (alist-cons key value after)))))) (define* (alist-cons-after reference key value alist #:optional (key=? equal?)) "Insert the KEY/VALUE pair after the first occurrence of a pair whose key -is REFERENCE in ALIST. Use KEY=? to compare keys." +is REFERENCE in ALIST. Use KEY=? to compare keys. An error is raised when +no such pair exists." (let-values (((before after) (break (match-lambda ((k . _) @@ -748,9 +760,7 @@ is REFERENCE in ALIST. Use KEY=? to compare keys." alist))) (match after ((reference after ...) - (append before (cons* reference `(,key . ,value) after))) - (() - (append before `((,key . ,value))))))) + (append before (cons* reference `(,key . ,value) after)))))) (define* (alist-replace key value alist #:optional (key=? equal?)) "Replace the first pair in ALIST whose car is KEY with the KEY/VALUE pair. diff --git a/guix/git-download.scm b/guix/git-download.scm index d26a814e07..015e7f8962 100644 --- a/guix/git-download.scm +++ b/guix/git-download.scm @@ -121,12 +121,6 @@ respective documentation." (define gnutls (module-ref (resolve-interface '(gnu packages tls)) 'guile-gnutls)) - (define glibc-locales - ;; Note: pick the '-final' variant to avoid circular dependency on - ;; i586-gnu, where 'glibc-utf8-locales' indirectly depends on Git. - (module-ref (resolve-interface '(gnu packages commencement)) - 'glibc-utf8-locales-final)) - (define modules (delete '(guix config) (source-module-closure '((guix build git) @@ -151,9 +145,7 @@ respective documentation." ;; Let Guile interpret file names as UTF-8, otherwise ;; 'delete-file-recursively' might fail to delete all of ;; '.git'--see <https://issues.guix.gnu.org/54893>. - (setenv "GUIX_LOCPATH" - #+(file-append glibc-locales "/lib/locale")) - (setlocale LC_ALL "en_US.utf8") + (setlocale LC_ALL "C.UTF-8") ;; The 'git submodule' commands expects Coreutils, sed, grep, ;; etc. to be in $PATH. This also ensures that git extensions are diff --git a/guix/git.scm b/guix/git.scm index d75a301f98..1f3881fd97 100644 --- a/guix/git.scm +++ b/guix/git.scm @@ -390,6 +390,11 @@ values) if DIRECTORY does not hold a readable Git repository." (define (reference-available? repository ref) "Return true if REF, a reference such as '(commit . \"cabba9e\"), is definitely available in REPOSITORY, false otherwise." + ;; Note: this must not rely on 'resolve-reference', as that procedure always + ;; resolves the references for branch names such as master. The semantic we + ;; want here is that unless the reference is exact (e.g. a commit), the + ;; reference should not be considered available, as it could have changed on + ;; the remote. (match ref (('commit . (? commit-id? commit)) (let ((oid (string->oid commit))) diff --git a/guix/grafts.scm b/guix/grafts.scm index f4df513daf..d97e112ba4 100644 --- a/guix/grafts.scm +++ b/guix/grafts.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2014-2023 Ludovic Courtès <ludo@gnu.org> +;;; Copyright © 2014-2024 Ludovic Courtès <ludo@gnu.org> ;;; ;;; This file is part of GNU Guix. ;;; @@ -96,12 +96,6 @@ "Return a derivation called NAME, which applies GRAFTS to the specified OUTPUTS of DRV. This procedure performs \"shallow\" grafting in that GRAFTS are not recursively applied to dependencies of DRV." - (define glibc-locales - (module-ref (resolve-interface '(gnu packages commencement)) - (if (target-hurd? system) - 'glibc-utf8-locales-final/hurd - 'glibc-utf8-locales-final))) - (define mapping ;; List of store item pairs. (map (lambda (graft) @@ -114,11 +108,8 @@ are not recursively applied to dependencies of DRV." (define set-utf8-locale (and (%graft-with-utf8-locale?) - #~(begin - ;; Let Guile interpret file names as UTF-8. - (setenv "GUIX_LOCPATH" - #+(file-append glibc-locales "/lib/locale")) - (setlocale LC_ALL "en_US.utf8")))) + ;; Let Guile interpret file names as UTF-8. + #~(setlocale LC_ALL "C.UTF-8"))) (define build diff --git a/guix/import/crate.scm b/guix/import/crate.scm index 7a25b2243c..0d1e6ea541 100644 --- a/guix/import/crate.scm +++ b/guix/import/crate.scm @@ -3,6 +3,7 @@ ;;; Copyright © 2019, 2020, 2021 Ludovic Courtès <ludo@gnu.org> ;;; Copyright © 2019, 2020 Martin Becze <mjbecze@riseup.net> ;;; Copyright © 2021 Nicolas Goaziou <mail@nicolasgoaziou.fr> +;;; Copyright © 2021 Sarah Morgensen <iskarian@mgsn.dev> ;;; Copyright © 2022 Hartmut Goebel <h.goebel@crazy-compilers.com> ;;; Copyright © 2023 Simon Tournier <zimon.toutoune@gmail.com> ;;; Copyright © 2023, 2024 Efraim Flashner <efraim@flashner.co.il> @@ -141,19 +142,36 @@ record or #f if it was not found." ;;; Converting crates to Guix packages. ;;; +(define* (package-names->package-inputs names #:optional (output #f)) + "Given a list of PACKAGE-NAMES or (PACKAGE-NAME VERSION) pairs, and an +optional OUTPUT, tries to generate a quoted list of inputs, as suitable to +use in an 'inputs' field of a package definition." + (define (make-input input version) + (cons* input (list 'unquote (string->symbol + (if version + (string-append input "-" version) + input))) + (or (and output (list output)) + '()))) + + (map (match-lambda + ((input version) (make-input input version)) + (input (make-input input #f))) + names)) + (define (maybe-cargo-inputs package-names) (match (package-names->package-inputs package-names) (() '()) ((package-inputs ...) - `(#:cargo-inputs ,package-inputs)))) + `(#:cargo-inputs (,'unquote (list ,@package-inputs)))))) (define (maybe-cargo-development-inputs package-names) (match (package-names->package-inputs package-names) (() '()) ((package-inputs ...) - `(#:cargo-development-inputs ,package-inputs)))) + `(#:cargo-development-inputs (,'unquote (list ,@package-inputs)))))) (define (maybe-arguments arguments) (match arguments diff --git a/guix/import/utils.scm b/guix/import/utils.scm index 0cf52cdbde..fdfebffc50 100644 --- a/guix/import/utils.scm +++ b/guix/import/utils.scm @@ -408,12 +408,10 @@ LENGTH characters." optional OUTPUT, tries to generate a quoted list of inputs, as suitable to use in an 'inputs' field of a package definition." (define (make-input input version) - (cons* input (list 'unquote (string->symbol - (if version - (string-append input "-" version) - input))) - (or (and output (list output)) - '()))) + (let ((name (if version (string-append input "-" version) input))) + (if output + (list (string->symbol name) output) + (string->symbol name)))) (map (match-lambda ((input version) (make-input input version)) @@ -434,7 +432,7 @@ snippet generated is for regular inputs." (() '()) ((package-inputs ...) - `((,field-name (,'quasiquote ,package-inputs))))))) + `((,field-name (list ,@package-inputs))))))) (define* (maybe-native-inputs package-names #:optional (output #f)) "Same as MAYBE-INPUTS, but for native inputs." diff --git a/guix/man-db.scm b/guix/man-db.scm index 7d9707a592..9cb07493ba 100644 --- a/guix/man-db.scm +++ b/guix/man-db.scm @@ -1,5 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2017, 2018 Ludovic Courtès <ludo@gnu.org> +;;; Copyright © 2022, 2024 Maxim Cournoyer <maxim.cournoyer@gmail.com> ;;; ;;; This file is part of GNU Guix. ;;; @@ -17,7 +18,8 @@ ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. (define-module (guix man-db) - #:use-module (zlib) + #:autoload (zlib) (call-with-gzip-input-port) + #:autoload (zstd) (call-with-zstd-input-port) #:use-module ((guix build utils) #:select (find-files)) #:use-module (gdbm) ;gdbm-ffi #:use-module (srfi srfi-9) @@ -48,7 +50,7 @@ (define-record-type <mandb-entry> (mandb-entry file-name name section synopsis kind) mandb-entry? - (file-name mandb-entry-file-name) ;e.g., "../abiword.1.gz" + (file-name mandb-entry-file-name) ;e.g., "../abiword.1.zst" (name mandb-entry-name) ;e.g., "ABIWORD" (section mandb-entry-section) ;number (synopsis mandb-entry-synopsis) ;string @@ -63,7 +65,7 @@ (string<? (basename file1) (basename file2)))))))) (define abbreviate-file-name - (let ((man-file-rx (make-regexp "(.+)\\.[0-9][a-z]?(\\.gz)?$"))) + (let ((man-file-rx (make-regexp "(.+)\\.[0-9][a-z]?(\\.(gz|zst))?$"))) (lambda (file) (match (regexp-exec man-file-rx (basename file)) (#f @@ -71,6 +73,14 @@ (matches (match:substring matches 1)))))) +(define (gzip-compressed? file-name) + "True if FILE-NAME is suffixed with the '.gz' file extension." + (string-suffix? ".gz" file-name)) + +(define (zstd-compressed? file-name) + "True if FILE-NAME is suffixed with the '.zst' file extension." + (string-suffix? ".zst" file-name)) + (define (entry->string entry) "Return the wire format for ENTRY as a string." (match entry @@ -92,7 +102,11 @@ "\t-\t-\t" - (if (string-suffix? ".gz" file) "gz" "") + (cond + ((gzip-compressed? file) "gz") + ((zstd-compressed? file) "zst") + (else "")) + "\t" synopsis "\x00")))) @@ -148,7 +162,8 @@ (loop (cons line lines)))))) (define* (man-page->entry file #:optional (resolve identity)) - "Parse FILE, a gzipped man page, and return a <mandb-entry> for it." + "Parse FILE, a gzip or zstd compressed man page, and return a <mandb-entry> +for it." (define (string->number* str) (if (and (string-prefix? "\"" str) (> (string-length str) 1) @@ -156,8 +171,13 @@ (string->number (string-drop (string-drop-right str 1) 1)) (string->number str))) - ;; Note: This works for both gzipped and uncompressed files. - (call-with-gzip-input-port (open-file file "r0") + (define call-with-input-port* + (cond + ((gzip-compressed? file) call-with-gzip-input-port) + ((zstd-compressed? file) call-with-zstd-input-port) + (else call-with-port))) + + (call-with-input-port* (open-file file "r0") (lambda (port) (let loop ((name #f) (section #f) @@ -191,14 +211,19 @@ (define (man-files directory) "Return the list of man pages found under DIRECTORY, recursively." ;; Filter the list to ensure that broken symlinks are excluded. - (filter file-exists? (find-files directory "\\.[0-9][a-z]?(\\.gz)?$"))) + (filter file-exists? + (find-files directory "\\.[0-9][a-z]?(\\.(gz|zst))?$"))) (define (mandb-entries directory) "Return mandb entries for the man pages found under DIRECTORY, recursively." (map (lambda (file) (man-page->entry file (lambda (link) - (let ((file (string-append directory "/" link - ".gz"))) - (and (file-exists? file) file))))) + (let ((file-gz (string-append directory "/" link + ".gz")) + (file-zst (string-append directory "/" link + ".zst"))) + (and (or (file-exists? file-gz) + (file-exists? file-zst) file) + file))))) (man-files directory))) diff --git a/guix/packages.scm b/guix/packages.scm index bd72b284b1..2c953d18ee 100644 --- a/guix/packages.scm +++ b/guix/packages.scm @@ -5,7 +5,7 @@ ;;; Copyright © 2016 Alex Kost <alezost@gmail.com> ;;; Copyright © 2017, 2019, 2020, 2022 Efraim Flashner <efraim@flashner.co.il> ;;; Copyright © 2019 Marius Bakke <mbakke@fastmail.com> -;;; Copyright © 2020, 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com> +;;; Copyright © 2020, 2021, 2024 Maxim Cournoyer <maxim.cournoyer@gmail.com> ;;; Copyright © 2021 Chris Marusich <cmmarusich@gmail.com> ;;; Copyright © 2022 Maxime Devos <maximedevos@telenet.be> ;;; Copyright © 2022 jgart <jgart@dismail.de> @@ -861,17 +861,12 @@ identifiers. The result is inferred from the file names of patches." (module-ref (resolve-interface module) var)))))) `(("tar" ,(ref '(gnu packages base) 'tar)) ("xz" ,(ref '(gnu packages compression) 'xz)) + ("zstd" ,(ref '(gnu packages compression) 'zstd)) ("bzip2" ,(ref '(gnu packages compression) 'bzip2)) ("gzip" ,(ref '(gnu packages compression) 'gzip)) ("lzip" ,(ref '(gnu packages compression) 'lzip)) ("unzip" ,(ref '(gnu packages compression) 'unzip)) - ("patch" ,(ref '(gnu packages base) 'patch)) - ("locales" - ,(parameterize ((%current-target-system #f) - (%current-system system)) - (canonical - ((module-ref (resolve-interface '(gnu packages base)) - 'libc-utf8-locales-for-target)))))))) + ("patch" ,(ref '(gnu packages base) 'patch))))) (define (default-guile) "Return the default Guile package used to run the build code of @@ -931,32 +926,32 @@ specifies modules in scope when evaluating SNIPPET." ;; Return true if DIRECTORY is a checkout (git, svn, etc). (string-suffix? "-checkout" directory)) - (define (tarxz-name file-name) - ;; Return a '.tar.xz' file name based on FILE-NAME. + (define (tar-file-name file-name ext) + ;; Return a '$filename.tar.$ext' file name based on FILE-NAME and EXT. (let ((base (if (numeric-extension? file-name) original-file-name (file-sans-extension file-name)))) (string-append base (if (equal? (file-extension base) "tar") - ".xz" - ".tar.xz")))) + (string-append "." ext) + (string-append ".tar." ext))))) (define instantiate-patch (match-lambda - ((? string? patch) ;deprecated + ((? string? patch) ;deprecated (local-file patch #:recursive? #t)) - ((? struct? patch) ;origin, local-file, etc. + ((? struct? patch) ;origin, local-file, etc. patch))) - (let ((tar (lookup-input "tar")) - (gzip (lookup-input "gzip")) - (bzip2 (lookup-input "bzip2")) - (lzip (lookup-input "lzip")) - (xz (lookup-input "xz")) - (patch (lookup-input "patch")) - (locales (lookup-input "locales")) - (comp (and=> (compressor source-file-name) lookup-input)) - (patches (map instantiate-patch patches))) + (let* ((tar (lookup-input "tar")) + (gzip (lookup-input "gzip")) + (bzip2 (lookup-input "bzip2")) + (lzip (lookup-input "lzip")) + (xz (lookup-input "xz")) + (zstd (lookup-input "zstd")) + (patch (lookup-input "patch")) + (comp (and=> (compressor source-file-name) lookup-input)) + (patches (map instantiate-patch patches))) (define build (with-imported-modules '((guix build utils)) #~(begin @@ -965,14 +960,18 @@ specifies modules in scope when evaluating SNIPPET." (ice-9 regex) (srfi srfi-1) (srfi srfi-26) + (srfi srfi-34) + (srfi srfi-35) (guix build utils)) ;; The --sort option was added to GNU tar in version 1.28, released ;; 2014-07-28. During bootstrap we must cope with older versions. (define tar-supports-sort? - (zero? (system* (string-append #+tar "/bin/tar") + (guard (c ((message-condition? c) #f)) + (invoke/quiet (string-append #+tar "/bin/tar") "cf" "/dev/null" "--files-from=/dev/null" - "--sort=name"))) + "--sort=name") + #t)) (define (apply-patch patch) (format (current-error-port) "applying '~a'...~%" patch) @@ -1013,26 +1012,36 @@ specifies modules in scope when evaluating SNIPPET." '("--no-recursion" "--files-from=.file_list")))) + (let ((line (cond-expand (guile-2.0 _IOLBF) + (else 'line)))) + (setvbuf (current-output-port) line) + (setvbuf (current-error-port) line)) + ;; Encoding/decoding errors shouldn't be silent. (fluid-set! %default-port-conversion-strategy 'error) - (when #+locales - ;; First of all, install a UTF-8 locale so that UTF-8 file names - ;; are correctly interpreted. During bootstrap, LOCALES is #f. - (setenv "LOCPATH" - (string-append #+locales "/lib/locale/" - #+(and locales - (version-major+minor - (package-version locales))))) - (setlocale LC_ALL "en_US.utf8")) + ;; First of all, install a UTF-8 locale so that UTF-8 file names + ;; are correctly interpreted. During bootstrap, locales are + ;; missing. + (let ((locale "C.UTF-8")) + (catch 'system-error + (lambda () + (setlocale LC_ALL locale)) + (lambda args + (format (current-error-port) + "failed to install '~a' locale: ~a~%" + locale (system-error-errno args))))) (setenv "PATH" - (string-append #+xz "/bin" - (if #+comp - (string-append ":" #+comp "/bin") - ""))) + (string-join + (map (cut string-append <> "/bin") + ;; Fallback to xz in case zstd is not + ;; available, such as for bootstrap packages. + (delete-duplicates + (filter-map identity (list #+zstd #+xz #+comp)))) + ":")) - (setenv "XZ_DEFAULTS" (string-join (%xz-parallel-args))) + (setenv "ZSTD_NBTHREADS" (number->string (parallel-job-count))) ;; SOURCE may be either a directory, a tarball or a simple file. (let ((name (strip-store-file-name #+source)) @@ -1087,10 +1096,13 @@ specifies modules in scope when evaluating SNIPPET." (else ;single uncompressed file (copy-file file #$output))))))) - (let ((name (if (or (checkout? original-file-name) - (not (compressor original-file-name))) - original-file-name - (tarxz-name original-file-name)))) + (let* ((ext (if zstd + "zst" ;usual case + "xz")) ;zstd-less bootstrap-origin + (name (if (or (checkout? original-file-name) + (not (compressor original-file-name))) + original-file-name + (tar-file-name original-file-name ext)))) (gexp->derivation name build #:graft? #f #:system system diff --git a/guix/profiles.scm b/guix/profiles.scm index d41802422b..2545a0aa56 100644 --- a/guix/profiles.scm +++ b/guix/profiles.scm @@ -7,7 +7,7 @@ ;;; Copyright © 2016, 2017, 2018, 2019, 2021, 2022 Ricardo Wurmus <rekado@elephly.net> ;;; Copyright © 2016 Chris Marusich <cmmarusich@gmail.com> ;;; Copyright © 2017 Huang Ying <huang.ying.caritas@gmail.com> -;;; Copyright © 2017, 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com> +;;; Copyright © 2017, 2021, 2024 Maxim Cournoyer <maxim.cournoyer@gmail.com> ;;; Copyright © 2019 Kyle Meyer <kyle@kyleam.com> ;;; Copyright © 2019 Mathieu Othacehe <m.othacehe@gmail.com> ;;; Copyright © 2020 Danny Milosavljevic <dannym@scratchpost.org> @@ -1127,11 +1127,6 @@ certificates in the /etc/ssl/certs sub-directories of the packages in MANIFEST. Single-file bundles are required by programs such as Git and Lynx." ;; See <http://lists.gnu.org/archive/html/guix-devel/2015-02/msg00429.html> ;; for a discussion. - - (define libc-utf8-locales-for-target ;lazy reference - (module-ref (resolve-interface '(gnu packages base)) - 'libc-utf8-locales-for-target)) - (define build (with-imported-modules '((guix build utils)) #~(begin @@ -1163,13 +1158,7 @@ MANIFEST. Single-file bundles are required by programs such as Git and Lynx." ;; Some file names in the NSS certificates are UTF-8 encoded so ;; install a UTF-8 locale. - (setenv "LOCPATH" - (string-append #+(libc-utf8-locales-for-target system) - "/lib/locale/" - #+(version-major+minor - (package-version - (libc-utf8-locales-for-target system))))) - (setlocale LC_ALL "en_US.utf8") + (setlocale LC_ALL "C.UTF-8") (match (append-map ca-files '#$(manifest-inputs manifest)) (() @@ -1714,6 +1703,9 @@ the entries in MANIFEST." (define guile-zlib (module-ref (resolve-interface '(gnu packages guile)) 'guile-zlib)) + (define guile-zstd + (module-ref (resolve-interface '(gnu packages guile)) 'guile-zstd)) + (define modules (delete '(guix config) (source-module-closure `((guix build utils) @@ -1722,7 +1714,8 @@ the entries in MANIFEST." (define build (with-imported-modules modules (with-extensions (list gdbm-ffi ;for (guix man-db) - guile-zlib) + guile-zlib + guile-zstd) #~(begin (use-modules (guix man-db) (guix build utils) @@ -1962,8 +1955,7 @@ with a different version number.) Unless ALLOW-UNSUPPORTED-PACKAGES? is true or TARGET is set, raise an error if MANIFEST contains a package that does not support SYSTEM. -When LOCALES? is true, the build is performed under a UTF-8 locale; this adds -a dependency on the 'glibc-utf8-locales' package. +When LOCALES? is true, the build is performed under a UTF-8 locale. When RELATIVE-SYMLINKS? is true, use relative file names for symlink targets. This is one of the things to do for the result to be relocatable. @@ -2006,21 +1998,10 @@ are cross-built for TARGET." (and (derivation? drv) (gexp-input drv))) extras)) - (define libc-utf8-locales-for-target ;lazy reference - (module-ref (resolve-interface '(gnu packages base)) - 'libc-utf8-locales-for-target)) - (define set-utf8-locale - ;; Some file names (e.g., in 'nss-certs') are UTF-8 encoded so - ;; install a UTF-8 locale. - (let ((locales (libc-utf8-locales-for-target - (or system (%current-system))))) - #~(begin - (setenv "LOCPATH" - #$(file-append locales "/lib/locale/" - (version-major+minor - (package-version locales)))) - (setlocale LC_ALL "en_US.utf8")))) + ;; Some file names (e.g., in 'nss-certs') are UTF-8 encoded so install a + ;; UTF-8 locale. Assume libc comes with a copy of C.UTF-8. + #~(setlocale LC_ALL "C.UTF-8")) (define builder (with-imported-modules '((guix build profiles) diff --git a/guix/scripts/refresh.scm b/guix/scripts/refresh.scm index d858ed07cb..ec7d38c22a 100644 --- a/guix/scripts/refresh.scm +++ b/guix/scripts/refresh.scm @@ -43,7 +43,7 @@ #:use-module (guix gnupg) #:use-module (guix hash) #:use-module (gnu packages) - #:use-module ((gnu packages commencement) #:select (%final-inputs)) + #:use-module ((gnu packages base) #:select (%final-inputs)) #:use-module (ice-9 match) #:use-module (ice-9 format) #:use-module (ice-9 regex) diff --git a/guix/search-paths.scm b/guix/search-paths.scm index 5375fae34b..27fcb78054 100644 --- a/guix/search-paths.scm +++ b/guix/search-paths.scm @@ -35,6 +35,8 @@ $CPLUS_INCLUDE_PATH $C_INCLUDE_PATH + $OBJC_INCLUDE_PATH + $OBJCPLUS_INCLUDE_PATH $LIBRARY_PATH $GUIX_EXTENSIONS_PATH $PATH @@ -42,8 +44,11 @@ $SSL_CERT_DIR $SSL_CERT_FILE $TZDIR + $SGML_CATALOG_FILES + $XML_CATALOG_FILES %gcc-search-paths + %libxslt-search-paths search-path-specification->sexp sexp->search-path-specification @@ -75,18 +80,30 @@ (file-pattern search-path-specification-file-pattern ;#f | string (default #f))) -(define $C_INCLUDE_PATH +(define $CPLUS_INCLUDE_PATH (search-path-specification (variable "CPLUS_INCLUDE_PATH") ;; Add 'include/c++' here so that <cstdlib>'s "#include_next ;; <stdlib.h>" finds GCC's <stdlib.h>, not libc's. (files '("include/c++" "include")))) -(define $CPLUS_INCLUDE_PATH +(define $C_INCLUDE_PATH (search-path-specification (variable "C_INCLUDE_PATH") (files '("include")))) +(define $OBJC_INCLUDE_PATH + (search-path-specification + (variable "OBJC_INCLUDE_PATH") + (files '("include")))) + +(define $OBJCPLUS_INCLUDE_PATH + (search-path-specification + (variable "OBJCPLUS_INCLUDE_PATH") + ;; Add 'include/c++' here so that <cstdlib>'s "#include_next + ;; <stdlib.h>" finds GCC's <stdlib.h>, not libc's. + (files '("include/c++" "include")))) + (define $LIBRARY_PATH (search-path-specification (variable "LIBRARY_PATH") @@ -100,6 +117,8 @@ ;; the typical /usr/include headers on an FHS system. (list $C_INCLUDE_PATH $CPLUS_INCLUDE_PATH + $OBJC_INCLUDE_PATH + $OBJCPLUS_INCLUDE_PATH $LIBRARY_PATH)) (define $PATH @@ -154,6 +173,32 @@ (files '("share/zoneinfo")) (separator #f))) ;single entry +;; Some packages (notably libxml2) make use of 'XML_CATALOG_FILES' +;; and 'SGML_CATALOG_FILES' for remapping URI references or public/system +;; identifiers to other URI references. +(define $SGML_CATALOG_FILES + ;; $SGML_CATALOG_FILES lists 'catalog' or 'CATALOG' or '*.cat' files found + ;; under the 'sgml' sub-directory of any given package. + (search-path-specification + (variable "SGML_CATALOG_FILES") + (separator ":") + (files '("sgml")) + (file-pattern "^catalog$|^CATALOG$|^.*\\.cat$") + (file-type 'regular))) + +(define $XML_CATALOG_FILES + ;; $XML_CATALOG_FILES lists 'catalog.xml' files found in under the 'xml' + ;; sub-directory of any given package. + (search-path-specification + (variable "XML_CATALOG_FILES") + (separator " ") + (files '("xml")) + (file-pattern "^catalog\\.xml$") + (file-type 'regular))) + +(define %libxslt-search-paths + (list $SGML_CATALOG_FILES $XML_CATALOG_FILES)) + (define (search-path-specification->sexp spec) "Return an sexp representing SPEC, a <search-path-specification>. The sexp corresponds to the arguments expected by `set-path-environment-variable'." diff --git a/guix/ui.scm b/guix/ui.scm index d82fa533cc..bca4c385f5 100644 --- a/guix/ui.scm +++ b/guix/ui.scm @@ -531,7 +531,7 @@ See the \"Application Setup\" section in the manual, for more info.\n")) ;; We're now running in the "C" locale. Try to install a UTF-8 locale ;; instead. This one is guaranteed to be available in 'guix' from 'guix ;; pull'. - (false-if-exception (setlocale LC_ALL "en_US.utf8"))))) + (false-if-exception (setlocale LC_ALL "C.UTF-8"))))) (define (initialize-guix) "Perform the usual initialization for stand-alone Guix commands." |