summaryrefslogtreecommitdiff
path: root/tests
AgeCommit message (Collapse)Author
2024-03-22Merge remote-tracking branch 'origin/master' into core-updatesJosselin Poiret
Change-Id: Id398a49a83cfe6f3a5ba0aee811d09ca12f897de
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-03-09Merge remote-tracking branch 'origin/master' into core-updatesJosselin Poiret
Change-Id: If336ce5529031f7d45dd78b173d897b4ca2d6ab0
2024-03-09utils: 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-03-09utils: 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-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-31Merge remote-tracking branch 'origin/master' into core-updatesMaxim Cournoyer
Resolved conflicts in: gnu/packages/astronomy.scm gnu/packages/axoloti.scm gnu/packages/games.scm gnu/packages/guile-xyz.scm gnu/packages/mail.scm gnu/packages/photo.scm gnu/packages/sphinx.scm gnu/packages/tls.scm gnu/packages/web-browsers.scm Change-Id: I726fb6139d70ccead1b0f59afc72ccc523a1217d
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-21import: go: Emit new-style package inputs.Sarah Morgensen
Since PACKAGE-NAMES->PACKAGE-INPUTS is used by both the go and crate importers, give the crate importer a copy of the original so it continues to use old-style inputs until it is updated. * guix/import/utils.scm (package-names->package-inputs)[make-input]: Return new-style package inputs. (maybe-inputs): Wrap PACKAGE-INPUTS in 'list' instead of 'quasiquote'. * guix/import/crate.scm (package-names->package-inputs): New variable. * tests/go.scm ("go-module->guix-package"): Adjust to new-style package inputs. Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
2024-01-21import: crate: Emit new-style package inputs.Sarah Morgensen
* guix/import/crate.scm (maybe-cargo-development-inputs) (maybe-cargo-inputs): Wrap PACKAGE-INPUTS in unquoted 'list'. * tests/crate.scm ("crate->guix-package") ("cargo-recursive-import") ("cargo-recursive-import-honors-existing-packages"): Adjust accordingly. Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com> Modified-by: Maxim Cournoyer <maxim.cournoyer@gmail.com> Change-Id: I4dfb745272ecbc893926446872514fb815c07236
2024-01-17Merge branch 'master' into core-updatesLudovic Courtès
Change-Id: Ide7e5cf1c651f193994c02305b6baa4bea4e165f
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
2024-01-07Merge branch 'master' into core-updatesLudovic Courtès
Change-Id: I150b4077fffca97c860439292a8d053579d64cb7
2023-12-19profiles: Use C.UTF-8 instead of ‘glibc-utf8-locales’ where possible.Ludovic Courtès
This is a followup to 1cebc334a77030c0c94955981652f4df7608c9e3. * guix/profiles.scm (ca-certificate-bundle)[libc-utf8-locales-for-target]: Remove. [build]: Use “C.UTF-8” instead of “en_US.utf8”. (profile-derivation)[libc-utf8-locales-for-target]: Remove. [set-utf8-locale]: Rewrite to a gexp that calls ‘setlocale’ for “C.UTF-8”. * tests/profiles.scm ("profile-derivation, cross-compilation"): Remove ‘locales’ variable and related check. Change-Id: I7cb148b9149fe5fbe5b9b1b25fdce1002ad1f37e
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-09Merge branch 'master' into core-updatesLudovic Courtès
Change-Id: Iea8f10db98256f1c6cfac8bfcc82e2d44695ef3d
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-10-18build-systems: gnu: Export %default-gnu-imported-modules and ↵Maxim Cournoyer
%default-gnu-modules. Until now users would have to cargo cult or inspect the private %default-modules variable of (guix build-systems gnu) to discover which modules to include when extending the used modules via the #:modules argument. The renaming was automated via the command: $ git grep -l %gnu-build-system-modules | xargs sed 's/%gnu-build-system-modules/%default-gnu-imported-modules/' -i * guix/build-system/gnu.scm (%gnu-build-system-modules): Rename to... (%default-gnu-imported-modules): ... this. (%default-modules): Rename to... (%default-gnu-modules): ... this. Export. (dist-package, gnu-build, gnu-cross-build): Adjust accordingly. Change-Id: Idef307fff13cb76f3182d782b26e1cd3a5c757ee
2023-10-09build: utils: Raise error in modify-phases upon missing key.Carlo Zancanaro
* guix/build/utils.scm (alist-cons-before) (alist-cons-after): Error with a match failure if the reference is not found, instead of appending to the alist. * tests/build-utils.scm: Update tests to match the new behavior. Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com> Change-Id: I3044b101bd06231d5cd55a544ac1009e6ce6f9a0
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-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-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’.
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-09-15tests: Fix "package-transitive-supported-systems, implicit inputs".Janneke Nieuwenhuizen
This is a follow-up to commit 0e08ad7f19d5b29a4883468552b5d213a7bdb66e 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-08lint: Check that (cc-for-target) and friends are used.Maxime Devos
"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-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-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>