summaryrefslogtreecommitdiff
path: root/guix
AgeCommit message (Collapse)Author
2019-07-15gexp: 'lowered-gexp-guile' now returns a <derivation-input>.Ludovic Courtès
* guix/derivations.scm (derivation-input-output-path): New procedure. * guix/gexp.scm (lower-gexp): Wrap GUILE in a <derivation-input>. (gexp->derivation): Adjust accordingly. * guix/remote.scm (remote-pipe-for-gexp, remote-eval): Adjust accordingly. * tests/gexp.scm ("lower-gexp"): Adjust accordingly.
2019-07-15derivations: Deprecate the previous calling convention.Ludovic Courtès
We will eventually require #:inputs to be a list of <derivation-input>; store items will have to be passed as #:sources, already interned. * guix/derivations.scm (warn-about-derivation-deprecation): New procedure. (derivation): Add #:%deprecation-warning? parameter. [warn-deprecation]: New macro. [input->derivation-input, input->source]: Use it. (build-expression->derivation): Pass #:%deprecation-warning?. * po/guix/POTFILES.in: Add guix/derivations.scm.
2019-07-15derivations: 'map-derivation' uses the new 'derivation' calling convention.Ludovic Courtès
* guix/derivations.scm (map-derivation)[input->output-paths]: Adjust to deal with an argument that's either 'derivation-input?' or a string. [rewritten-input]: Return a <derivation-input> or a string. Pass #:inputs and #:sources to 'derivation'.
2019-07-15download: Use the new 'derivation' calling convention.Ludovic Courtès
* guix/download.scm (built-in-download): Pass MIRRORS and CONTENT-ADDRESSED-MIRRORS as #:sources, not #:inputs.
2019-07-15gexp: <lowered-gexp> separates sources from derivation inputs.Ludovic Courtès
* guix/gexp.scm (lower-inputs): Return either <derivation-input> records or store items. (lower-reference-graphs): Return file/input pairs. (<lowered-gexp>)[sources]: New field. (lower-gexp): Adjust accordingly. (gexp->input-tuple): Remove. (gexp->derivation)[graphs-file-names]: Handle only the 'derivation-input?' and 'string?' cases. Pass #:sources to 'raw-derivation'; ensure #:inputs contains only <derivation-input> records. * guix/remote.scm (remote-eval): Adjust to the new <lowered-gexp> interface. * tests/gexp.scm ("lower-gexp"): Adjust to expect <derivation-input> records instead of <gexp-input>
2019-07-15derivations: 'derivation' primitive accepts <derivation> and #:sources.Ludovic Courtès
This brings us closer to the <derivation> data type. * guix/derivations.scm (derivation): Add #:sources parameter. [input->derivation-input]: Add clause for 'derivation-input?'. Honor SOURCES.
2019-07-15syscalls: Use 'define-as-needed' for 'AT_' constants introduced in Guile 2.2.5.Ludovic Courtès
* guix/build/syscalls.scm (AT_FDCWD, AT_SYMLINK_NOFOLLOW, AT_REMOVEDIR) (AT_SYMLINK_FOLLOW, AT_NO_AUTOMOUNT, AT_EMPTY_PATH): Define using 'define-as-needed'.
2019-07-15compile: Report the name of the file that cannot be compiled.Ludovic Courtès
Fixes <https://bugs.gnu.org/36640>. Reported by Robert Vollmert <rob@vllmrt.net>. * guix/build/compile.scm (call/exit-on-exception): Add 'file' parameter and honor it. (exit-on-exception): Likewise. (compile-files): Pass FILE to 'exit-on-exception'.
2019-07-14Revert "guix: node-build-system: Use guile-json instead of a custom parser."Julien Lepiller
The effect of this change was to import the (json parser) from the host side into the build side. The solution here would be to do the equivalent of ‘with-extensions’ for gexps. Since we don't use gexps for build systems just yet, revert this for now. This reverts commit 8eb0ba532ebbebef23180e666e0607ea735f9c1a.
2019-07-14guix: node-build-system: Use guile-json instead of a custom parser.Julien Lepiller
* guix/build/json.scm: Remove file. * Makefile.am: Remove it. * guix/build/node-build-system.scm: Use (json parser) instead of (guix build json). * guix/build-system/node.scm: Idem.
2019-07-14build: Add node-build-system.Jelle Licht
* guix/build/node-build-system.scm: New file. * guix/build-system/node.scm: New file. * guix/build/json.scm: New file. * doc/guix.texi: Document it. * Makefile.am: Added new files. Co-Authored-By: Julien Lepiller <julien@lepiller.eu>
2019-07-13build-system/go: Fix typo.Leo Famulari
* guix/build/go-build-system.scm (install): Fix typo.
2019-07-14channels: Add optional directory to channel metadata.Jan Nieuwenhuizen
* guix/channels.scm (<channel-metadata>): Add directory slot. Update users. (read-channel-metadata-from-source): New function. (standard-module-derivation): Use it. * doc/guix.texi (Package Modules in a Subdirectory): New subsection.
2019-07-12build: Use '-Wshadowed-toplevel' only when supported.Ludovic Courtès
* guix/build/compile.scm (supported-warning-type?): New procedure. (%warnings): Remove 'unsupported-warning', though removing it doesn't make any difference. Define 'optional', and use it to determine whether to include 'shadowed-toplevel'.
2019-07-12Merge branch 'master' into core-updatesMarius Bakke
Conflicts: gnu/local.mk gnu/packages/python-xyz.scm gnu/packages/xml.scm guix/gexp.scm po/guix/POTFILES.in
2019-07-11guix gc: Correctly handle '--delete-generations' with no arguments.Ludovic Courtès
Previously, 'guix gc --delete-generations' would crash: the "" pattern would be passed to 'matching-generations', which would return #f instead of returning a list. Reported by Raghav Gururajan <rvgn@disroot.org> in <https://bugs.gnu.org/36466>. * guix/ui.scm (matching-generations): Raise an error when passed an invalid pattern. * guix/scripts/gc.scm (delete-old-generations): Check if PATTERN is true. (%options): Leave ARG as-is for 'delete-generations'. (guix-gc): Use 'assq' instead of 'assoc-ref' for 'delete-generations'. * guix/scripts/package.scm (delete-matching-generations): Replace (string-null? pattern) with (not pattern). Remove 'else' clause. (%options): Leave ARG as-is for 'delete-generations'. * guix/scripts/pull.scm (%options): Leave ARG as-is for 'list-generations'. (process-query): Replace (string-null? pattern) with (not pattern). * guix/scripts/system.scm (list-generations): Likewise, and remove 'else' clause. (process-command): Use #f instead of "" when no pattern is given.
2019-07-08discovery: Handle edge case in scheme-files when looking at symlinks.Christopher Baines
Previously, this code would cause crashes in Guix (running guix package -s for example) which could be experienced when Emacs creates temporary files in the gnu/packages/patches directory when a patch file has been edited, but not saved. * guix/discovery.scm (scheme-files): Add else clause to cond used when handling symlinks.
2019-07-08scripts: environment: Add --no-cwd.Carl Dong
* doc/guix.texi (Invoking guix environment): Add --no-cwd. * guix/scripts/environment.scm (show-help, %options): Add --no-cwd. (launch-environment/container): Add 'map-cwd?' param; only add mapping for cwd if #t. Only change to cwd within container if #t, otherwise home. (guix-environment): Error if --no-cwd without --container. Provide '(not no-cwd?)' to launch-environment/container as 'map-cwd?'. * tests/guix-environment.sh: Add test for no-cwd. Co-authored-by: Mike Gerwitz <mtg@gnu.org>
2019-07-08scripts: environment: Only rewrite user-specified mappings.Carl Dong
* guix/scripts/environment.scm (launch-environment/container): Only apply override-user-mappings to user-mappings and cwd. Do not apply to network configuration mapping and inputs.
2019-07-08channels: Key cached channel derivations by system.Ludovic Courtès
Previously, the channel instance to derivation mapping would be independent of the system. Thus, building the same channel instance for several different systems would always return the derivation that was first computed. This is a followup to c3ab921eed2a471022e9863a94ea521508782e53. * guix/channels.scm (channel-instance-derivations)[instance->derivation]: Pass the current system as a third argument to 'mcached'.
2019-07-07build-system/meson: Enable compiler optimizations.Marius Bakke
* guix/build-system/meson.scm (meson-build)[#:build-type]: Set to 'debugoptimized'.
2019-07-06self: Ship the (gnu machine …) modules.Mark H Weaver
This is a followup to commit fa9edf09e992db7510c7471486dffc93e1e707e5. * guix/self.scm (compiled-guix)[*system-modules*]: Explicitly add all of gnu/machine/*.
2019-07-06channels: Simplify 'channel-instances->manifest'.Ludovic Courtès
* guix/channels.scm (channel-instances->manifest)[instance->entry]: Change to take two arguments instead of a tuple. Turn into a non-monadic procedure. Call it via 'map' instead of 'mapm'.
2019-07-06Add 'guix deploy'.Jakob L. Kreuze
* guix/scripts/deploy.scm: New file. * Makefile.am (MODULES): Add it.
2019-07-06ssh: Add 'identity' keyword to 'open-ssh-session'.Jakob L. Kreuze
* guix/ssh.scm (open-ssh-session): Add 'identity' keyword argument.
2019-07-05store: 'run-with-store' gracefully deals with #f store.Ludovic Courtès
This is a followup to dd0ee954c4fa965023fd887452927c02edb8b52f, which introduced a failure in tests/graph.scm. * guix/store.scm (run-with-store): Check whether STORE and NEW-STORE are true before calling 'store-connection-object-cache' etc. Fixes a failure in tests/graph.scm related to %REVERSE-PACKAGE-NODE-TYPE, which uses #f as the store.
2019-07-05derivations: Simplify 'substitution-oracle'.Ludovic Courtès
* guix/derivations.scm (substitution-oracle)[valid?, dependencies]: Remove. [closure]: New procedure. Rename parameter from 'drv' to 'inputs-or-drv' and adjust accordingly. (derivation-build-plan): Pass INPUTS directly to 'substitution-oracle'. * guix/ui.scm (show-what-to-build)[substitutable-info]: Likewise.
2019-07-05derivations: 'derivation-build-plan' recurses on substituables.Ludovic Courtès
This fixes a bug whereby "guix build texlive -n" would report: 0.0 MB would be downloaded: /gnu/store/…-texlive-20180414 instead of: The following derivation would be built: /gnu/store/…-texlive-texmf-20180414.drv 2,595.2 MB would be downloaded: /gnu/store/…-texlive-20180414-texmf.tar.xz /gnu/store/…-texlive-20180414 where 'texlive-texmf' is a non-substitutable dependency of 'texlive'. * guix/derivations.scm (dependencies-of-substitutables): New procedure. (derivation-build-plan): When 'input-substitutable-info' returns true, append the subset of DEPS that corresponds to SUBSTITUABLES to the first argument of 'loop'. * guix/ui.scm (show-what-to-build): Remove half-baked traversal of DOWNLOAD. * tests/derivations.scm ("derivation-build-plan and substitutes, non-substitutable dep"): New test.
2019-07-04pack: 'squashfs' backend records the profile's search paths.Ludovic Courtès
* guix/scripts/pack.scm (singularity-environment-file): New procedure. (squashfs-image): Use it, and create /.singularity/env/90-environment.sh. * gnu/tests/singularity.scm (run-singularity-test)["singularity run, with environment"]: New test, currently skipped. * gnu/tests/singularity.scm (build-tarball&run-singularity-test): Add GUILE-JSON to the profile.
2019-07-04pack: 'docker' backend records the profile's search paths.Ludovic Courtès
* guix/docker.scm (config): Add #:environment parameter and honor it. (build-docker-image): Likewise, and pass it to 'config'. * guix/scripts/pack.scm (docker-image): Import (guix profiles) and (guix search-paths). Call 'profile-search-paths' and pass #:environment to 'build-docker-image'. * gnu/tests/docker.scm (run-docker-test)["Load docker image and run it"]: Add example that expects (json) to be available. * gnu/tests/docker.scm (build-tarball&run-docker-test): Replace %BOOTSTRAP-GUILE by GUILE-2.2 and GUILE-JSON in the environment.
2019-07-04Add (guix remote).Ludovic Courtès
* guix/remote.scm: New file. * Makefile.am (MODULES): Add it.
2019-07-04inferior: Add 'read-repl-response'.Ludovic Courtès
* guix/inferior.scm (read-repl-response): New procedure. (read-inferior-response): Use it.
2019-07-04Add (guix repl).Ludovic Courtès
* guix/scripts/repl.scm: Use (guix repl). (self-quoting?, machine-repl): Remove. * guix/repl.scm: New file. * Makefile.am (MODULES): Add it.
2019-07-04gexp: Add 'lower-gexp' and express 'gexp->derivation' in terms of it.Ludovic Courtès
* guix/gexp.scm (gexp-input-thing, gexp-input-output) (gexp-input-native?): Export. (lower-inputs): Return <gexp-input> records instead of tuples. (lower-reference-graphs): Adjust accordingly. (<lowered-gexp>): New record type. (lower-gexp, gexp-input->tuple): New procedure. (gexp->derivation)[%modules]: Remove. [requested-graft?]: New variable. [add-modules]: New procedure. Rewrite in terms of 'lower-gexp'. (gexp-inputs): Add TODO comment. * tests/gexp.scm ("lower-gexp"): New test.
2019-07-04import: hackage: Update list of ghc-included packages.Robert Vollmert
It turns out the list in the release notes is incomplete. This updates the list from /gnu/store/<hash>-ghc-8.4.3/lib/ghc-8.4.3. * guix/import/hackage.scm (ghc-standard-libraries): Update list. Signed-off-by: Ricardo Wurmus <rekado@elephly.net>
2019-07-04Merge branch 'staging' into core-updatesMarius Bakke
2019-07-03store: 'run-with-store' preserves the functional object cache.Ludovic Courtès
This increases the hit rate of the object cache from 56% to 85% when running something like 'guix build libreoffice -nd'. * guix/store.scm (set-store-connection-object-cache!): New procedure. (run-with-store): Copy 'object-cache' field of the new store into the original one.
2019-07-03derivations: 'substitution-oracle' no longer calls 'read-derivation-from-file'.Ludovic Courtès
This is a followup to 5cf4b26d52bcea382d98fb4becce89be9ee37b55. * guix/derivations.scm (substitution-oracle): Use 'derivation-input-derivation' instead of calling 'read-derivation-from-file'.
2019-07-03derivations: Avoid another call to 'read-derivation-from-file'.Ludovic Courtès
This is a followup to 5cf4b26d52bcea382d98fb4becce89be9ee37b55. * guix/derivations.scm (derivation-path->base16-hash): Rename to... (derivation-base16-hash): ... this, and take a <derivation> rather than a file name. Use 'mlambdaq' instead of 'mlambda'. (derivation/masked-inputs): Adjust accordingly. (invalidate-derivation-caches!): Likewise.
2019-07-03derivations: 'map-derivation' no longer calls 'read-derivation-from-file'.Ludovic Courtès
This is a followup to 5cf4b26d52bcea382d98fb4becce89be9ee37b55. * guix/derivations.scm (map-derivation)[rewritten-input]: Avoid call to 'read-derivation-from-file'.
2019-07-03derivations: Work around pathological memoization behavior.Ludovic Courtès
This works around <https://bugs.gnu.org/36487>. * guix/derivations.scm (invalidate-derivation-caches!): Comment out 'hash-clear!' call.
2019-07-03profiles: Adjust packages->manifest pattern for inferior packages.Kyle Meyer
* guix/profiles.scm (packages->manifest): Add package? predicate to `(package output)' pattern to avoid incorrectly matching `(inferior-package output)', which should be handled by a later clause. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2019-07-02Merge branch 'staging' into core-updatesMarius Bakke
2019-07-02grafts: 'references-oracle' now takes a derivation input.Ludovic Courtès
That way, if we end up calling 'build-derivations', we'll only build the outputs that we really need. * guix/grafts.scm (references-oracle): Rename 'drv' to 'input'. [output-paths]: Remove. Adjust accordingly. (graft-derivation): Adjust call to 'references-oracle'.
2019-07-02derivations: Update 'build-derivations' docstring.Ludovic Courtès
This is a followup to 7c690a47381f645ec5ec0a1fd6ffc34dba1b69c2. * guix/derivations.scm (build-derivations): Update docstring.
2019-07-02import: pypi: Preserve package name case when forming pypi-uri.Maxim Cournoyer
Fixes <https://bugs.gnu.org/33046>. * guix/build-system/python.scm (pypi-uri): Update the host URI to "files.pythonhosted.org". * guix/import/pypi.scm (make-pypi-sexp): Preserve the package name case when the source URL calls for it.
2019-07-02import: pypi: Update the host URI.Maxim Cournoyer
* guix/build-system/python.scm (pypi-uri): Update the host URI to "files.pythonhosted.org".
2019-07-02import: pypi: Include optional test inputs as native-inputs.Maxim Cournoyer
* guix/import/pypi.scm (maybe-inputs): Add INPUT-TYPE argument, and use it. (test-section?): New predicate. (parse-requires.txt): Collect the optional test inputs, and return them as the second element of the returned list. (parse-wheel-metadata): Likewise. (guess-requirements): Adapt. (make-pypi-sexp): Likewise, and include the test inputs requirements as native inputs in the returned package expression. * tests/pypi.scm (test-requires.txt): Include a test section in the test-requires.txt data. (test-requires.txt-beaker): New variable. ("parse-requires.txt"): Adapt. ("parse-requires.txt - Beaker"): New test. ("parse-wheel-metadata, with extras"): Adapt. ("parse-wheel-metadata, with extras - Jedi"): Adapt. ("pypi->guix-package, no wheel"): Re-indent, and add the expected native-inputs. ("pypi->guix-package, wheels"): Likewise.
2019-07-02import: pypi: Completely mute the output of the "unzip" command.Maxim Cournoyer
* guix/import/pypi.scm (guess-requirements): Completely mute the output of the "unzip" command.
2019-07-02import: pypi: Fix typo in docstring.Maxim Cournoyer
* guix/import/pypi.scm (guess-requirements): Fix typo.