summaryrefslogtreecommitdiff
path: root/tests
AgeCommit message (Collapse)Author
6 daystests: Skip ‘terminal-string-width’ test on encodings other than UTF-8.Ludovic Courtès
* tests/syscalls.scm ("terminal-string-width Japanese"): Skip when the encoding of (current-output-port) is not UTF-8. Reported-by: Ashvith Shetty <ashvithshetty10@gmail.com> Change-Id: Ic284dd088d6b148d6fcb457290a28fdb0838b83d
6 daystests: Remove interference from the user’s Git config.Ludovic Courtès
* tests/guix-download.sh: Set ‘GIT_CONFIG_GLOBAL’ and ‘GIT_CONFIG_SYSTEM’. Reported-by: Ashvith Shetty <ashvithshetty10@gmail.com> Change-Id: Ibe14d23db2e8af58b85c78248997c6dde78e11e0
2024-05-01git authenticate: Record introduction and keyring in ‘.git/config’.Ludovic Courtès
* guix/scripts/git/authenticate.scm (%default-options): Remove ‘keyring-reference’. (config-value, configured-introduction, configured-keyring-reference) (configured?, record-configuration, current-branch): New procedures. (guix-git-authenticate)[missing-arguments]: New procedure. Use ‘configured-introduction’ when zero arguments are given. Use ‘configured-keyring-reference’ when ‘-k’ is not passed. Add call to ‘record-configuration’. * doc/guix.texi (Invoking guix git authenticate): Document it. Change-Id: I66e111a83f50407b52da71662629947f83a78bbc
2024-04-15utils: Don’t re-export ‘call-with-temporary-output-file’.Ludovic Courtès
* guix/utils.scm: Remove re-export of ‘call-with-temporary-output-file’. Autoload a number of modules. * guix/download.scm, guix/import/hackage.scm, guix/import/hexpm.scm, guix/import/opam.scm, guix/import/pypi.scm, tests/cpio.scm, tests/egg.scm, tests/opam.scm, tests/publish.scm, tests/store-database.scm, tests/utils.scm: Adjust imports accordingly. Change-Id: I3f5e94631397996a30be2ea4ff8b50a3371e8ee7
2024-04-08gexp: Add #:guile parameter to ‘gexp->file’ and ‘scheme-file’.Ludovic Courtès
This brings ‘gexp->file’ in line with its documentation and mirrors what’s done for ‘gexp->script’ and ‘program-file’. Fixes <https://issues.guix.gnu.org/69401>. * guix/gexp.scm (gexp->file): Add #:guile, as was already documented. (<scheme-file>)[guile]: New field. (scheme-file): Add #:guile. (scheme-file-compiler): Honor ‘guile’ field. * tests/gexp.scm ("gexp->file") ("gexp->file + file-append", "gexp->file + #:splice?") ("gexp->file, cross-compilation") ("gexp->file, cross-compilation with default target") Add #:guile to ‘gexp->file’ calls. ("gexp-modules deletes duplicates") ("gexp->derivation & with-imported-module & computed module") ("gexp->derivation & with-extensions", "scheme-file"): Likewise for ‘scheme-file’ calls. Change-Id: I47536063d5e411e561ec321e535267e92dd06044 Reported-by: Efraim Flashner <efraim@flashner.co.il> Change-Id: I58d653c7fbe65c665bafcbd332ac9b264ddeab64
2024-04-03store: database: Rename a couple of procedures.Christopher Baines
These names should be more descriptive. * guix/store/database.scm (path-id): Rename to select-valid-path-id. (sqlite-register): Rename to register-valid-path. (register-items): Update accordingly. Change-Id: I6d4a14d4cde9d71ab34d6ffdbfbfde51b2c0e1db
2024-03-11time-machine: Allow time travels to v0.16.0.Ludovic Courtès
* guix/scripts/time-machine.scm (%oldest-possible-commit): Change to v0.16.0. * tests/guix-time-machine.sh: Adjust comment. Change-Id: I9ad82bd45fee0d172b5348a8ae16e990338a3a97
2024-03-09swh: ‘lookup-origin-revision’ handles branches pointing to directories.Ludovic Courtès
Fixes <https://issues.guix.gnu.org/69070>. * guix/swh.scm (branch-target): Add clause for 'directory and 'alias. (lookup-origin-revision): Iterate over all the visits of ORIGIN instead of just the first one. Handle the case where ‘branch-target’ returns something other than a release or revision. * tests/swh.scm ("lookup-origin-revision"): New test. Change-Id: I7f636739a719908763bca1d3e7376341dd62e816
2024-03-09lint: archival: Trigger “Save Code Now” for VCSes other than Git.Ludovic Courtès
Until now, ‘save-origin’ would be called only when given a <git-reference>. With this change, ‘save-origin’ gets called for other version control systems as well. * guix/lint.scm (swh-response->warning): New procedure, formerly in ‘check-archival’. (vcs-origin, save-package-source): New procedures. (check-archival)[response->warning]: Remove. Call ‘save-package-source’ in both the Git and the non-Git cases. * tests/lint.scm ("archival: missing svn revision"): New test. Change-Id: I535e4ec89488faf83bfa544d5e4935fa73ef54fb
2024-02-23utils: Add find-definition-insertion-location procedure.Herman Rimm
* guix/utils.scm (find-definition-insertion-location): Add and export procedure. * tests/utils.scm ("find-definition-insertion-location"): Add test. Change-Id: Ie17e1b4a94790f58518ce121411a38d357f49feb Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2024-02-23utils: Add insert-expression procedure.Herman Rimm
* guix/utils.scm (define-module): Use (guix read-print) and export (insert-expression). (insert-expression): Add procedure. * tests/utils.scm ("insert-expression"): Add test. Change-Id: I971a43a78aa6ecaaef33c1a7a0db4b287eb85036 Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2024-02-12lint: archival: Check with ‘lookup-directory-by-nar-hash’.Ludovic Courtès
While this method is new and nar-sha256 ExtIDs are currently available only for new visits, it is fundamentally more reliable than the other methods, which is why it comes first. * guix/lint.scm (check-archival)[lookup-by-nar-hash]: New procedure. Call ‘lookup-by-nar-hash’ before the other lookup methods. * tests/lint.scm ("archival: content available") ("archival: content unavailable but disarchive available") ("archival: missing revision") ("archival: revision available"): Add a 404 response corresponding to the ‘lookup-external-id’ request. * tests/lint.scm ("archival: nar-sha256 extid available"): New test. Change-Id: I4a81d6e022a3b72e6484726549d7fbae627f8e73
2024-02-12swh: Add bindings for the “ExtID” API.Ludovic Courtès
This interface was deployed at archive.softwareheritage.org a few days ago. Our main use case will be looking up directories by “nar-sha256” hashes. * guix/swh.scm (<external-id>): New JSON-mapped record type. (lookup-external-id, lookup-directory-by-nar-hash): New procedures. * tests/swh.scm (%external-id): New variable. ("lookup-directory-by-nar-hash"): New test. Change-Id: Ib671c7798aeb6f8132ac78f2b06b9285da8e7bd5
2024-01-31channels: ‘latest-channel-instances’ traverses user-provided channels first.Ludovic Courtès
Previously, ‘latest-channel-instances’ would perform a depth-first traversal of channels. Since dependencies specified in ‘.guix-channel’ are usually less specific that those provided by the user, this would lead to the use of instances corresponding to those less specific specs, which in turn might declare dependencies that do not exist for the more specific instances. This commit changes ‘latest-channel-instances’ to perform a breadth-first traversal, thereby giving user-supplied channels higher precedence over dependencies found via ‘.guix-channel’. Fixes <https://issues.guix.gnu.org/68822>. * guix/channels.scm (latest-channel-instances)[ignore?]: Remove. [instance-name, same-named?, more-specific?]: New procedures. Rewrite as a breadth-first traversal using a regular loop. * tests/channels.scm ("latest-channel-instances reads dependencies from most-specific instance"): New test. Change-Id: Iba518145cfd209f04293a56246dbfee3b714650b
2024-01-31channels: Tweak test.Ludovic Courtès
* tests/channels.scm ("latest-channel-instances excludes duplicate channel dependencies"): Use ‘equal?’ rather than ‘string=?’ since we can get #f. Change-Id: I437b9d7e23200cf0c98b1593e68b1d355bc2de01
2024-01-22guix: download: Add support for git repositories.Romain GARBAGE
* guix/scripts/download.scm (git-download-to-store*): Add new variable. (copy-recursively-without-dot-git): New variable. (git-download-to-file): Add new variable. (show-help): Add 'git', 'commit', 'branch' and 'recursive'options help message. (%default-options): Add default value for 'git-reference' and 'recursive' options. (%options): Add 'git', 'commit', 'branch' and 'recursive' command line options. (guix-download) [hash]: Compute hash with 'file-hash*' instead of 'port-hash' from (gcrypt hash) module. This allows us to compute hashes for directories. * doc/guix.texi (Invoking guix-download): Add @item entries for `git', `commit', `branch' and `recursive' options. Add a paragraph in the introduction. * tests/guix-download.sh: New tests. Move variables and trap definition to the top of the file. Change-Id: Ic2c428dca4cfcb0d4714ed361a4c46609339140a Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com> Reviewed-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
2024-01-09guix: import: Optionally import necessary yanked crates.David Elsing
* doc/guix.texi (Invoking guix import): Mention '--allow-yanked'. * guix/import/crate.scm (make-crate-sexp): Add yanked? argument. For yanked packages, use the full version suffixed by "-yanked" for generated variable names and add a comment and package property. (crate->guix-package): Add allow-yanked? argument and if it is set to #t, allow importing yanked crates if no other version matching the requirements exists. [find-package-version]: Packages previously marked as yanked are only included if allow-yanked? is #t and then take the lowest priority. [find-crate-version]: If allow-yanked? is #t, also consider yanked versions with the lowest priority. [dependency-name+version]: Rename to ... [dependency-name+version+yanked] ...this. Honor allow-yanked? and choose between an existing package and an upstream package. Exit with an error message if no version fulfilling the requirement is found. [version*]: Exit with an error message if the crate version is not found. (cargo-recursive-import): Add allow-yanked? argument. * guix/read-print.scm: Export <comment>. * guix/scripts/import/crate.scm: Add "--allow-yanked". * tests/crate.scm: Add test 'crate-recursive-import-only-yanked-available'. [sort-map-dependencies]: Adjust accordingly. [remove-yanked-info]: New variable. Adjust test 'crate-recursive-import-honors-existing-packages'. (test-bar-dependencies): Add yanked dev-dependencies. (test-leaf-bob-crate): Add yanked versions. (rust-leaf-bob-3.0.2-yanked): New variable. Signed-off-by: Efraim Flashner <efraim@flashner.co.il> Change-Id: I175d89b39774e6b57dcd1f05bf68718d23866bb7
2024-01-09tests: Mock find-packages-by-name in crate importer test.David Elsing
* tests/crate.scm: Import only sha256 from (gcrypt hash) as gcrypt-sha256 to prevent a name collision. Rename test 'cargo-recursive-import' to 'crate-recursive-import' and 'cargo-recursive-import-hoors-existing-packages' to 'crate-recursive-import-honors-existing-packages'. Mock find-packages-by-name from (gnu packages). Adjust test to import fake 'bar' crate instead of doctool. (test-bar-crate): New variable. (test-bar-dependencies): New variable. (test-root-crate): Adjust sha256 -> gcrypt-sha256. (test-doctool-crate,test-doctool-dependencies): Remove variables. (rust-leaf-bob-3): New variable. Signed-off-by: Efraim Flashner <efraim@flashner.co.il>
2024-01-09import: crate: Optionally import dev-dependencies recursively.David Elsing
If --recursive-dev-dependencies is specified, development dependencies are also included for all recursively imported packages. * doc/guix.texi (Invoking guix import): Mention --recursive-dev-dependencies. * guix/import/crate.scm (crate-recursive-import): Add recursive-dev-dependencies? argument. * guix/scripts/import/crate.scm (show-help, guix-import-crate): Add "--recursive-dev-dependencies". * tests/crate.scm: Test both #f and #t for #:recursive-dev-dependencies? in the 'cargo-recursive-import' test. (test-root-dependencies): Add intermediate-c as dev-dependency. (test-intermediate-c-crate, test-intermediate-c-dependencies): New variables. Signed-off-by: Efraim Flashner <efraim@flashner.co.il> Change-Id: Iae89794681155d77f128733120e60f03bc297717
2024-01-08guix: pack: Build layered images.Oleg Pykhalov
* guix/scripts/pack.scm (docker-image, guix-pack, %default-options, %docker-format-options, show-docker-format-options/detailed): Handle '--max-layers' option. * doc/guix.texi (Invoking guix pack): Document this. Change-Id: I90660b2421fcdde891f003469fe2e2edaac7da41
2023-12-22gexp: #:references-graphs accepts and honors <gexp-input> records.Ludovic Courtès
* guix/gexp.scm (lower-reference-graphs)[tuple->gexp-input]: Add ‘gexp-input?’ case. (gexp->derivation): Update docstring. * doc/guix.texi (G-Expressions): Adjust accordingly. * tests/gexp.scm ("references-file, non-default output"): New test. Reviewed-by: Maxim Cournoyer <maxim.cournoyer@gmail.com> Change-Id: I595cb75da0867ab8ab44552887dc06ed1d23315e
2023-12-22gexp: Add compiler for <gexp-input>.Ludovic Courtès
* guix/gexp.scm (gexp-input-compiler): New procedure. * tests/gexp.scm ("gexp references non-existent output") ("gexp-input, as first-class input"): New tests. * doc/guix.texi (G-Expressions): Document it. Reviewed-by: Maxim Cournoyer <maxim.cournoyer@gmail.com> Change-Id: I95b58d6e4d77a54364026b4324fbb00125a9402e
2023-12-18guix: import: Add composer importer.Nicolas Graves
* guix/import/composer.scm: New file. * guix/scripts/import/composer.scm: New file. * guix/tests/composer.scm: New file. * Makefile.am: Add them. * guix/scripts/import.scm: Add composer importer. * doc/guix.texi (Invoking guix import): Mention it. Change-Id: I44a89b8cc80ef5b4a3cd15e8fbba4a18c1cea0b1 Co-authored-by: Julien Lepiller <julien@lepiller.eu> Co-authored-by: Ludovic Courtès <ludo@gnu.org>
2023-12-16guix: import: Report go version for go importer.Efraim Flashner
* guix/import/go.scm (go-package, go.mod-go-version): New procedures. (go-module->guix-package): Add the #:go keyword in the generated package definition if the required go is newer than the default go. * tests/go.scm (mock-http-get): Use gexps for package arguments. Change-Id: I8d005740a442330ac307a40a53764c803ceffc4f
2023-12-11daemon: Implement ‘substitute-urls’ RPC.Ludovic Courtès
* 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-11guix: Add target-avr?.Jean-Pierre De Jesus DIAZ
* 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-06shell: ‘--development’ honors ‘--system’.Ludovic Courtès
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-04substitute: Do not exit when failing to find a nar.Ludovic Courtès
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-03guix: import: Fix parsing Cabal files that import many stanzasSaku Laesvuori
* 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-03guix: import: Parse cabal layout blocks correctlySaku Laesvuori
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-02gnu: Use ‘libc-utf8-locales-for-target’.Janneke Nieuwenhuizen
* 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-11-25tests: Import (guix build syscalls) when (guix build store-copy) is used.Ludovic Courtès
Fixes a test failure introduced in 189525412e3d803f3f77e15ec4a62aaa57f65a2d. * 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-25tests: Use ‘test-equal’ for ‘terminal-string-width’ tests.Ludovic Courtès
* tests/syscalls.scm ("terminal-string-width English") ("terminal-string-width Japanese"): Use ‘test-equal’. Change-Id: I3791b2e4c9e35735db6c6da995da8ef0f9a71804
2023-11-22read-print: Properly indent ‘parameterize’.Ludovic Courtès
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-15locate: Accept ‘--clear’ without additional arguments.Ludovic Courtès
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-11guix: syscalls: Add terminal-string-width.Julien Lepiller
* guix/build/syscalls.scm (terminal-width): New procedure. * tests/syscalls.scm: Add tests. Change-Id: I6c2caa9fbaffb1e8f4b8933103399be970d5a8f3
2023-11-05tests: Make ‘guix time-machine’ test effective.Ludovic Courtès
The test as added in 79ec651a286c71a3d4c72be33a1f80e76a560031 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-10-28tests: Adjust to cope with glibc graft.Ludovic Courtès
This is a followup to 1328c4cca531318e3ed90c6aecb522a5b22a4bcc, 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-28profiles: Hooks honor the #:system parameter of ‘profile-derivation’.Ludovic Courtès
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-28grafts: Fix corner case involving multiple-output derivations.Ludovic Courtès
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-22guix: import: Don't import yanked rust crates.Efraim Flashner
* 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-21tests: Verify plasma.tmpl at x86_64-linux.Zheng Junjie
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-20tests: Avoid three-argument ‘test-assertm’.Ludovic Courtès
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-07services: configuration: Use transducers within serialize-configuration.Bruno Victal
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-09-24tests: read-print: Update expectations.Tobias Geerinckx-Rice
This follows up on commit 974b04ab8063382f3a91b0cf5e46bac6e0238672, which I tested with the wrong test (tests/style.scm) instead. Oops. * tests/read-print.scm: Update two TEST-PRETTY-PRINT strings.
2023-09-27tests: ‘rewrite-url’ test no longer depends on network access.Ludovic Courtès
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-26tests: Assume ‘git’ is always available.Ludovic Courtès
* 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-26git-download: Use “builtin:git-download” when available.Ludovic Courtès
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-26daemon: Add “git-download” built-in builder.Ludovic Courtès
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-26tests: Adjust ‘guix graph --path’ test to latest Emacs changes.Ludovic Courtès
This is a followup to 3349a50d700a2112a31ac4ce6cc6639d3b4cf1e2. * tests/guix-graph.sh: Adjust ‘path’.