summaryrefslogtreecommitdiff
path: root/guix
AgeCommit message (Collapse)Author
2019-02-04daemon: Rename 'NIX_STATE_DIR' and 'NIX_DB_DIR' environment variables.Ludovic Courtès
Fixes <https://bugs.gnu.org/22459>. Reported by Jeff Mickey <j@codemac.net>. * guix/config.scm.in (%state-directory): Change NIX_STATE_DIR to GUIX_STATE_DIRECTORY. (%store-database-directory): Change NIX_DB_DIR to GUIX_DATABASE_DIRECTORY. * nix/libstore/globals.cc (Settings::processEnvironment): Likewise. * guix/self.scm (make-config.scm): Likewise. * build-aux/build-self.scm (make-config.scm): Likewise. * build-aux/test-env.in: Likewise. * tests/derivations.scm ("derivation #:leaked-env-vars"): Likewise. * tests/guix-build.sh (GUIX_DAEMON_SOCKET): Likewise. * tests/guix-daemon.sh (socket): Likewise.
2019-02-01profiles: 'manual-database' hook reports progress.Ludovic Courtès
* guix/profiles.scm (manual-database)[build](compute-entries): Write a progress report.
2019-02-01guix package: '-A' no longer lists deprecated packages.Ludovic Courtès
Fixes a regression introduced in 0ea939fb796fdd4f0d46d3534b2ec6135e0f3dc7. * guix/scripts/package.scm (process-query) <'list-available>: Change #:superseded? to #:deprecated? since that's what 'fold-available-packages' passes.
2019-01-29pull: Default to verbosity level 1.Ludovic Courtès
* guix/scripts/pull.scm (%default-options): Change 'verbosity to 1.
2019-01-29self: Produce progress reports compatible with (guix status).Ludovic Courtès
* guix/self.scm (compiled-modules)[build](report-load) (report-compilation): Write "[M/N]" progress reports. Use line-buffering.
2019-01-29status: Print a progress bar for on-going builds when possible.Ludovic Courtès
* guix/status.scm (print-build-event)[report-build-progress]: New procedure. [print-log-line]: Add ID parameter. Call 'report-build-progress' when appropriate. Adjust callers.
2019-01-29status: Keep track of build completion as reported by build tools.Ludovic Courtès
* guix/status.scm (<build>)[completion]: New field. (build): Add #:completion parameter. (%percentage-line-rx, %fraction-line-rx): New variables. (update-build): New procedure. (compute-status): Add 'build-log' case. * tests/status.scm ("compute-status, build completion"): New test.
2019-01-29status: Record more information about builds.Ludovic Courtès
* guix/status.scm (<build>): New record type. (build, matching-build): New procedures. (compute-status): Adjust to manipulate <build> records instead of derivation file names in 'build-status-builds-completed' and 'build-status-building'. (build-event-output-port)[process-line]: Use 'string-split' to preserve spaces. * tests/status.scm ("compute-status, builds + substitutes") ("compute-status, missing events"): Adjust to expect <build> records. Produce complete "build-started" events. ("compute-status, multiplexed build output"): Likewise, and remove "bar.drv" from 'builds-completed'.
2019-01-29channels: Do not offload package cache derivation.Ludovic Courtès
* guix/channels.scm (package-cache-file): Pass #:local-build? to 'gexp->derivation-in-inferior'.
2019-01-28pull: Don't trigger 'hash guix' hint needlessly.Ludovic Courtès
Previously if ~/.config/guix/current/bin was in $PATH, we'd still suggest to run 'hash guix' because we'd compare (which "guix") against /var/guix/profiles/per-user/…. * guix/scripts/pull.scm (build-and-install): Check whether (which "guix") matches PROFILE or its user-friendly variant.
2019-01-28channels: Turn off deprecation warnings when loading 'build-self.scm'.Ludovic Courtès
* guix/channels.scm (build-from-source): Parameterize DEPRECATION-WARNING-PORT when loading SCRIPT.
2019-01-28packages: 'package-input-rewriting' can take a promise.Ludovic Courtès
* guix/packages.scm (package-input-rewriting): Allow REPLACEMENTS to be a promise. * gnu/packages/guile.scm (package-for-guile-2.0): Delay the first argument to 'package-input-rewriting'.
2019-01-25weather: Add '--coverage'.Ludovic Courtès
* guix/scripts/weather.scm (show-help, %options): Add '--coverage'. (package-partition-boundary, package->output-mapping) (substitute-oracle, report-package-coverage-per-system) (report-package-coverage): New procedures. (guix-weather): Honor '--coverage'. * doc/guix.texi (Invoking guix weather): Document it.
2019-01-25refresh: Better account for private and generated packages.Ludovic Courtès
Until now, private and generated packages (e.g., those created by 'texlive-union') we missing from the list passed to 'node-back-edges', which would lead to inaccurate dependent counts. Previously we'd get: $ guix refresh -l texlive-fonts-cm Building the following 80 packages would ensure 116 dependent packages are rebuilt: … Now we have: $ Building the following 240 packages would ensure 597 dependent packages are rebuilt: … * guix/scripts/refresh.scm (list-dependents): Call 'package-closure'.
2019-01-25refresh: Fix format string that would lead '-l' to print incorrect numbers.Ludovic Courtès
The skip "~*" argument was misplaced, leading the number of dependents to be skipped (instead of the number of covering packages.) Thus, we'd get: $ guix refresh -l ocaml4.02-ppx-deriving@4.1 Building the following package would ensure 1 dependent packages are rebuilt: bap@1.3.0 instead of: Building the following package would ensure 26 dependent packages are rebuilt: bap@1.3.0 * guix/scripts/refresh.scm (list-dependents): Move "~*" in the right place, to skip (length covering) rather than (length dependents).
2019-01-25weather: Ignore deprecated packages but not hidden packages.Ludovic Courtès
* guix/scripts/weather.scm (all-packages): Pass #:select? to 'fold-packages'.
2019-01-25packages: Add 'package-closure'.Ludovic Courtès
* guix/packages.scm (package-closure): New procedure. * tests/packages.scm ("package-closure"): New test.
2019-01-24records: Make 'report-duplicate-field-specifier' available at expansion-time.Ludovic Courtès
Fixes a regression in 'guix pack -R' introduced with commit c2dcff41c2e47f5f978f467864d5ed7829939884. The imported modules of 'c-compiler' would be compiled in this order: first (guix records), then (guix search-paths). Consequently, 'report-duplicate-field-specifier' would be reported as unbound while compiling (guix search-paths), leading to a build failure. * guix/records.scm (report-invalid-field-specifier) (report-duplicate-field-specifier): Move within 'eval-expand'.
2019-01-24tests: Remove duplicate field initializers.Ludovic Courtès
Fixes a regression introduced in c2dcff41c2e47f5f978f467864d5ed7829939884, whereby many tests in 'tests/packages.scm' would trigger a syntax error due to duplicate field intializers in forms like: (dummy-package "foo" (version "0")) * guix/tests.scm (dummy-package, dummy-origin): Rewrite to inherit from a base record. This restores the semantics from before c2dcff41c2e47f5f978f467864d5ed7829939884. * tests/services.scm ("instantiate-missing-services, indirect"): Remove duplicate 'extensions' field.
2019-01-24licenses: Add lppl1.1+.Ricardo Wurmus
* guix/licenses.scm (lppl1.1+): New variable.
2019-01-23ui: Don't report "build failed:" for daemon error messages.Ludovic Courtès
Until now we'd get things like: guix build: error: build failed: build of `/gnu/store/….drv' failed or: $ guix gc -d /sdf guix gc: error: build failed: path `/sdf' is not in the store which is kinda ridiculous. * guix/ui.scm (call-with-error-handling): Remove "build failed:" prefix for 'store-protocol-error?'.
2019-01-23deduplication: Ignore EMLINK.Ludovic Courtès
Until now 'guix offload' would fail (transient failure) upon EMLINK. * guix/store/deduplication.scm (replace-with-link) (deduplicate): Ignore EMLINK.
2019-01-22self: System tests depend on CLI modules.Ludovic Courtès
This is because (gnu tests docker) depends on (guix scripts pack). * guix/self.scm (compiled-guix)[*system-test-modules*]: Add dependency on *CLI-MODULES*.
2019-01-22offload: 'status' reports the time difference.Ludovic Courtès
* guix/scripts/offload.scm (check-machine-status): Report the time difference for each MACHINE.
2019-01-22records: Detect duplicate field initializers.Ludovic Courtès
* guix/records.scm (report-duplicate-field-specifier): New procedure. (make-syntactic-constructor): Call it. * tests/records.scm ("define-record-type* & duplicate initializers"): New test. Co-authored-by: Mark H Weaver <mhw@netris.org>
2019-01-22compile: Let compiler warnings through during the load phase.Ludovic Courtès
Previous warnings and errors such as those raised by (guix records) would not be displayed during the load phase. * guix/build/compile.scm (load-files): Remove 'parameterize' around 'resolve-interface' call. (compile-files)[build]: Move 'with-fluids' for *CURRENT-WARNING-PREFIX* to... <top level>: ... here.
2019-01-22self: Remove leftover export.Ludovic Courtès
* guix/self.scm: Remove 'reload-guix' export.
2019-01-21store: Rename '&nix-error' to '&store-error'.Ludovic Courtès
* guix/store.scm (&nix-error): Rename to... (&store-error): ... this, and adjust users. (&nix-connection-error): Rename to... (&store-connection-error): ... this, and adjust users. (&nix-protocol-error): Rename to... (&store-protocol-error): ... this, adjust users. (&nix-error, &nix-connection-error, &nix-protocol-error): Define these condition types and their getters as deprecrated aliases. * build-aux/run-system-tests.scm, guix/derivations.scm, guix/grafts.scm, guix/scripts/challenge.scm, guix/scripts/graph.scm, guix/scripts/lint.scm, guix/scripts/offload.scm, guix/serialization.scm, guix/ssh.scm, guix/tests.scm, guix/ui.scm, tests/derivations.scm, tests/gexp.scm, tests/guix-daemon.sh, tests/packages.scm, tests/store.scm, doc/guix.texi: Adjust to use the new names.
2019-01-21store: Rename <nix-server> to <store-connection>.Ludovic Courtès
* guix/store.scm (<nix-server>): Rename to... (<store-connection>): ... this. Adjust users accordingly. (nix-server?, nix-server-major-version) (nix-server-minor-version, nix-server-socket) (nix-server-version): Define as deprecated aliases. * guix/inferior.scm: Adjust accordingly. * guix/ssh.scm: Likewise.
2019-01-21deprecation: Send warnings to (current-error-port) by default.Ludovic Courtès
* guix/deprecation.scm (deprecation-warning-port): Default to (current-error-port).
2019-01-21deprecation: Add 'define-deprecated/alias'.Ludovic Courtès
* guix/deprecation.scm (define-deprecated/alias): New macro.
2019-01-21import: github: Improve readability.Arun Isaac
* guix/import/github.scm (latest-released-version): Use any and cond instead of a recursive loop and an if-else ladder respectively.
2019-01-21import: github: Use prereleases when package has no releases.Arun Isaac
* guix/import/github.scm (latest-released-version): Use preleases when package has no releases.
2019-01-20pull: Add missing import.Ludovic Courtès
Fixes <https://bugs.gnu.org/34136>. Reported by Pierre Neidhardt <mail@ambrevar.xyz>. Fixes wrong-type-arg crash of "guix pull -p /does-not-exist -l". * guix/scripts/pull.scm: Use (srfi srfi-34).
2019-01-20self: Build the (gnu tests …) modules.Ludovic Courtès
* guix/self.scm (compiled-guix)[*system-modules*]: Remove gnu/tests/* from #:extra-files. [*system-test-modules*]: New variable. [build-modules]: Add them.
2019-01-21import: github: Check if git URIs are GitHub URIs.Arun Isaac
This fixes a regression introduced in 9a5091d0c181453d0f31ce97f96a4e577a25e796 whereby packages with git origin URIs not hosted on GitHub would be wrongly detected as being covered under the github updater. Reported by Efraim Flashner <efraim@flashner.co.il>. * guix/import/github.scm (updated-github-url): Check if git URIs are GitHub URIs.
2019-01-20channels: Use 'fold2'.Ludovic Courtès
* guix/channels.scm (latest-channel-instances): Use 'fold2' instead of 'fold'.
2019-01-20channels: Gracefully report the lack of a 'guix' channel.Ludovic Courtès
* guix/channels.scm (channel-instance-derivations): Raise an '&message' condition when CORE-INSTANCE is #f.
2019-01-20channels: Build channel modules in an inferior.Ludovic Courtès
This ensures that channel modules are compiled with the right Guile, that they get to see the right modules, and so on. IOW, it avoids bugs such as those addressed by commits 3c0e16391ed9a3e3e4611b940fb393c5f2ecea63 and cb341c121919877ae6267a6460c0c17536d06eff. * guix/channels.scm (standard-module-derivation): Add 'core' parameter. Rewrite in terms of 'gexp->derivation-in-inferior'. (build-from-source): Add #:core parameter and pass it to 'standard-module-derivation'. (build-channel-instance): Add 'core' parameter and pass it on. (channel-instance-derivations)[dependencies]: Remove. Adjust 'build-channel-instance' call.
2019-01-20inferior: 'gexp->derivation-in-inferior' honors EXP's load path.Ludovic Courtès
Previously the imported modules and extensions of EXP would be missing from the load path of 'guix repl'. * guix/inferior.scm (gexp->derivation-in-inferior)[script]: New variable. [trampoline]: Write (primitive-load #$script) to PIPE. Add #$output. * tests/channels.scm ("channel-instances->manifest")[depends?]: Check for requisites rather than direct references. Adjust callers accordingly.
2019-01-20channels: Don't pull from the same channel more than once.Ludovic Courtès
Previous 'channel-instance->manifest' would call 'latest-channel-derivation', which could trigger another round of 'latest-repository-commit' for no good reason. * guix/channels.scm (resolve-dependencies): New procedure. (channel-instance-derivations)[edges]: New variable. [instance->derivation]: New procedure. * tests/channels.scm (make-instance): Use 'checkout->channel-instance' instead of 'channel-instance'. ("channel-instances->manifest"): New test.
2019-01-20lint: check-source-unstable-tarball: Don't assume uri length.Efraim Flashner
* guix/scripts/lint.scm (check-source-unstable-tarball): Replace third with code to make sure there are enough elements to check.
2019-01-20profiles: Allow a profile to be added as an entry of another profile.Ludovic Courtès
* guix/build/profiles.scm (build-etc/profile): When 'OUTPUT/etc/profile' already exists, delete it first. (build-profile): Likewise for 'OUTPUT/manifest'. * tests/profiles.scm ("profile in profile"): New test.
2019-01-19self: Add gnu/tests/* to the installed files.Ludovic Courtès
* guix/self.scm (compiled-guix)[*system-modules*]: Add gnu/tests/*.
2019-01-18pull: Suggest running 'hash guix' if needed.Ludovic Courtès
Fixes <https://bugs.gnu.org/33647>. Suggested by Diego Nicola Barbato <dnbarbato@posteo.de>. * guix/scripts/pull.scm (build-and-install): Before returning, display a hint if (which "guix") is not in PROFILE.
2019-01-18serialization: 'restore-file' errors out upon non-convertible file names.Ludovic Courtès
Fixes <https://bugs.gnu.org/33603>. Reported by Maxim Cournoyer <maxim.cournoyer@gmail.com>. * guix/serialization.scm (port-conversion-strategy): New variable. (restore-file): Parameterize it. * tests/nar.scm ("restore-file with non-UTF8 locale"): New test.
2019-01-18guix: Add guard to texlive-configuration profile hook.Christopher Baines
It is possible to generate a profile where this hook will crash, as the texmf.cnf file does not exist to be patched by substitute*. A simple example is the profile just containing texlive-fonts-txfonts. * guix/profiles.scm (texlive-configuration): Check that the texmf.cnf file exists before trying to change it.
2019-01-17scripts: Fix typo.Ricardo Wurmus
* guix/scripts/download.scm (show-help): Fix typo.
2019-01-17syscalls: 'device-in-use?' returns #f upon EINVAL.Ludovic Courtès
This mirrors the behavior of the 'fdisk_device_is_used' function of util-linux. * guix/build/syscalls.scm (device-in-use?): Return #f upon EINVAL.
2019-01-17syscalls: 'device-in-use?' does not create a port.Ludovic Courtès
* guix/build/syscalls.scm (device-in-use?): Use 'open-fdes' rather than 'open-file'.