summaryrefslogtreecommitdiff
path: root/guix
Commit message (Collapse)AuthorAge
* syscalls: Gracefully handle failure to load libc's libutil.Ludovic Courtès2021-10-26
| | | | | | | | | | | | In particular, libutil is not found when running code on a statically-linked Guile. Reported by mahmooz on #guix. * guix/build/syscalls.scm (syscall->procedure): Add #:library parameter and honor it. (openpty, login-tty): Use 'syscall->procedure' instead of calling 'dynamic-link' directly.
* shell: Suggest running '--check' once for interactive use.Ludovic Courtès2021-10-26
| | | | | | * guix/scripts/shell.scm (hint-directory, hint-file, record-hint) (hint-given?): New procedures. (guix-shell): Record and probe the 'shell-check' hint.
* environment: Add '--check'.Ludovic Courtès2021-10-26
| | | | | | | | | | | | * guix/scripts/environment.scm (show-environment-options-help) (%options): Add '--check'. * guix/scripts/environment.scm (child-shell-environment) (validate-child-shell-environment): New procedures. (guix-environment*): Call 'validate-child-shell-environment' when 'check?' key is in OPTS. * doc/guix.texi (Invoking guix shell): Shorten footnote about Bash startup files. Document '--check' and mention startup files. (Invoking guix environment): Document '--check'.
* syscalls: Add 'openpty' and 'login-tty'.Ludovic Courtès2021-10-26
| | | | | * guix/build/syscalls.scm (openpty, login-pty): New procedures. * tests/syscalls.scm ("openpty", "openpty + login-tty"): New tests.
* packages: Optimize 'package-transitive-supported-systems'.Ludovic Courtès2021-10-26
| | | | | | | | | | | | | With this change, the wall-clock time of: ./pre-inst-env guile -c '(use-modules (gnu) (guix)(ice-9 time)) (time (pk (fold-packages (lambda (p r)(supported-package? p)(+ 1 r)) 0)))' goes from 3.2s to 2.0s, a 37% improvement. * guix/packages.scm (package-transitive-supported-systems): Change 'supported-systems' to 'supported-systems-procedure', returning an 'mlambdaq' instead of the original 'mlambda'. Add 'procs'. Adjust body accordingly.
* shell: Maintain a profile cache.Ludovic Courtès2021-10-25
| | | | | | | | | | | | | | | | | | | | | | | shell: Maintain a profile cache. With this change, running "guix shell" (no arguments) is equivalent to: guix environment -r ~/.cache/guix/profiles/some-root -l guix.scm This is the cache miss. On cache hit, it's equivalent to: guix environment -p ~/.cache/guix/profiles/some-root ... which can run in 0.1s. * guix/scripts/shell.scm (options-with-caching): New procedure. (parse-args): Use it. (%profile-cache-directory): New variable. (profile-cache-key, profile-cached-gc-root): New procedures. (show-help, %options): Add '--rebuild-cache'. (guix-shell)[cache-entries, entry-expiration]: New procedures. Add call to 'maybe-remove-expired-cache-entries'. * doc/guix.texi (Invoking guix shell): Document '--rebuild-cache'.
* cache: Gracefully handle non-existent cache.Ludovic Courtès2021-10-25
| | | | | * guix/cache.scm (maybe-remove-expired-cache-entries): Ignore ENOENT when writing EXPIRY-FILE.
* environment: Autoload some modules.Ludovic Courtès2021-10-25
| | | | | | This further speeds up the 'guix environment -p PROFILE' case. * guix/scripts/environment.scm: Autoload a bunch of modules.
* environment: Do not connect to the daemon when '--profile' is used.Ludovic Courtès2021-10-25
| | | | | | | | | This further speeds up the 'guix environment -p PROFILE' case. * guix/scripts/environment.scm (guix-environment*)[store-needed?]: New variable. [with-store/maybe]: New macro. Use it instead of 'with-store', and remove 'with-build-handler' form.
* environment: Skip derivation computation when '--profile' is used.Ludovic Courtès2021-10-25
| | | | | | * guix/scripts/environment.scm (guix-environment*): Bypass calls to 'package-derivation' and to 'manifest->derivation' when PROFILE is true.
* shell: By default load the local 'manifest.scm' or 'guix.scm' file.Ludovic Courtès2021-10-25
| | | | | | | | * guix/scripts/shell.scm (parse-args): Add call to 'auto-detect-manifest'. (authorized-directory-file, authorized-shell-directory?) (find-file-in-parent-directories, auto-detect-manifest): New procedures. * tests/guix-shell.sh: Add test. * doc/guix.texi (Invoking guix shell): Document it.
* Add 'guix shell'.Ludovic Courtès2021-10-25
| | | | | | | | | | | | | | | | | | | | | | | * guix/scripts/shell.scm, tests/guix-shell.sh: New files. * Makefile.am (MODULES): Add 'shell.scm'. (SH_TESTS): Add 'tests/guix-shell.sh'. * guix/scripts/environment.scm (show-environment-options-help): New procedure. (show-help): Use it. (guix-environment*): New procedure. (guix-environment): Use it. * po/guix/POTFILES.in: Add it. * doc/guix.texi (Features): Refer to "guix shell" (Invoking guix package): Likewise. (Development): Likewise. (Invoking guix shell): New node. (Invoking guix environment): Add deprecation warning. (Debugging Build Failures): Use 'guix shell' in examples. (Invoking guix container): Refer to 'guix shell'. (Invoking guix processes, Virtualization Services): Adjust examples to use 'guix shell'. * doc/contributing.texi (Building from Git): Refer to 'guix shell'. * etc/completion/bash/guix: Handle "shell".
* profiles: Add 'package->development-manifest'.Ludovic Courtès2021-10-25
| | | | | | | | | * guix/profiles.scm (package->development-manifest): New procedure. * guix/scripts/environment.scm (input->manifest-entry) (package-environment-inputs): Remove. * guix/scripts/environment.scm (options/resolve-packages): Use 'package->development-manifest' instead of 'package-environment-inputs'. * tests/profiles.scm ("package->development-manifest"): New test.
* packages: Add 'package-development-inputs'.Ludovic Courtès2021-10-25
| | | | | | | | * guix/packages.scm (package-development-inputs): New procedure. * guix/scripts/environment.scm (package-environment-inputs): Use it. * tests/packages.scm ("package-development-inputs") ("package-development-inputs, cross-compilation"): New tests. * doc/guix.texi (package Reference): Document it.
* lint: Add description check for common typos.Vagrant Cascadian2021-10-24
| | | | | | | | | Fixes: https://issues.guix.gnu.org/44675 * guix/lint.scm (check-description-typo): Add check for occurences of "This packages", "This modules", "allows to" and "permits to" in package descriptions. * tests/lint.scm: Add tests for "This packages" and "allows to".
* guix: packages: Add comment on license field.jgart via Guix-patches via2021-10-22
| | | | | | | * guix/packages/packages.scm (<package>): Add comment about the type that the license field expects as part of a package record. Signed-off-by: Tobias Geerinckx-Rice <me@tobias.gr>
* build-system/go: Fix building on host's secondary architecture.Efraim Flashner2021-10-18
| | | | | | | | | | | Before when building for i686-linux on x86_64-linux GOARCH would be set to amd64, not 386. * guix/build-system/go.scm (go-build): Set goarch and goos to #f when not cross-compiling. * guix/build/go-build-system.scm (setup-go-environment): Set GOARCH according to the calculated goarch or using GOHOSTARCH and GOOS according to the calculated goos or using GOHOSTOS.
* maint: Factorize po xref translation.Julien Lepiller2021-10-17
| | | | | | | | | | | | | This ensures we use the same method in "make" as in "guix/self.scm". * Makefile.am: Build guix/build/po.scm. * build-aux/convert-xref.scm: New file. * doc/local.mk (xref_command): Use it. * guix/self.scm (translate-cross-references): Move it... * guix/build/po.scm: Parse comments and flags separately to find fuzzy flags. (translate-cross-references): ...here. (parse-tree->assoc): Ignore fuzzy entries.
* build-system/minetest: Install config.txt and _config.txt.Vivien Kraus2021-10-16
| | | | | | | * guix/build/minetest-build-system.scm (mod-install-plan): Add "config.txt" and "_config.txt" to the list of installed files. Signed-off-by: Tobias Geerinckx-Rice <me@tobias.gr>
* build-system/minetest: Gather whole failing test output.Vivien Kraus2021-10-16
| | | | | | | * guix/build/minetest-build-system.scm (check): Gather the whole output when a test fails. Signed-off-by: Tobias Geerinckx-Rice <me@tobias.gr>
* refresh: Report suggested input changes with 'info'.Ludovic Courtès2021-10-15
| | | | | | * guix/scripts/refresh.scm (update-package): Define 'field', 'name', 'loc', and 'change-name'. Use 'info' rather than 'format' to report suggested input changes.
* import: pypi: Remove leftover 'pk' call.Ludovic Courtès2021-10-15
| | | | | | | This is a followup to 7b75f90c5b0da896c486cae23d19d43e2a03bb56. * guix/import/pypi.scm (make-pypi-sexp)[maybe-upstream-name]: Remove leftover 'pk' call.
* import: pypi: Support 'input-changes'.Xinglu Chen2021-10-15
| | | | | | * guix/import/pypi.scm (latest-release): Specify the ‘input-changes’ field. Co-authored-by: Ludovic Courtès <ludo@gnu.org>
* swh: Allows token from Software Heritage authentication service.zimoun2021-10-15
| | | | | | | | | The token is provided using the environment variable GUIX_SWH_TOKEN. * guix/swh.scm (%swh-token): New variable. (call): Use it. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* download: "GUIX_DOWNLOAD_FALLBACK_TEST=none" disables fallback mechanisms.Ludovic Courtès2021-10-15
| | | | | * guix/download.scm (url-fetch*): Handle (%download-fallback-test) set to 'none.
* lint: archival: Remove extra newline in warning.Ludovic Courtès2021-10-15
| | | | * guix/lint.scm (check-archival): Remove extra newline in message.
* download: Print URL of the Disarchive spec being read.Ludovic Courtès2021-10-14
| | | | | * guix/build/download.scm (disarchive-fetch/any): Show URI of the Disarchive spec.
* download: Add parameter to test download fallback mechanisms.Ludovic Courtès2021-10-14
| | | | | | | | | | | | | | | | This allows you to run, say: GUIX_DOWNLOAD_FALLBACK_TEST=disarchive-mirrors guix build -S r-ebimage --check or: GUIX_DOWNLOAD_FALLBACK_TEST=content-addressed-mirrors ./pre-inst-env guix build -S r-ebimage --check to check whether these fallback mechanisms work as expected. * guix/download.scm (%no-mirrors-file, %no-disarchive-mirrors-file) (%download-fallback-test): New variables. (url-fetch*): Honor (%download-fallback-test).
* download: Add missing autoload.Ludovic Courtès2021-10-14
| | | | | | | This is a followup to 6d02a994f911a75e3a223a22c05c2939cdfed2b5, which left '%verify-swh-certificate?' unbound. * guix/build/download.scm: Autoload for '%verify-swh-certificate'.
* download: Add disarchive.guix.gnu.org.Ludovic Courtès2021-10-14
| | | | * guix/download.scm (%disarchive-mirrors): Add disarchive.guix.gnu.org.
* self: Move core (guix script ...) modules to a separate derivation.Ludovic Courtès2021-10-13
| | | | | | | | | This adds an opportunity for parallelism and reduces the amount of rebuild needed when "secondary" modules are modified. * guix/self.scm (compiled-guix)[*core-cli-modules*]: New variable. [*cli-modules*]: Depend on it. [built-modules]: Likewise.
* gnu: Add platform support.Mathieu Othacehe2021-10-11
| | | | | | | | | * gnu/platform.scm: New file. * gnu/platforms/arm.scm: Ditto. * gnu/platforms/hurd.scm: Ditto. * gnu/local.mk (GNU_SYSTEM_MODULES): Add them. Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
* home: services: configuration: Support file-like objects.Oleg Pykhalov2021-10-09
| | | | | | | | | | | | | | | | | * gnu/home/services/configuration.scm (interpose): Operate only with file-like objects. (string-or-gexp?): Delete procedure. (serialize-string-or-gexp): Rename to 'serialize-file-like'. (text-config?): Call 'file-like' intead of 'string-or-gexp?'. * guix/scripts/home/import.scm: (generate-bash-module+configuration): Don't call slurp-file-gexp. * gnu/home/services/configuration.scm: Move content ... * gnu/services/configuration.scm: here. * gnu/home/services/shells.scm: Delete (gnu home services configuration). * gnu/home/services/xdg.scm: Same. * gnu/local.mk: Same. * tests/guix-home.sh: Test home-bash-service-type and extension with home-bash-extension.
* scripts: home: Make sure profile directory exists.Oleg Pykhalov2021-10-09
| | | | * guix/scripts/home.scm (process-action): Make sure profile directory exists.
* Move (gnu home-services) to (gnu home services).Oleg Pykhalov2021-10-09
| | | | | | | | | | | | | | | | | | | * gnu/home-services.scm (%guix-home-root-directory): Replace gnu/home-services.scm with "gnu/home/services.scm". Rename to gnu/home/services.scm. * gnu/local.mk (GNU_SYSTEM_MODULES): Rename gnu/home-services.scm to gnu/home/services.scm. * doc/he-config-bare-bones.scm: Replace (gnu home-services) with (gnu home services). * gnu/home.scm: Same. * gnu/home/services/fontutils.scm: Same. * gnu/home/services/mcron.scm: Same. * gnu/home/services/shells.scm: Same. * gnu/home/services/shepherd.scm: Same. * gnu/home/services/symlink-manager.scm: Same. * gnu/home/services/xdg.scm: Same. * guix/scripts/home.scm: Same. * guix/self.scm: Same.
* Revert the #51061 patch series for now.Tobias Geerinckx-Rice2021-10-08
| | | | | | | This reverts commits f63c79bf7674df012517f8e9148f94c611e35f32 ..f86f7e24b39928247729020df0134e2e1c4cde62 for more chillax reviewing. See <https://issues.guix.gnu.org/51061#32>.
* guix: self: Fix home modules in compiled-guix.Oleg Pykhalov2021-10-08
| | | | | | This commit follows ba8ddb348045f81f061a1c7f51c0f7c2b0024e71. * guix/self.scm (compiled-guix): Update home modules location.
* gnu: Move (gnu home-services) to (gnu home services).Oleg Pykhalov2021-10-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * gnu/home-services/configuration.scm: Move the content ... * gnu/home/services/configuration.scm: ... here. * doc/guix.texi: Replace (gnu home-services mcron) with (gnu home services mcron). Replace (gnu home-services) with (gnu home services). * gnu/home.scm: Replace (gnu home-services fontutils) with (gnu services fontutils). Replace (gnu home-services shells) with (gnu home services shells). Replace (gnu home-services symlink-manager) with (gnu home services symlink-manager). Replace (gnu home-services xdg) with (gnu home services xdg). * gnu/home-services/fontutils.scm: Rename to gnu/services/fontutils.scm. * gnu/home-services/mcron.scm: Move to gnu/home/services/mcron.scm. Replace (gnu home-services shepherd) with (gnu home services shepherd). * gnu/home-services.scm (%service-type-path): Search home services in "gnu/services". * gnu/home-services/shells.scm: Replace (gnu home-services configuration) with (gnu home services configuration). Rename to gnu/home/services/shells.scm. Replace (gnu home-services utils) with (gnu home services utils). * gnu/home-services/shepherd.scm: Move to gnu/home/services/shepherd.scm. * gnu/home-services/symlink-manager.scm: Rename to gnu/home/services/symlink-manager.scm. * gnu/home-services/utils.scm: Rename to gnu/home/services/utils.scm. * gnu/home-services/xdg.scm: Rename to gnu/home/services/xdg.scm. * guix/scripts/home/import.scm: Replace (gnu home-services bash) with (gnu home services bash). * gnu/home-services.scm: Update documentation string. * doc/he-config-bare-bones.scm: Apply new (gnu home-services ...) modules location. * gnu/local.mk (GNU_SYSTEM_MODULES): Same.
* build-system/haskell: Explain failure.Lars-Dominik Braun2021-10-08
| | | | | | | Provide human-readable failure message and explain how to fix it. * guix/build/haskell-build-system.scm (register): Raise error if source file does not exist.
* import: hackage: Support mirror:// URLsLars-Dominik Braun2021-10-08
| | | | | | * guix/import/hackage.scm (guix-package->hackage-name): Support mirror://-style URI’s. (hackage-package?): Ditto.
* build-system/haskell: Accept line breaks in config files.Lars-Dominik Braun2021-10-08
| | | | | | | | Long id’s will break to the next line. * guix/build/haskell-build-system.scm (grep): Remove. (register): Modify regular expression to account for newlines between key and value, fail if package id is empty.
* build-system/haskell: Do not rely on compiler name.Lars-Dominik Braun2021-10-08
| | | | | | | | | | We’ve been relying on the compiler name matching its package subdir. Since we effectively only support GHC we can hard-code this and avoid issues with “ghc-next”. * guix/build/haskell-build-system.scm (make-ghc-package-database): Use GHC_PACKAGE_PATH. (register): Hard-code ghc prefix.
* import: stackage: Support input changes.Lars-Dominik Braun2021-10-08
| | | | | * guix/import/stackage.scm (latest-lts-release): Rename package to pkg to avoid name conflict and add input-changes.
* import: hackage: Update GHC’s standard libraries.Lars-Dominik Braun2021-10-08
| | | | | * guix/import/hackage.scm (ghc-standard-libraries): Add exceptions library.
* import: stackage: Update %default-lts-version to 18.10.Lars-Dominik Braun2021-10-08
| | | | * guix/import/stackage.scm (%default-lts-version): Update to 18.10.
* guix: haskell-build-system: Always pass -package-db option.John Kehayias2021-10-08
| | | | | | * guix/build/haskell-build-system.scm (run-setuphs): Pass -package-db option. Signed-off-by: Ricardo Wurmus <rekado@elephly.net>
* build-system: Add 'rebar3-build-system'.Hartmut Goebel2021-10-07
| | | | | * guix/build-system/rebar3.scm, guix/build/rebar3-build-system.scm: New files. * Makefile.am (MODULES): Add them.
* import: Add hex.pm importer.Hartmut Goebel2021-10-07
| | | | | | | | | | | | | hex.pm is a package repository for Erlang and Elixir. * guix/scripts/import.scm (importers): Add "hexpm". * guix/scripts/import/hexpm.scm, guix/import/hexpm.scm, guix/hexpm-download.scm: New files. * guix/import/utils.scm (source-spec->object): Add "hexpm-fetch" to list of fetch methods. * guix/upstream.scm (package-update/hexpm-fetch): New function. (%method-updates) Add it. * Makefile.am: Add them.
* Add (guix extracting-download).Hartmut Goebel2021-10-07
| | | | | * guix/extracting-download.scm: New file * Makefile.am (MODULES): Add it.
* import: crate: Gracefully handle missing license info.Ludovic Courtès2021-10-07
| | | | | | | | Fixes <https://issues.guix.gnu.org/51048>. Reported by Michael Zappa <me@michzappa.com>. * guix/import/crate.scm (<crate-version>)[license]: Translate 'null to #f. (make-crate-sexp): Handle LICENSE = #f.