me
/
guix
Archived
1
0
Fork 0
Commit Graph

2095 Commits (fa0563e7fa4effbeb86ad0fb377d1bfe5a4c8bdc)

Author SHA1 Message Date
Ludovic Courtès 1e47148f46
daemon: Implement ‘substitute-urls’ RPC.
* nix/libstore/worker-protocol.hh (PROTOCOL_VERSION): Bump.
(WorkerOp): Add ‘wopSubstituteURLs’.
* nix/nix-daemon/nix-daemon.cc (performOp): Implement it.
* guix/store.scm (%protocol-version): Bump.
(operation-id): Add ‘substitute-urls’.
(substitute-urls): New procedure.
* tests/store.scm ("substitute-urls, default")
("substitute-urls, client-specified URLs")
("substitute-urls, disabled"): New tests.

Change-Id: I2c0119500c3a1eecfa5ebf32463ffb0f173161de
2023-12-11 23:18:53 +01:00
Jean-Pierre De Jesus DIAZ 520e3d267e
guix: Add target-avr?.
* guix/utils.scm (target-avr?): New procedure.
* tests/utils.scm: Add tests for target-avr? procedure.

Change-Id: Iaa0fa97a2b6bc45d45f907f43157f1548a0ba3fa
Signed-off-by: Efraim Flashner <efraim@flashner.co.il>
2023-12-11 11:53:54 +02:00
Ludovic Courtès d98a0203b7
shell: ‘--development’ honors ‘--system’.
Fixes a bug whereby ‘package->development-manifest’ would run with the
wrong system in mind, leading to errors like this:

  $ guix shell -s i586-gnu -D shepherd --no-grafts
  guix shell: error: package linux-libre-headers@5.15.49 does not support i586-gnu

* guix/scripts/environment.scm (options/resolve-packages): Define
‘system’ and pass it to ‘package->development-manifest’.’
* tests/guix-shell.sh: Test it.

Change-Id: I95c471c1918913ab80dec7d3ca64fe38583cce78
2023-12-06 23:50:04 +01:00
Ludovic Courtès 06b9c1260c
substitute: Do not exit when failing to find a nar.
Fixes <https://issues.guix.gnu.org/67575>.

* guix/scripts/substitute.scm (process-substitution/fallback): Use
‘report-error’ instead of ‘leave’.  Write status line to PORT.
* tests/substitute.scm ("substitute, narinfo is available but nar is
missing"): Adjust accordingly.

Change-Id: Ic7297dbd563c007111ec2167c8d52505a07d4822
2023-12-04 22:26:36 +01:00
Saku Laesvuori ab8612d99e
guix: import: Fix parsing Cabal files that import many stanzas
* guix/import/cabal.scm (eval-cabal)[eval]: Split imports to a
normalized list before mapping over it.
* tests/hackage.scm: Test it.

Change-Id: I39ece019251b6a23a937c8562d2d4a545a6bc7df
Signed-off-by: Lars-Dominik Braun <lars@6xq.net>
2023-12-03 16:15:29 +01:00
Saku Laesvuori 5bd00bb542
guix: import: Parse cabal layout blocks correctly
Cabal consideres lines to be part of a layout block if they are indented
at least one space more than the field line the block belongs to.
Previously Guix considered lines to be a part of the block if they were
indented at least as much as the first line in it.

This also makes a workaround that enabled if statements to have multiple
elses redundant and removes it.

Fixes: https://issues.guix.gnu.org/35743

* guix/import/cabal.scm (current-indentation*): Renamed from
current-indentation.
(previous-indentation, current-indentation): New variables.
(make-cabal-parser): Remove outdated comment.
[open]: Use previous-indentation + 1 instead of
current-indentation.
[elif-else]: Split to elif and else to allow only one ELSE in an if
statement.
(read-cabal)[parameterize]: Use current-indentation* and previous-indentation.
* tests/hackage.scm (hackage->guix-package test mixed layout): Expect to
  pass.

Change-Id: I3a1495b1588a022fabbfe8dad9f3231e578af4f3
Signed-off-by: Lars-Dominik Braun <lars@6xq.net>
2023-12-03 09:11:29 +01:00
Janneke Nieuwenhuizen b0715d7cd2
gnu: Use ‘libc-utf8-locales-for-target’.
* guix/packages.scm (%standard-patch-inputs): Use
‘libc-utf8-locales-for-target’ instead of ‘glibc-utf8-locales’.
* guix/self.scm (%packages): Likewise.
* gnu/home/services/ssh.scm (file-join): Likewise
* gnu/installer.scm (build-compiled-file): Likewise.
* gnu/packages/chromium.scm (ungoogled-chromium/wayland): Likewise.
* gnu/packages/gnome.scm (libgweather4, tracker): Likewise.
* gnu/packages/javascript.scm (js-mathjax): Likewise.
* gnu/packages/package-management.scm (guix, flatpak): Likewise.
* gnu/packages/raspberry-pi.scm (raspi-arm64-chainloader): Likewise.
* gnu/packages/suckless.scm (svkbd): Likewise.
* gnu/services.scm (cleanup-gexp): Likewise.
* gnu/services/base.scm (guix-publish-shepherd-service): Likewise.
* gnu/services/guix.scm (guix-build-coordinator-shepherd-services)
(guix-build-coordinator-agent-shepherd-services): Likewise.
* gnu/services/guix.scm (guix-build-coordinator-queue-builds-shepherd-services):
(guix-data-service-shepherd-services)
(nar-herder-shepherd-services)
(bffe-shepherd-services): Likewise.
* gnu/services/web.scm (anonip-shepherd-service)
(mumi-shepherd-services): Likewise.
* gnu/system/image.scm (system-disk-image, system-iso9660-image)
(system-docker-image, system-tarball-image): Likewise.
* gnu/system/install.scm (%installation-services): Likewise.
* guix/profiles.scm (info-dir-file): Likewise.
(ca-certificate-bundle, profile-derivation): Likewise.
* guix/scripts/pack.scm (store-database, set-utf8-locale): Likewise.
* tests/pack.scm: Likewise.
* tests/profiles.scm ("profile-derivation, cross-compilation"):
Likewise.

Co-authored-by: Ludovic Courtès <ludo@gnu.org>
Co-authored-by: Christopher Baines <mail@cbaines.net>
Change-Id: I24239f427bcc930c29d2ba5d00dc615960a6c374
2023-12-02 12:25:45 +01:00
Ludovic Courtès 9b48cf8cdd
tests: Import (guix build syscalls) when (guix build store-copy) is used.
Fixes a test failure introduced in
189525412e.

* guix/progress.scm: Autoload (guix build syscalls).
* tests/gexp.scm ("gexp->derivation, store copy"): Add (guix build
syscalls) to the list of imported modules.  Use ‘with-imported-modules’
rather than #:modules.

Change-Id: I8d3fe90f564ef4b1a340f34cee6c08a741f7b836
2023-11-25 16:29:25 +01:00
Ludovic Courtès e04f8fe4ea
tests: Use ‘test-equal’ for ‘terminal-string-width’ tests.
* tests/syscalls.scm ("terminal-string-width English")
("terminal-string-width Japanese"): Use ‘test-equal’.

Change-Id: I3791b2e4c9e35735db6c6da995da8ef0f9a71804
2023-11-25 16:29:25 +01:00
Ludovic Courtès 2c5fb13a05
read-print: Properly indent ‘parameterize’.
Fixes <https://issues.guix.gnu.org/65427>.

* guix/read-print.scm (%special-forms): Add ‘parameterize’.
* tests/read-print.scm: Add test.

Reported-by: Maxime Devos <maximedevos@telenet.be>
Change-Id: I922bffc527ade539cf2eb304acb25bc9c705a459
2023-11-22 16:51:46 +01:00
Ludovic Courtès 69d9a02094
locate: Accept ‘--clear’ without additional arguments.
Fixes a bug whereby ‘guix locate --clear’ would end with the “no files
to search for” error.

Fixes <https://issues.guix.gnu.org/66799>.

* guix/scripts/locate.scm (guix-locate): Do not emit “no files to search
for” error when 'clear? is set in OPTS.
* tests/guix-locate.sh: Test it.

Reported-by: Maciej Kalandyk <m.kalandyk@outlook.com>
Change-Id: Ib8fa125c18481d7f5408bd89df9503713527641d
2023-11-15 18:29:37 +01:00
Julien Lepiller fd11d7fbf8
guix: syscalls: Add terminal-string-width.
* guix/build/syscalls.scm (terminal-width): New procedure.
* tests/syscalls.scm: Add tests.

Change-Id: I6c2caa9fbaffb1e8f4b8933103399be970d5a8f3
2023-11-11 11:07:27 +01:00
Ludovic Courtès 9f05fbb67d
tests: Make ‘guix time-machine’ test effective.
The test as added in 79ec651a28 had no
effect: first because ‘guix time-machine --commit=X’, not followed by a
command, does nothing, and second because the “! COMMAND” shell stanza
does not have the desired effect (see <https://issues.guix.gnu.org/62406>).

This change rewrites the test to make it effective.

* tests/guix-time-machine.sh: Rewrite.

Change-Id: Ib44a11331c8625e346139a236cffa699cdbd02f2
2023-11-05 23:23:23 +01:00
Ludovic Courtès ff1146fb4f
tests: Adjust to cope with glibc graft.
This is a followup to 1328c4cca5, which
led to failures for tests that were not prepared to cope with that.

* tests/guix-environment-container.sh (hello_drv_nested): Pass “-E
GUIX_BUILD_OPTIONS” so ‘--no-grafts’ is passed.
* tests/guix-pack.sh (GUIX_BUILD_OPTIONS): Add ‘--no-grafts’.
* tests/transformations.scm ("options->transformation, with-graft"):
Skip when ‘glibc-final’ has a replacement.

Change-Id: Ia65c9aeb06f524252815b8290a5ca7bf97ee8136
2023-10-28 01:30:37 +02:00
Ludovic Courtès 344e39c928
profiles: Hooks honor the #:system parameter of ‘profile-derivation’.
Fixes <https://issues.guix.gnu.org/65225>.

* guix/profiles.scm (info-dir-file, package-cache-file)
(info-dir-file, ghc-package-cache-file, ca-certificate-bundle)
(emacs-subdirs, gdk-pixbuf-loaders-cache-file, glib-schemas)
(gtk-icon-themes, gtk-im-modules, linux-module-database)
(xdg-desktop-database, xdg-mime-database, fonts-dir-file)
(manual-database, manual-database/optional): Add optional #:system
parameter and pass it to ‘gexp->derivation’.
(profile-derivation): Pass HOOK a second parameter, SYSTEM.
* gnu/bootloader.scm (efi-bootloader-profile)[efi-bootloader-profile-hook]:
Add optional #:system parameter and pass it to ‘gexp->derivation’.
* guix/channels.scm (package-cache-file): Likewise.
* tests/profiles.scm ("profile-derivation, #:system, and hooks"): New
test.

Reported-by: Tobias Geerinckx-Rice <me@tobias.gr>
2023-10-28 00:17:24 +02:00
Ludovic Courtès 67effc1560
grafts: Fix corner case involving multiple-output derivations.
Fixes a bug that would occur with references to two outputs of the same
derivation, with one of them referring to the other one.

For example, the references of libreoffice include both mariadb:dev and
mariadb:lib; additionally, mariadb:dev refers to mariadb:lib.  In this
case, the glibc graft would not be applied on one of the mariadb paths,
and both the grafted and ungrafted glibc would end up in the closure of
libreoffice.

Fixes <https://issues.guix.gnu.org/66662>.

* guix/grafts.scm (non-self-references): Simplify and include references
to outputs of DRV other than OUTPUTS.
(reference-origins): Simplify and possibly return outputs of DRV itself.
(cumulative-grafts)[graft-origin?]: Add OUTPUT parameter and honor it.
[dependency-grafts]: Adjust accordingly.
* tests/grafts.scm ("graft-derivation, multiple outputs need to be replaced"):
New test.

Change-Id: Iac2005024ab7049037537b3af55298696ec90e3c
2023-10-28 00:17:23 +02:00
Efraim Flashner 742554f9b9
guix: import: Don't import yanked rust crates.
* guix/import/crate.scm (<crate-version>): Add yanked? field.
(crate->guix-package)[find-crate-version]: Remove versions which have
been yanked.
* tests/crate.scm: Adjust tests for new yanked? field.
2023-10-22 16:46:39 +03:00
Zheng Junjie 7da8a43396
tests: Verify plasma.tmpl at x86_64-linux.
Some architectures (like riscv64) do no support some of the KDE
packages, so just test this example on x86_64-linux.

* tests/guix-system.sh: Verify plasma.tmpl to test build it at x86_64-linux.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2023-10-21 16:11:17 +02:00
Ludovic Courtès 2aa45d0347
tests: Avoid three-argument ‘test-assertm’.
This fixes a discrepancy with other tests that have a two-argument
‘test-assertm’ macro.

* tests/pack.scm (test-assertm): Move within ‘with-external-store’, and
remove ‘store’ parameter.
2023-10-20 00:33:26 +02:00
Bruno Victal a7994ed58d
services: configuration: Use transducers within serialize-configuration.
Introduces 'base-transducer', a SRFI-171 based transducer that can be used as a
starting point for writing custom configuration record serializing procedures.

This also fixes the symbol maybe-value serialization test case.

* gnu/services/configuration.scm (empty-serializer?): New predicate.
(base-transducer, tfilter-maybe-value): New procedure.
(serialize-configuration): Adapt to use base-transducer.

* gnu/services/telephony.scm (jami-account->alist): Use transducers to skip
fields that are unserializable or whose field maybe-value is unset.

* tests/services/configuration.scm: Remove test-expect-fail.

Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
2023-10-07 12:41:05 -04:00
Tobias Geerinckx-Rice 7c861ab4f4
tests: read-print: Update expectations.
This follows up on commit 974b04ab80, which
I tested with the wrong test (tests/style.scm) instead.  Oops.

* tests/read-print.scm: Update two TEST-PRETTY-PRINT strings.
2023-09-24 02:00:00 +02:00
Ludovic Courtès 72fc91b113
tests: ‘rewrite-url’ test no longer depends on network access.
Fixes <https://issues.guix.gnu.org/66097>.
Previously, this test would actually need to access dist.libuv.org.

* tests/gnu-maintenance.scm ("rewrite-url, without to-version"): Change
URLs from https to http, and from libuv.org to libuv.example.org.
Parameterize ‘current-http-proxy’.

Reported-by: Janneke Nieuwenhuizen <janneke@gnu.org>
2023-09-27 23:38:21 +02:00
Ludovic Courtès ba21eeb565
tests: Assume ‘git’ is always available.
* tests/channels.scm (gpg+git-available?): Check for ‘gpg-command’
only.
Remove all ‘test-skip’ statements.
* tests/derivations.scm: Likewise.
* tests/git-authenticate.scm: Likewise.
* tests/git.scm: Likewise.
* tests/import-git.scm: Likewise.
2023-09-26 17:36:59 +02:00
Ludovic Courtès 13b0cf85eb
git-download: Use “builtin:git-download” when available.
Fixes <https://issues.guix.gnu.org/63331>.

Longer-term this will remove Git from the derivation graph when its sole
use is to perform a checkout for a fixed-output derivation, thereby
breaking dependency cycles that can arise in these situations.

* guix/git-download.scm (git-fetch): Rename to…
(git-fetch/in-band): … this.  Deal with GIT or GUILE being #f.
(git-fetch/built-in, built-in-builders*, git-fetch): New procedures.
* tests/builders.scm ("git-fetch, file URI"): New test.
2023-09-26 17:36:58 +02:00
Ludovic Courtès 95f2123135
daemon: Add “git-download” built-in builder.
The new builder makes it possible to break cycles that occurs when the
fixed-output derivation for the source of a dependency of ‘git’ would
itself depend on ‘git’.

* guix/scripts/perform-download.scm (perform-git-download): New
procedure.
(perform-download): Move fixed-output derivation check to…
(guix-perform-download): … here.  Invoke ‘perform-download’ or
‘perform-git-download’ depending on what ‘derivation-builder’ returns.
* nix/libstore/builtins.cc (builtins): Add “git-download”.
* tests/derivations.scm ("built-in-builders"): Update.
("'git-download' built-in builder")
("'git-download' built-in builder, invalid hash")
("'git-download' built-in builder, invalid commit")
("'git-download' built-in builder, not found"): New tests.
2023-09-26 17:36:58 +02:00
Ludovic Courtès 7f3ebd6dbc
tests: Adjust ‘guix graph --path’ test to latest Emacs changes.
This is a followup to 3349a50d70.

* tests/guix-graph.sh: Adjust ‘path’.
2023-09-26 17:36:57 +02:00
Janneke Nieuwenhuizen edca2863bc
tests: Fix "package-transitive-supported-systems, implicit inputs".
This is a follow-up to commit
    0e08ad7f19
    gnu: linux-libre-headers: Remove i586-gnu from supported-systems.

See also <https://issues.guix.gnu.org/65755>.

* tests/packages.scm ("package-transitive-supported-systems, implicit inputs"):
Filter expectiation with target-linux?, as %current-system is linux.

Co-authored-by: Ludovic Courtès <ludo@gnu.org>
2023-09-15 22:05:23 +02:00
Maxime Devos 96eda590e1
lint: Check that (cc-for-target) and friends are used.
"CC=gcc" is almost always incorrect; people often just don't
notice the incorrectness because they are compiling natively.
For an exception, see tzdata.

"guix style" partially made things worse, so I partially ignored it.

* guix/lint.scm (check-compiler-for-target): New linter.
* tests/lint.scm
("compiler-for-target: unconditional CC=gcc is unacceptable")
("compiler-for-target: looks through G-expressions")
("compiler-for-target: (cc-for-target) is acceptable")
("compiler-for-target: CC=gcc is acceptable when target=#false"):
Test it.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2023-09-08 19:12:15 +02:00
Brian Cully f66fa5f917
gnu: services: Revert to deleting and updating all matching services
This patch reverts the behavior introduced in
1819512073 which caused ‘modify-services’
clauses to only match a single instance of a service.

We will now match all service instances when doing a deletion or update, while
still raising an exception when trying to match against a service that does
not exist in the services list, or which was deleted explicitly by a ‘delete’
clause (or an update clause that returns ‘#f’ for the service).

Fixes: #64106

* gnu/services.scm (%modify-services): New procedure.
(modify-services): Use it.
(apply-clauses): Add DELETED-SERVICES argument, change to modify one service
at a time.
* tests/services.scm
("modify-services: delete then modify")
("modify-services: modify then delete")
("modify-services: delete multiple services of the same type")
("modify-services: modify multiple services of the same type"): New tests.

Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Modified-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
2023-08-31 23:31:50 -04:00
Ricardo Wurmus c8a642de9a
import-utils: Do not include punctuation when wrapping in @code{}.
* guix/import/utils.scm (beautify-description): Exclude punctuation.
* tests/import-utils.scm: Add new test.
2023-08-28 19:08:38 +02:00
Maxim Cournoyer 1dce887776
gnu-maintenance: Consider Qt source tarballs as "release files".
* guix/gnu-maintenance.scm (release-file?): Use positive logic in doc.
Add a special case for Qt source archives.
* tests/gnu-maintenance.scm ("release-file?"): Update test.
2023-08-26 11:38:56 -04:00
Maxim Cournoyer 6953fb9241
gnu-maintenance: Add support to rewrite version in URL path.
Fixes <https://issues.guix.gnu.org/64015>.
Fixes <https://issues.guix.gnu.org/65304>.

Previously, the generic HTML updater would only look for the list of files
found at the parent of its current source URL, ignoring that the URL may embed
the version elsewhere in its path.  This could cause 'guix refresh' to report
no updates available, while in fact there were, such as for 'libuv'.

* guix/gnu-maintenance.scm (strip-trailing-slash): New procedure.
(%version-rx): New variable.
(rewrite-url): New procedure.
(import-html-release): New rewrite-url? argument.  When true, use the above
procedure.
(import-html-updatable-release): Call import-html-release with #:rewrite-url
set to #t.
* tests/gnu-maintenance.scm ("rewrite-url, to-version specified")
("rewrite-url, without to-version"): New tests.
2023-08-26 11:38:56 -04:00
Josselin Poiret 4fefbd4f14
tests: guix-home: Fix description search for home-mcron.
* tests/guix-home.sh: home-mcron has changed description, adapt the search.
2023-08-25 17:45:47 +02:00
Josselin Poiret 519c3b7803
tests: guix-shell: Use bash instead of user's $SHELL.
* tests/guix-shell.sh (fd_list): Use bash instead of $SHELL.  Some other
shells have trouble not opening too many fds.  Also, bash in an implicit input
of guix, so it should always be available.
2023-08-25 14:23:43 +02:00
Ludovic Courtès df2117b8e0
tests: Adjust 'node-back-edges' test for 'bag' to system-dependent glibc.
Fixes a regression introduced in
560cb51e7b, which would lead this test on
x86_64-linux to return a DIFF with two packages, nhc98 and dev86 (both
have #:system "i686-linux" and thus depend on a different glibc object;
why other system-specific packages such as 'wine' aren't reported is
unclear).

* tests/graph.scm ("node-transitive-edges + node-back-edges"): Use
'test-equal'.  Define 'system-specific?' and use it.
2023-08-21 16:16:47 +02:00
Ludovic Courtès 4b1fdd44ed
tests: store-roots: Remove bogus test.
This test was added in 1261ce1523 but it
proved to be bogus: <https://issues.guix.gnu.org/64760>.

* tests/store-roots.scm ("gc-roots, initial"): Remove.
2023-08-18 16:10:08 +02:00
Josselin Poiret f8dd637756
tests: packages: Set system for expected result of package->bag.
* tests/packages.scm ("package->bag"): Parameterize the expected result by the
system used to lower the package to a bag.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2023-08-18 16:09:29 +02:00
Ludovic Courtès 3363ff1867
ui: 'load*' accepts /dev/fd/N files pointing to a pipe.
This allows users to write Bash commands like:

  guix time-machine -C <(echo %default-channels) -- ...

or:

  guix build -m <(echo '(specifications->manifest (list "guile"))')

Previously, on GNU/Linux, they would fail with:

  error: failed to load '/dev/fd/63': No such file or directory

* guix/ui.scm (try-canonicalize-path): New procedure.
(load*): Use it.
* tests/guix-build.sh: Test 'guix build -m' with a /dev/fd/N file.
2023-08-17 17:33:53 +02:00
Maxim Cournoyer 79ec651a28
scripts: time-machine: Error when attempting to visit too old commits.
* doc/guix.texi (Invoking guix time-machine): Document limitation.
* guix/inferior.scm (cached-channel-instance): New VALIDATE-CHANNELS
argument.  Use it to validate channels when there are no cache hit.
* guix/scripts/time-machine.scm
(%options): Tag the given reference with 'tag-or-commit instead of 'commit.
(%oldest-possible-commit): New variable.
(guix-time-machine) <validate-guix-channel>: New nested procedure.  Pass it to
the 'cached-channel-instance' call.
* tests/guix-time-machine.sh: New test.
* Makefile.am (SH_TESTS): Register it.

Suggested-by: Simon Tournier <zimon.toutoune@gmail.com>
Reviewed-by: Ludovic Courtès <ludo@gnu.org>
Reviewed-by: Simon Tournier <zimon.toutoune@gmail.com>
2023-08-16 21:34:13 -04:00
Tobias Geerinckx-Rice 1def0b98eb
tests: Fix texlive->guix-package test.
This follows up on commit 985cf777b9.

* tests/texlive.scm ("texlive->guix-package"): Don't expect
a texlive-texworks propagated input.
2023-08-13 02:00:00 +02:00
Tobias Geerinckx-Rice ce4c11f8f3
tests: Fix texlive->guix-package test.
This follows up on commit 1619f2c18c.

* tests/texlive.scm ("texlive->guix-package"): Don't expect
a ‘license:’ prefix to ‘fsf-free’.
2023-08-13 02:00:00 +02:00
Maxim Cournoyer 2884abb3df
refresh: Add --target-version option.
* guix/scripts/refresh.scm (%options): Register 'target-version' long version.
(update-specification->update-spec): Add a fallback-version argument.
(options->update-specs): Honor target-version option.
* tests/guix-refresh.sh: Test it.
* doc/guix.texi (Invoking guix refresh): Document it.

Reviewed-by: Ludovic Courtès <ludo@gnu.org>
2023-08-15 09:38:29 -04:00
Brian Cully 8a88b8b0b5
services: Add pam-mount-volume-service-type.
The `pam-mount-volumes-service-type' adds additional volumes to the
pam-mount-service-type in addition to any that are already specified in
`pam-mount-rules'.

* doc/guix.texi (PAM Mount Volume Service): add documentation for
`pam-mount-service-type'.
* gnu/services/pam-mount.scm: new file.
* Makefile.am: add pam-mount tests
* tests/services/pam-mount.scm: new tests

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2023-08-10 09:26:08 +02:00
Maxim Cournoyer 8d785c43ba
services: wireguard: Implement a dynamic IP monitoring feature.
* gnu/services/vpn.scm (<wireguard-configuration>)
[monitor-ips?, monitor-ips-internal]: New fields.
* gnu/services/vpn.scm (define-with-source): New syntax.
(wireguard-service-name, strip-port/maybe)
(ipv4-address?, ipv6-address?, host-name?)
(endpoint-host-names): New procedure.
(wireguard-monitoring-jobs): Likewise.
(wireguard-service-type): Register it.
* tests/services/vpn.scm: New file.
* Makefile.am (SCM_TESTS): Register it.
* doc/guix.texi (VPN Services): Update doc.

Reviewed-by: Bruno Victal <mirai@makinata.eu>
2023-07-21 11:58:44 -04:00
Ricardo Wurmus b9bd1bcce9
import/utils: beautify-description: Wrap class names in @code{...}.
* guix/import/utils.scm (beautify-description): Add procedure to wrap words in
@code{...} markup.
* tests/import-utils.scm: Add two tests.
2023-07-19 15:53:28 +02:00
Maxim Cournoyer c75022d65f
tests: pack: Fix indentation.
* tests/pack.scm: Fix indentation.
2023-07-18 16:56:06 -04:00
Maxim Cournoyer d5f8b50365
pack: Move common build code to (guix build pack).
The rationale is to reduce the number of derivations built per pack to ideally
one, to minimize storage requirements.  The number of derivations had gone up
with 68380db4 ("pack: Extract populate-profile-root from
self-contained-tarball/builder.") as a side effect to improving code reuse.

* guix/scripts/pack.scm (guix): Add commentary comment.
(populate-profile-root, self-contained-tarball/builder): Extract to...
* guix/build/pack.scm (populate-profile-root): ... this, and...
(build-self-contained-tarball): ... that, adjusting for use on the build side.
(assert-utf8-locale): New procedure.
(self-contained-tarball, debian-archive, rpm-archive): Adjust accordingly.

Reviewed-by: Ludovic Courtès <ludo@gnu.org>
2023-07-18 16:56:06 -04:00
Nicolas Goaziou ec97cf1569
guix: Let texlive importer handle linked scripts.
* guix/import/texlive.scm (tlpdb): Also retrieve so-called binfiles.
(formats):
(linked-scripts): New functions.
(tlpdb->package): Use new functions to set #:LINK-SCRIPTS argument and
possibly INPUTS.
* tests/texlive.scm (%fake-tlpdb): Add test data.
("texlive->guix-package, single script, no extension"):
("texlive->guix-package, multiple scripts, with extensions"):
("texlive->guix-package, script with associated input"):  New tests.
2023-07-18 18:15:05 +02:00
Nicolas Goaziou ecc1c3af11
guix: texlive importer: Set #:texlive-latex-bin? when appropriate.
* guix/import/texlive.scm (latex-bin-dependency-tree): New function.
(tlpdb->package): Set #:TEXLIVE-LATEX-BIN? when appropriate.
* tests/texlive.scm ("texlive->guix-package, lonely `hyphen-base' dependency
and ARCH"): Update test.
2023-07-18 18:15:03 +02:00
Nicolas Goaziou 0224a8f400
guix: texlive importer: Fix build system and arguments for meta-packages.
* guix/import/texlive.scm (tlpdb->package): Meta packages should use trivial
build system and an appropriate builder.
* tests/texlive.scm ("texlive->guix-package, meta-package"):
("texlive->guix-package, translate dependencies"): Update tests.
2023-07-18 18:12:55 +02:00