Commit graph

3687 commits

Author SHA1 Message Date
Janneke Nieuwenhuizen
296974e232
REMOVEME Revert "gexp: Improve support of Unicode characters." -- avoid world rebuild at this time.
Avoid a world rebuild just now.

This reverts commit 1d5863fca8ca1e465bc7979f7606f254aa054c22.

Change-Id: I117f9428a36055dcafcbc081b13f4c835b922503
2025-01-06 13:44:52 +01:00
Tomas Volf
ed4c3760fc
gexp: Improve support of Unicode characters.
Support for non-ASCII characters was mixed.  Some gexp forms did support them,
while others did not.  Combined with current value for
%default-port-conversion-strategy, that sometimes led to unpleasant surprises.
For example:

    (scheme-file "utf8" #~(with-output-to-file #$output
                            (λ _ (display "猫"))))

Was written to the store as:

    ((? _ (display "\u732b")))

No, that is not font issue on your part, that is an actual #\? instead of the
lambda character.  Which, surprisingly, does not do what it should when
executed.

The solution is to switch to C.UTF-8 locale where possible, since it is now
always available.  Or to explicitly set the port encoding.

No tests are provided, since majority of tests/gexp.scm use guile in version
2, and it tends to work under it.  The issues occur mostly with guile 3.

I did test it locally using:

      #!/bin/sh
      set -eu
      set -x

      [ -f guix.scm ] || { echo >&2 Run from root of Guix repo.; exit 1; }
      [ -f gnu.scm  ] || { echo >&2 Run from root of Guix repo.; exit 1; }

      cat >猫.scm <<'EOF'
      (define-module (猫)
        #:export (say))

      (define (say)
        "nyaaaa~~~~!")
      EOF

      mkdir -p dir-with-utf8-file
      cp 猫.scm dir-with-utf8-file/

      cat >repro.scm <<'EOF'
      (use-modules (guix build utils)
                   (guix derivations)
                   (guix gexp)
                   (guix store)
                   (ice-9 ftw)
                   (ice-9 textual-ports))

      (define cat "猫")

      (define (drv-content drv)
        (call-with-input-file (derivation->output-path drv)
          get-string-all))

      (define (out-content out)
        (call-with-input-file out
          get-string-all))

      (define (drv-listing drv)
        (scandir (derivation->output-path drv)))

      (define (dir-listing dir)
        (scandir dir))

      (define-macro (test exp lower? report)
        (let ((type (car exp)))
          `(false-if-exception
            (let ((drv (with-store %store
                         (run-with-store %store
                           (,(if lower? lower-object identity) ,exp)))))
              (format #t "~%~a:~%" ',type)
              (when (with-store %store
                      (build-derivations %store (list drv)))
                (format #t "~a~%" (,report drv)))))))

      (test (computed-file "utf8"
                           #~(with-output-to-file #$output
                               (λ _ (display #$cat))))
            #t drv-content)

      (test (program-file "utf8"
                          #~((λ _ (display #$cat))))
            #t drv-content)

      (test (scheme-file "utf8"
                         #~((λ _ (display #$cat))))
            #t drv-content)

      (test (text-file* "utf8" cat cat cat)
            #f drv-content)

      (test (compiled-modules '((猫)))
            #f drv-listing)

      (test (file-union "utf8" `((,cat ,(plain-file "utf8" cat))))
            #t drv-listing)

      ;;; No fix needed:
      (test (imported-modules '((猫)))
            #f dir-listing)

      (test (local-file "dir-with-utf8-file" #:recursive? #t)
            #t dir-listing)

      (test (plain-file "utf8" cat)
            #t out-content)

      (test (mixed-text-file "utf8" cat cat cat)
            #t drv-content)

      (test (directory-union "utf8" (list (local-file "dir-with-utf8-file"
                                                      #:recursive? #t)))
            #t dir-listing)
      EOF

      guix shell -CWN -D guix glibc-locales -- \
           env LANG=C.UTF-8 ./pre-inst-env guix repl -- ./repro.scm

Before this commit, the output is:

      + '[' -f guix.scm ']'
      + '[' -f gnu.scm ']'
      + cat
      + mkdir -p dir-with-utf8-file
      + cp 猫.scm dir-with-utf8-file/
      + cat
      + guix shell -CWN -D guix glibc-locales -- env LANG=C.UTF-8 ./pre-inst-env guix repl -- ./repro.scm

      computed-file:
      ?

      program-file:
      #!/gnu/store/mfkz7fvlfpv3ppwbkv0imb19nrf95akf-guile-3.0.9/bin/guile --no-auto-compile
      !#
      ((? _ (display "\u732b")))

      scheme-file:
      ((? _ (display "\u732b")))

      text-file*:
      ???

      compiled-modules:
      building path(s) `/gnu/store/ay3jifyvliigfgnz67jf0kgngzpya5a5-module-import-compiled'
      Backtrace:
                 5 (primitive-load "/gnu/store/rn7b0dq6iqfmmqyqzamix2mjmfy?")
      In ice-9/eval.scm:
          619:8  4 (_ #f)
      In srfi/srfi-1.scm:
         460:18  3 (fold #<procedure 7ffff79245e0 at ice-9/eval.scm:336:1?> ?)
      In ice-9/eval.scm:
         245:16  2 (_ #(#(#<directory (guix build utils) 7ffff779f320>) # ?))
      In ice-9/boot-9.scm:
        1982:24  1 (_ _)
      In unknown file:
                 0 (stat "./???.scm" #<undefined>)

      ERROR: In procedure stat:
      In procedure stat: No such file or directory: "./???.scm"
      builder for `/gnu/store/dxg87135zcd6a1c92dlrkyvxlbhfwfld-module-import-compiled.drv' failed with exit code 1

      file-union:
      (. .. ?)

      imported-modules:
      (. .. 猫.scm)

      local-file:
      (. .. 猫.scm)

      plain-file:
      猫

      mixed-text-file:
      猫猫猫

      directory-union:
      (. .. 猫.scm)

Which I think you will agree is far from optimal.  After my fix the output
changes to:

      + '[' -f guix.scm ']'
      + '[' -f gnu.scm ']'
      + cat
      + mkdir -p dir-with-utf8-file
      + cp 猫.scm dir-with-utf8-file/
      + cat
      + guix shell -CWN -D guix glibc-locales -- env LANG=C.UTF-8 ./pre-inst-env guix repl -- ./repro.scm

      computed-file:
      猫

      program-file:
      #!/gnu/store/8kbmn359jqkgsbqgqxnmiryvd9ynz8w7-guile-3.0.9/bin/guile --no-auto-compile
      !#
      ((λ _ (display "猫")))

      scheme-file:
      ((λ _ (display "猫")))

      text-file*:
      猫猫猫

      compiled-modules:
      (. .. 猫.go)

      file-union:
      (. .. 猫)

      imported-modules:
      (. .. 猫.scm)

      local-file:
      (. .. 猫.scm)

      plain-file:
      猫

      mixed-text-file:
      猫猫猫

      directory-union:
      (. .. 猫.scm)

Which is actually what the user would expect.

I also added missing arguments to the documentation.

* guix/gexp.scm (computed-file):  Set LANG to C.UTF-8 by default.
(compiled-modules): Try to `setlocale'.
(gexp->script), (gexp->file): New `locale' argument defaulting to C.UTF-8.
(text-file*): Set output port encoding to UTF-8.
* doc/guix.texi (G-Expressions)[computed-file]: Document the changes.  Use
@var.  Document #:guile.
[gexp->script]: Document #:locale.  Fix default value for #:target.
[gexp->file]: Document #:locale, #:system and #:target.

Change-Id: Ib323b51af88a588b780ff48ddd04db8be7c729fb
2025-01-06 13:43:28 +01:00
Florian Pelz
1c7e697683
doc: Fix markup.
* doc/guix-cookbook.texi (Upgrade Postgres for Cuirass): Escape '@'.

Change-Id: Ifb34a20d107721df0523c343259e598503c87afb
2025-01-01 03:17:11 +01:00
Hilton Chain
5ce59e0413
build-system: zig: Support Zig package manager.
* guix/build-system/zig.scm (zig-build,zig-cross-build)
[#:install-source?,#:skip-build?]: New arguments.
[#:tests?]: Honor #:skip-build?.
* guix/build/zig-build-system.scm (zig-source-install-path)
(zig-input-install-path,unpack-dependencies): New procedures.
(%standard-phases): Add 'unpack-dependencies.
(build,install): Honor #:skip-build?.
* doc/guix.texi (Build Systems)[zig-build-system]: Update documentation.
* gnu/packages/zig.scm (zig-0.9)[native-search-paths]: Add
GUIX_ZIG_PACKAGE_PATH.
Use search paths defined in (guix search-paths).
(add-build.zig.zon,rename-zig-dependencies): New procedures.
* gnu/packages/ncdu.scm (ncdu)[arguments]: Don't install source.
* gnu/packages/zig-xyz.scm (river,tigerbeetle,zig-zls)[arguments]: Likewise.
2024-12-31 10:56:34 +08:00
45mg
8695dcf9d2
services: elogind: Support hook directories.
Allow the user to specify scripts to be added into Elogind's hook
directories. These scripts will be run before/after
suspend/hibernate/poweroff/reboot.

Also allow setting the associated config options.

* gnu/services/desktop.scm (elogind-configuration): add
`system-sleep-hook-files`, `system-shutdown-hook-files`,
and 4 new config options.
(elogind-configuration-file): Add entries for the new config options
under the `[Sleep]` section.
(elogind-etc-directory): New procedure.
(elogind-service-type): Extend `etc-service-type` using `/etc/elogind`.
* doc/guix.texi (Desktop Services): Document the new options.

Change-Id: I7e22cbaa9d031049b9d085ba0ce4cc8a8b4f16ff
Reviewed-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2024-12-30 13:49:57 +01:00
Ludovic Courtès
13e7caf52c
services: resize-file-system: Remove invalid default value.
The default value of #f for the ‘file-system’ field is invalid and would
trigger a type error when running ‘guix system search’.

* gnu/services/admin.scm (<resize-file-system-configuration>)[file-system]:
Remove default value.
(resize-file-system-service-type)[default-value]: Remove.
* doc/guix.texi (Miscellaneous Services): Adjust accordingly.

Change-Id: If73f8923f49d38827059ba98bd53636a7f3917fe
2024-12-30 11:01:43 +01:00
Ludovic Courtès
1305f78d05
reconfigure: Support loading the system for kexec reboot.
This allows rebooting straight into the new system with ‘reboot -k’.

* guix/scripts/system/reconfigure.scm (kexec-loading-program)
(load-system-for-kexec): New procedures.
* gnu/tests/reconfigure.scm (run-kexec-test): New procedure.
(%test-upgrade-kexec): New variable.
* guix/scripts/system.scm (perform-action): Add #:load-for-kexec?.
Call ‘load-system-for-kexec’.
(show-help, %options): Add ‘--no-kexec’.
(%default-options): Add ‘load-for-kexec?’.
(process-action): Honor it and pass it to ‘perform-action’.
* gnu/machine/ssh.scm (deploy-managed-host): Add call to
‘load-system-for-kexec’.
* doc/guix.texi (Invoking guix system): Document it.

Change-Id: I86d11f1c348e4359bc9e73c86e5aebff60fe875c
2024-12-28 22:47:34 +01:00
Ludovic Courtès
7d235a6799
pull: Add ‘--no-check-certificate’.
This can be tested with:

  guix shell libfaketime -- faketime 2019-01-01 \
    guix pull -q --no-check-certificate -p /tmp/p

* guix/scripts/pull.scm (%options, show-help): Add
‘--no-check-certificate’.
(%default-options): Add ‘verify-certificate?’ key.
(guix-pull): Honor it.
* doc/guix.texi (Invoking guix pull): Document it.

Change-Id: Ia9d7af1c64156b112e86027fb637e2e02dae6e3c
2024-12-25 23:51:10 +01:00
Jean-Baptiste Note
b732d702f9
services: syslog: Add extra-options argument to syslog service.
* gnu/services/base.scm (<syslog-configuration>): Add extra-options field.
  (syslog-shepherd-service): Use it when running the service.

* doc/guix.texi: Document it.

Change-Id: I540d070b9a9678b45ec9fa28d6fdc761f9b3fd9a
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2024-12-23 20:45:31 +01:00
Ludovic Courtès
5316e84e1b
packages: Add #:recursive? to ‘package-input-rewriting’.
* guix/packages.scm (package-input-rewriting): Add #:recursive?
[cut?]: Honor it.
* tests/packages.scm ("package-input-rewriting, recursive"): New test.
* doc/guix.texi (Defining Package Variants): Document it.

Change-Id: Ie82f35ae0ae873dc68f8b1c0dd6616f552772e65
2024-12-18 18:32:41 +01:00
Giacomo Leidi
2767b4ef03
services: Add rootless-podman-service-type.
* gnu/services/containers.scm: New file;
(rootless-podman-configuration): new variable;
(rootless-podman-service-subids): new variable;
(rootless-podman-service-accounts): new variable;
(rootless-podman-service-profile): new variable;
(rootless-podman-shepherd-services): new variable;
(rootless-podman-service-etc): new variable;
(rootless-podman-service-type): new variable.
* gnu/local.mk: Test it.
* gnu/local.mk: Add them.
* doc/guix.texi (Miscellaneous Services): Document it.

Change-Id: I041496474c1027da353bd6852f2554a065914d7a
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2024-12-18 18:32:41 +01:00
Giacomo Leidi
a1ecd7f56c
system: Add /etc/subuid and /etc/subgid support.
This commit adds a Guix System service to handle allocation of subuid
and subgid requests.  Users that don't care can just add themselves as a
subid-range and don't need to specify anything but their user name.
Users that care about specific ranges, such as possibly LXD, can specify
a start and a count.

* doc/guix.texi (Miscellaneous Services): Document it.
* gnu/build/activation.scm (activate-subuids+subgids): New variable.
* gnu/local.mk: Add gnu/tests/shadow.scm.
* gnu/system/accounts.scm (sexp->subid-range): New variable.
* gnu/system/shadow.scm (%root-subid): New variable;
(subids-configuration): new record;
(subid-range->gexp): new variable;
(assert-valid-subids): new variable;
(delete-duplicate-ranges): new variable;
(subids-activation): new variable;
(subids-extension): new record;
(append-subid-ranges): new variable;
(subids-extension-merge): new variable;
(subids-service-type): new variable.
* gnu/tests/shadow.scm (subids): New system test.

Change-Id: I3755e1c75771220c74fe8ae5de1a7d90f2376635
Signed-off-by: Giacomo Leidi <goodoldpaul@autistici.org>
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2024-12-18 18:32:40 +01:00
Lars Bilke
27a371ff94
doc: Add note on nsncd as a replacement for nscd.
* doc/guix.texi Add note on nsncd in Name Service Switch section.

Change-Id: Ib804ab2e7d83d13f8f81d875f957eae2304eb232
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2024-12-18 13:22:48 +01:00
Maxim Cournoyer
097de97982
doc: Document naming convention for work-in-progress branches.
* doc/contributing.texi (Managing Patches and Branches): Extend doc.

Change-Id: I12253a81fe7c954734e68eba08eb5e8c8a434faa
2024-12-16 22:39:24 +09:00
Christopher Baines
acb256d458
services: guix-data-service: Support specifying configuration.
The database contains some tables that are effectively used for configuration.
This commit starts to expose these to the guix service, enabling the
configuration to be handled by the service.

* gnu/services/guix.scm (<guix-data-service-configuration>): Add
git-repositories and build-servers.
(guix-data-service-configuration-git-repositories,
guix-data-service-configuration-build-servers): New procedures.
(guix-data-service-shepherd-services): Add new shepherd service to setup the
database.

Change-Id: I519efd9157b60f18c7e80e3bdc92c0e3c5729334
2024-12-16 09:20:40 +00:00
Richard Sent
6ec3c260a1
services: Add resize-file-system-service.
* gnu/services/admin.scm (resize-file-system-configuration): New configuration
type.
(resize-file-system-shepherd-service): New procedure.
(resize-file-system-service-type): New variable.
* doc/guix.texi (Miscallaneous Services): Document it.

Change-Id: Icae2fefc9a8d936d4c3add47520258b341f689a4
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2024-12-16 00:21:05 +01:00
Ludovic Courtès
f8f005815e
packages: Use origin file names as their input labels.
* guix/packages.scm (add-input-label): Rely on 'origin-actual-file-name' for
internal inputs labels.
* tests/packages.scm ("this-package-input, origin"): New test.
* doc/guix.texi (package Reference): Mention origin lookup for
‘lookup-package-input’ & co.
* gnu/packages/base.scm (tzdata)[inputs]: Reintroduce label.
* gnu/packages/tex.scm (texlive-hyphen-complete)[inputs]: Likewise.
(texlive-newverbs)[native-inputs]: Likewise.

Change-Id: I6ba5352b1b1b8ab810da3730b09cb9db61d6429c
Co-authored-by: Simon Tournier <zimon.toutoune@gmail.com>
2024-12-16 00:19:56 +01:00
Ricardo Wurmus
ae83542f84
doc: Fix variable name.
* doc/guix.texi (Sway window manager): Replace %sway-default-execs with
%sway-default-startup-programs.

Change-Id: Ib848dee67a7e8083042cac45479e99f083350cf7
2024-12-15 19:54:07 +01:00
Tomas Volf
e92b20a41a
services: mingetty: Support waiting on shepherd services.
For auto-login on systems with elogind, dbus-system needs to be started.  This
commit adds ability to express that ordering.

* gnu/services/base.scm (<mingetty-configuration>): Add shepherd-requirement
field.
(mingetty-shepherd-service): Use it.
* doc/guix.texi (Base Services)<mingetty-configuration>: Document it.

Change-Id: Iedbdc4375180740379d561aa193d7c63350d2e7b
Modified-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
2024-12-15 00:19:41 +09:00
Tomas Volf
7068f6f7a5
services: mingetty: Add additional configuration options.
Not all aspects of mingetty were configurable, so this commit adds the
additional configuration fields to support that.

* gnu/services/base.scm (<mingetty-configuration>): Add delay, print-issue,
print-hostname, nice, working-directory, root-directory fields.
(mingetty-shepherd-service): Use the new fields.
(define-module)<#:export>: Export the new accessors.
* doc/guix.texi (Base Services)<mingetty-configuration>: Document the
additional field.

Change-Id: I4557a82498805ade0b341feda9d33eccc305690f
2024-12-15 00:19:41 +09:00
Lars-Dominik Braun
1ef178c644
doc: Document new options for pyproject-build-system.
* doc/guix.texi (Build Systems): Add documentation for
changed #:configure-flags and new #:backend-path.

Change-Id: Ic8be598ea52ae04230b1e61c329ee55ccbb5dd63
2024-12-13 20:15:42 +00:00
Gabriel Wicki
1fad7d9d15
doc: cookbook: Document postgres upgrade for cuirass.
* doc/guix-cookbook.texi(System Management): New chapter.
[Upgrade Postgres for Cuirass] New node.

Change-Id: I23aae16b1f50b6c40c56b78712dfd6eae3834761
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2024-12-12 12:52:08 +01:00
Richard Sent
b0421cc964
services: admin: Improve use of unattended-upgrade reboot? field.
This ensures the unattended upgrade job successfully reboots regardless of the
value for services-to-restart. Previously the mcron service may be restarted
which would halt script execution before the system rebooted.

* gnu/services/admin.scm (unattended-upgrade-mcron-jobs): Do not restart
services when reboot? is #t.
* doc/guix.texi (Unattended Upgrades): Document it.

Change-Id: I8e486a764ec1dc5c3090130cc447a0cc3f5a2e00
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2024-12-09 23:15:45 +01:00
Richard Sent
0972a27572
services: wireguard: Support lists of gexps for most fields.
In order to support more flexibility in Wireguard configuration, ungexp the
configuration fields directly instead of ungexp-splicing a sexp
calculator. This allows for the fields to take arbitrary gexps instead of only
strings which is particularly helpful for the Pre/Post Up/Down commands.

* gnu/services/vpn.scm (wireguard-configuration-file): Ungexp configuration
lists instead of ungexp-splicing the code surrounding them.
* doc/guix.texi (VPN Services)[wireguard]: Document it.

Change-Id: If074cbb78473b6fd34e0e4e990d2ed268001d6c7
Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
2024-12-06 20:09:28 +01:00
Richard Sent
1a17a0f90d
services: wireguard: Add the bootstrap-private-key? field.
The syntax from using the private-key field is more convenient than writing a
custom PreUp command (more formatting and preshared keys). Instead of trying
to guess if private-key is/is not a file path, add an option to disable
bootstrapping while still using private-key.

* gnu/services/vpn.scm (<wireguard-configuration>): Add
bootstrap-private-key?.
(wireguard-activation): Check bootstrap-private-key? before bootstrapping.
* doc/guix.texi (VPN Services)[wireguard]: Document it.

Change-Id: I6ba71ad58b26743057a221a54a246369022f83a5
Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
2024-12-06 20:09:28 +01:00
Richard Sent
aa12068c91
services: wireguard: Make the private-key field optional.
Users who retrieve the private-key via a PreUp field need to be able to
disable the default retrieval mechanism.

* gnu/services/vpn.scm (<wireguard-configuration>)[private-key]: Change
comment.
(wireguard-configuration-file): Conditionally serialize private-key.
* gnu/services/vpn.scm (wireguard-activation): Do not create private-key if
the field is #f.
* doc/guix.texi (VPN Services)[wireguard-configuration]: Document it.

Change-Id: Iac419809ae94eb76e97ff1f1749e2f4b3e65bb04
Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
2024-12-06 20:09:28 +01:00
Ekaitz Zarraga
9001514e24
doc: contributing: Remove --base=auto
* doc/contributing.texi(Sending a Patch Series): Remove --base=auto from
  examples

Change-Id: Idd421f9d6b592d6a314edfaa66404dee4c1b2241
2024-12-03 22:43:10 +01:00
Ekaitz Zarraga
7b46b8db9a
doc: Explain git format-patch revision format
* doc/contributing.texi(Sending a Patch Series): Add a note about
`git format-patch` revision format and link to git documentation.

Change-Id: Ie08f85dc19e3804165fb184664b74e85a804d7c4
2024-12-03 22:42:54 +01:00
Janneke Nieuwenhuizen
4d9c5984fe
gnu: bootstrap: Add support for x86_64-gnu, aka the 64bit Hurd.
On commit:
    ec8a5ec15f
    gnu: make-bootstrap: Update gcc-static to gcc-14, for the 64bit Hurd.

Run:
    ./pre-inst-env guix build --target=x86_64-gnu bootstrap-tarballs

Producing:
    /gnu/store/w1n7bdpn88plcc49h7n0jriaj41sgwx8-bootstrap-tarballs-0/

With guix hash -r:
    15cb1xh7s2hhp8s0d81bjnw1759w9sh7ckc9n5jq2f3rqw6z76by

* gnu/packages/bootstrap.scm (%bootstrap-executables): Add entries for
x86_64-gnu.
(%bootstrap-guile-hash, %bootstrap-coreutils&co, %bootstrap-binutils,
%bootstrap-glibc, %bootstrap-gcc): Add entry for x86_64-gnu.
* guix/packages.scm (%supported-systems, %hurd-systems): Add x86_64-gnu.
(%cuirass-supported-systems): Remove x86_64-gnu.
* guix/utils.scm (target-64bit?): Add x86_64-gnu.
* m4/guix.m4: Add x86_64-gnu as a supported system.
* doc/guix.texi (GNU Distribution): Add x86_64-gnu.

Change-Id: I828159aedb3f66caba98e935083cc3682429f219
2024-12-03 08:38:00 +01:00
Janneke Nieuwenhuizen
5cb84f2013
system: Add "installer" sub-command.
* guix/scripts/system/installer.scm: New file.
* Makefile.am (MODULES)[ENABLE_INSTALLER]: Register it.
(MODULES_NOT_COMPILED)[!ENABLE_INSTALLER]: Likewise.
* guix/scripts/system.scm (show-help): Add help for "installer" sub-command.
(actions): Register "installer".
(guix-system): Invoke `guix-system-installer' sub-command.
* doc/guix.texi (Invoking guix system): Document it.
* gnu/installer.scm (run-installer): Remove "./pre-inst env".

Change-Id: I5a05b941c060682c17d45d871df3cf34e3f8643a
2024-12-03 08:26:03 +01:00
Greg Hogan
522732d5c1
packages: 'package-input-rewriting/spec' optionally replace hidden.
Commit eee95b5a87 changed package
rewriting to ignore hidden packages. This patch permits the previous use
by adding an option to rewrite hidden packages.

* guix/packages.scm (package-input-rewriting/spec)[rewrite]: When P is
hidden, return it as-is unless #:replace-hidden? has been enabled.
* tests/packages.scm ("package-input-rewriting/spec, replace hidden
package"): New test.
* doc/guix.texi (Defining Package Variants): Update.

Change-Id: I0a7988cac70e0c6b88b0fe6e27c1036fa723e030
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2024-12-02 12:00:52 +01:00
Arne Babenhauserheide
62f8399e6a
pack: Add ‘--file=FILE’ with the same meaning as for ‘guix build’.
* guix/scripts/pack.scm (%options): add --file=FILE, but no
  shorthand (that’s already taken for format).
* doc/guix.texi (Invoking guix pack): Document it.

Change-Id: I87797fccdf218ead3b7f471a84034e8a8d566245
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2024-12-02 11:57:13 +01:00
Ludovic Courtès
6b14eb3402
guix build: Add ‘--dependents’.
* guix/scripts/build.scm (show-help, %options): Add ‘--dependents’.
(dependents): New procedure.
(options->things-to-build): Add ‘store’ parameter; honor ‘dependents’
option.
[for-type]: Handle ‘dependents’ type.
(options->derivations): Update call to ‘options->things-to-build’.
* tests/guix-build.sh: Add test.
* doc/guix.texi (Additional Build Options): Document ‘--dependents’.
(Invoking guix refresh): Cross-reference it.
* doc/contributing.texi (Submitting Patches): Mention it.

Change-Id: I00b6d5831e1f1d35dc8b84a82605391d5a8f417c
2024-12-01 20:14:15 +01:00
Ludovic Courtès
a633422371
guix build: Add ‘--development’ option.
* guix/scripts/build.scm (show-help, %options): Add ‘-D’.
(options->things-to-build): Change ‘append-map’ to a loop.  Honor ‘-D’.
* tests/guix-build.sh: Add test.
* doc/guix.texi (Additional Build Options): Document it.

Reviewed-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Change-Id: I99227aadfe861e43c001a4872292bd687b37f5d4
2024-12-01 20:14:15 +01:00
Florian Pelz
4bd3f5292d
doc: Fix typos.
* doc/guix.texi (origin Reference): Add missing ‘the’.
(Mail Services): Fix spelling.

Change-Id: I1ef06207b782a514d26a8f42a3d78de44b3d3f2a
2024-11-29 17:51:54 +01:00
Ekaitz Zarraga
84dc562263
doc: Add "Contributing to Guix's infrastructure".
Use the "Call for contribution to the Guix infrastructure" by Ludovic
Courtès to create a section in the documentation that describes how to
contribute to the infrastructure.

https://lists.gnu.org/archive/html/guix-devel/2024-05/msg00183.html

* doc/contributing.texi (Contributing to Guix's infrastructure): New
  section.

Change-Id: I3f3a99ad884110cc8323789e8c14bec1f7327e97
2024-11-29 15:30:22 +01:00
Florian Pelz
3f938d841e
doc: Refer to up-to-date version of ‘gcc-toolchain’ in example.
* doc/guix.texi (Writing Manifests): Write that for
‘gcc-toolchain’ we have GCC version 14 today.

Change-Id: I9bfbe4a6d36b0dae16cafec86ce58ef50e64e50d
2024-11-24 12:53:56 +01:00
Florian Pelz
745943d253
doc: Fix typos.
* doc/contributing.texi (Commit Access): Use @xref when beginning a
sentence.
* doc/guix.texi (package Reference): Likewise.
(Invoking guix gc): Add missing words.
(Invoking guix pack): Likewise.
(Specifying Channel Authorizations): Move period after closing parenthesis.
(origin Reference)[git-fetch, git-fetch/lfs]: Add missing optional argument.
[svn-reference]: Add missing ‘the’.

Change-Id: I8a5e475e928200299117e55274847319eeda8bdb
2024-11-24 10:30:00 +01:00
Sebastian Dümcke
ccf72d5074
pack: Add support for AppImage pack format.
* guix/scripts/pack.scm (self-contained-appimage): New procedure.
(%formats, show-formats): Add it.
(guix-pack): Honor it.
* doc/guix.texi: Document AppImage pack.
* tests/pack.scm ("appimage", "appimage + localstatedir"): New tests.

Co-authored-by: Noé Lopez <noelopez@free.fr>
Change-Id: I33ebfec623cff1cfcd6f029d2d3054c23ab1949a
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2024-11-23 16:30:17 +01:00
zero@fedora
2d3bf6a2a3
import: cpan: Support recursive imports.
* guix/import/cpan.scm (cpan-module->sexp): Return two values.
(cpan->guix-package): Add #:version.  Return two values.
(cpan-recursive-import): New procedure.
* guix/scripts/import/cpan.scm (show-help, %options): Add ‘-r’.
(guix-import-cpan): Adjust accordingly.

Change-Id: Id167c7ddd079f4e04650ce7cc1692a9de36cd8fe
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2024-11-23 16:23:19 +01:00
Ian Eure
ea5ee89274
gnu: Add powertop-service-type.
* gnu/services/pm.scm (powertop-shepherd-service)
(powertop-service-type, powertop-configuration): New variables.
* doc/guix.texi (Power Management Services): Document powertop-service-type.

Change-Id: I1c5ef855526458ad54f62ca6e755da82acce1c4a
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2024-11-23 16:09:25 +01:00
Tomas Volf
ad09bf9638
services: nginx-upstream-configuration: Allow file-like objects
* gnu/services/web.scm (emit-nginx-upstream-config): Support file-like
objects.
* doc/guix.texi (Web Services)[nginx-upstream-configuration]: Document it.

Change-Id: I49996e358174dc77b31e3c91b908a6a72f3eb705
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2024-11-20 23:41:08 +01:00
Florian Pelz
d6b8679784
doc: Explain ‘--’ syntax of ‘guix shell’ before giving examples.
This paragraph is present in the ‘guix environment’ docs.  I presume
it clarifies ‘guix shell’ for newcomers as well.

* doc/guix.texi (Invoking guix shell): Take over an introductory
paragraph from ‘guix environment’ and use it for ‘guix shell’.

Change-Id: I06280516ad3436260114b074c5f325e6984e9c76
2024-11-19 11:25:48 +01:00
Nicolas Graves via Guix-patches via
b93434e656
gnu: postgresql-configuration: Unset default postgresql.
* gnu/services/databases.scm (postgresql-configuration)[postgresql]:
Unset default.
(postgresql-service-type): Remove default-value.
(postgresql-service): Revert default to postgresql-10 (rationale: We
can remove this service at the same time than postgresql-10, in
something like 6 months to a year).
* doc/guix.texi: Remove postgresql default reference in documentation.

Signed-off-by: Florian Pelz <pelzflorian@pelzflorian.de>
2024-11-16 18:13:02 +01:00
aurtzy
ab80403eea
doc: Fix `copy-recursively' arguments.
The `select?' keyword is part of the description instead of immediately
following `keep-permissions?' in the arguments list for `copy-recursively'.
This adds a missing '@' to fix that.

* doc/guix.texi (Build Utilities): Fix `copy-recursively' arguments.

Change-Id: If6802490a6afebc884b039d84f1fe4f9202a1151
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2024-11-12 23:29:09 +01:00
Ludovic Courtès
dabbf71aa7
doc: Adjust stale reference to quote instead of gexp.
* doc/guix.texi (Build Phases): Mention hash-tilde, not apostrophe.

Change-Id: I8dca74da46d35692be122fb3e8e3ab40dd70606e
2024-11-12 23:27:09 +01:00
Efraim Flashner
922d017081
build/go: Replace symlinks with a copy of the file.
* guix/build/go-build-system.scm (fix-embed-files): New procedure.
(%standard-phases): Add 'fix-embed-files after 'unpack.
* guix/build-system/go.scm (#:embed-files): New key parameter.
* doc/guix.texi: (go-build-system): Document a new key.

Co-authored-by: Sharlatan Hellseher <sharlatanus@gmail.com>
Change-Id: I27bc46fa1a3f4675ff73b6cba4ef5c3d177c22b1
2024-11-09 21:33:51 +00:00
Troy Figiel
56cc37bfb2
build-system/go: Allow providing additional test flags.
By allowing the use of test flags, we can more precisely skip failing tests
(for go version >=1.20), disable the vetting stage or select a subset of tests
(e.g. if an upstream flag is provided to skip tests which require a network
connection).  At the moment, the only way around these test failures is to
remove the test file completely or patch the code ourselves.

* guix/build-system/go.scm (go-build): Add test-flags variable.
(go-cross-build): Add test-flags variable.
* guix/build/go-build-system.scm (check): Pass the additional test flags to the invoke call.
* doc/guix.texi (go-build-system): Document <#:test-flags> parameter.

Signed-off-by: Sharlatan Hellseher <sharlatanus@gmail.com>
Change-Id: I4015870fbbc15503cb405fe9ef6032953a5ff17f
2024-11-09 21:33:39 +00:00
Arun Isaac
2fa6f985a3
doc: Explicitly mention --localstatedir and --sysconfdir configure flags.
Prior to this commit, the terms localstatedir and sysconfdir were used without
being defined earlier in this section. This commit clarifies that they are
configure flags.

* doc/contributing.texi (Building from Git): Explicitly mention
--localstatedir and --sysconfdir configure flags.

Change-Id: I3e6edbbc1f2a342196e732e14257dbdf9a3f4303
2024-11-05 22:46:20 +00:00
Reepca Russelstein
6a8a6171a7
services: guix: Add access control to daemon socket.
* gnu/services/base.scm
  (guix-configuration-socket-directory-{permissions,group,user}): New fields.
  (guix-shepherd-service): Use them.
* doc/guix.texi (Base Services): Document them.

Change-Id: I8f4c2e20392ced47c09812e62903c87cc0f4a97a
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2024-11-03 23:05:06 +01:00