Commit Graph

4096 Commits

Author SHA1 Message Date
Ludovic Courtès 461d6c2eff
profiling: Add a "gc" profiling component.
* guix/profiling.scm (show-gc-stats): New procedure.
<top level>: Call 'register-profiling-hook!'.
2019-01-15 20:24:08 +01:00
Ricardo Wurmus b96909c5c1
guix: scons: Fix module reference.
* guix/build-system/scons.scm (default-scons): Find "scons" package in
(gnu packages python-xyz) instead of (gnu packages python).
2019-01-15 18:15:07 +01:00
Ricardo Wurmus 743497b565
guix: Add profile hook to build TeX live configuration.
* guix/profiles.scm (texlive-configuration): New procedure.
(%default-profile-hooks): Add it.
* guix/status.scm (hook-message): Handle "texlive-configuration" hook type.
2019-01-15 13:05:22 +01:00
Ludovic Courtès 0c1bc5ecbe
status: Spin only on TTYs.
* guix/status.scm (isatty?*): New procedure.
(spin!): Do nothing when port matches ISATTY?*.
(color-output?): Use ISATTY?*.
2019-01-15 12:05:25 +01:00
Ludovic Courtès 35225dc579
guix package: '--upgrade' preserves package order.
Fixes <https://bugs.gnu.org/31142>.
Reported by Chris Marusich <cmmarusich@gmail.com>.

* guix/scripts/package.scm (options->installable)[upgraded]: Use 'fold'
instead of 'fold-right'.  This reverts
eca16a3d1d.
* tests/guix-package-net.sh: Add 'guix package u' test.
2019-01-15 12:05:25 +01:00
Ludovic Courtès 0ee1e47edb
copy: Add '--verbosity'.
This fixes a regression introduced in
f1de676ea8 since %DEFAULT-OPTIONS was
missing the 'debug key that 'set-build-options-from-command-line'
expects.

* guix/scripts/copy.scm (show-help, %options): Add '--verbosity'.
(%default-options): Rename 'verbosity' to 'debug'.  Add
'print-build-trace?', 'print-extended-build-trace?',
'multiplexed-build-output?', and 'verbosity'.
(guix-copy): Wrap body in 'with-status-verbosity'.
2019-01-14 23:43:49 +01:00
Ludovic Courtès 60029204ee
pull: Don't prepend "origin/" to branch names.
This is a followup to 37a6cdbf1b.

* guix/scripts/pull.scm (%options): Don't prepend "origin/" to branch
names.
2019-01-14 23:43:49 +01:00
Ricardo Wurmus 91e05559bd
import: cran: Suggest input changes.
* guix/import/cran.scm (latest-cran-release, latest-bioconductor-release):
Return input-changes.
2019-01-12 23:35:11 +01:00
Ricardo Wurmus 7e634c2f53
refresh: Suggest input changes when updating.
* guix/upstream.scm (<upstream-source>)[input-changes]: New field.
(<upstream-input-change>): New record.
(upstream-input-change?, upstream-input-change-name,
upstream-input-change-type, upstream-input-change-action, changed-inputs): New
procedures.
(package-update): Pass along input changes.
* guix/script/refresh.scm (update-package): Process input changes.
2019-01-12 23:35:11 +01:00
Ludovic Courtès f1de676ea8
guix build: Re-purpose '--verbosity' and add '--debug'.
The previous '--verbosity' option was misleading and rarely what users
were looking for.  The new option provides a consistent way to choose
whether or not to display the build log.

* guix/scripts/build.scm (show-build-options-help): Remove "--verbosity"
and add "--debug".
(set-build-options-from-command-line): Use the 'debug key of OPTS for
 #:verbosity.
(%standard-build-options): Change "verbosity" to "debug".  Use
'string->number*' instead of 'string->number'.
(%default-options): Change 'verbosity to 'debug and add a 'verbosity
key.
(show-help): Add '--verbosity'.
(%options): Likewise, and change '--quiet' to set the 'verbosity key of
RESULT.
(guix-build): Use 'with-status-verbosity' instead of parameterizing
CURRENT-BUILD-OUTPUT-PORT, honor the 'verbosity key of OPTS, and remove
'quiet?'.
* guix/scripts/environment.scm (show-help, %options): Add '--verbosity'.
(%default-options): Add 'debug'.
(guix-environment): Honor the 'verbosity key of OPTS.
* guix/scripts/pack.scm (%default-options): Add 'debug.
(%options, show-help): Add '--verbosity'.
(guix-pack): Honor the 'verbosity key of OPTS.
* guix/scripts/package.scm (%default-options): Add 'debug.
(show-help, %options): Add '--verbosity'.  Mark '--verbose' as
deprecated and change it to set 'verbosity.
(guix-package): Honor the 'verbosity key of OPTS and remove 'verbose?'.
* guix/scripts/pull.scm (%default-options): Add 'debug.
(show-help, %options): Add '--verbosity'.
(guix-pull): Honor the 'verbosity key of OPTS.
* guix/scripts/system.scm (show-help, %options): Add '--verbosity'.
(%default-options): Add 'debug.
(guix-system): Honor the 'verbosity key of OPTS.
* guix/scripts/archive.scm (%default-options): Add 'debug,
'print-build-trace?, 'print-extended-build-trace?, and
'multiplexed-build-output?.
(show-help, %options): Add '--verbosity'.
(export-from-store): Remove call to 'set-build-options-from-command-line'.
(guix-archive): Wrap body in 'with-status-verbosity'. Add call to
'set-build-options-from-command-line.
* doc/guix.texi (Common Build Options): Document '--verbosity' and
'--debug'.
(Additional Build Options): Adjust description of '--quiet'.
2019-01-11 12:14:38 +01:00
Ludovic Courtès 7804c45b9c
status: Add 'with-status-verbosity'.
* guix/status.scm (logger-for-level, call-with-status-verbosity): New
procedures.
(with-status-verbosity): New macro.
* guix/scripts/environment.scm (guix-environment): Use
'with-status-verbosity' instead of 'with-status-report'.
* guix/scripts/pack.scm (guix-pack): Likewise.
* guix/scripts/package.scm (guix-package): Likewise.
* guix/scripts/pull.scm (guix-pull): Likewise.
* guix/scripts/system.scm (guix-system): Likewise.
* build-aux/run-system-tests.scm (run-system-tests): Likewise.
2019-01-11 12:14:38 +01:00
Ludovic Courtès 7489207ff7
refresh: Turn on warnings when '--manifest' is used.
* guix/scripts/refresh.scm (guix-refresh): Set WARN? when '-m' is used.
2019-01-11 12:14:38 +01:00
Ludovic Courtès fca43e14f7
refresh: Refactor option handling and '--recursive'.
This allows us to combine '--recursive' with other options (-u, -m,
etc.), turns off warnings when '--recursive' is used, and avoids the
hazards of I/O in the presence of multithreading.

* guix/scripts/refresh.scm (options->packages): New procedure, with code
formerly in 'guix-refresh'.
(refresh-recursive): Remove.
(guix-refresh)[keep-newest, core-package?, args-packages, packages]:
Remove.
[warn?]: Set to #f when RECURSIVE? is true.
Call 'options->packages' in monadic context.
2019-01-11 12:14:38 +01:00
Ricardo Wurmus bf6fb59a33
build-system: texlive: Do not hide build output.
* guix/build/texlive-build-system.scm (compile-with-latex): Use "nonstopmode"
instead of "batchmode".
2019-01-10 22:43:09 +01:00
Ricardo Wurmus ac5c9f6ba6
build-system: texlive: Do not truncate lines.
* guix/build/texlive-build-system.scm (configure): Set environment variables
to prevent build output lines from being truncated.
2019-01-10 22:43:09 +01:00
Ricardo Wurmus d4d9a1ece0
gnu: Update texlive packages.
* guix/build-system/texlive.scm (%texlive-tag, %texlive-revision): Update to
texlive-2018.2, revision 49435.
* gnu/packages/tex.scm (texlive-dvips, texlive-generic-unicode-data,
texlive-generic-dehyph-exptl, texlive-generic-hyph-utf8, texlive-fontname,
texlive-fonts-cm, texlive-tex-plain, texlive-latex-base,
texlive-latex-graphics, texlive-latex-graphics, texlive-latex-oberdiek,
texlive-latex-tools, texlive-latex-l3kernel, texlive-latex-l3packages,
texlive-latex-fontspec, texlive-latex-amsmath, texlive-latex-amscls,
texlive-latex-babel, texlive-latex-cyrillic, texlive-latex-eqparbox,
texlive-latex-ifplatform, texlive-latex-etoolbox, texlive-latex-galois,
texlive-latex-polyglossia, texlive-tex-texinfo, texlive-latex-changebar,
texlive-latex-fancyhdr, texlive-latex-overpic, texlive-latex-parskip,
texlive-metapost, texlive-latex-ucs, texlive-generic-pdftex,
texlive-latex-media9, texlive-latex-ocgx2, texlive-latex-koma-script,
texlive-generic-listofitems, texlive-bibtex, texlive-context-base): Update
hashes.
(texlive-latex-fontspec)[arguments]: Remove custom build target.
(texlive-latex-dinbrief)[arguments]: Add build phase "fix-encoding-error".
(texlive-latex-xkeyval): New variable.
(texlive-latex-pstool)[source]: Fetch from new location.
[build-system]: Use trivial-build-system.
[arguments]: Write simple builder.
[propagated-inputs]: Add texlive-latex-l3kernel, texlive-latex-tools, and
texlive-latex-xkeyval.
[synopsis]: Fix typo.
2019-01-10 22:43:09 +01:00
Ludovic Courtès 787da810a0
Add (guix deprecation).
* guix/deprecation.scm: New file.
* Makefile.am (MODULES): Add it.
* po/guix/POTFILES.in: Add it.
2019-01-10 14:59:22 +01:00
Arun Isaac 40fa21c22e
guix: lint: Warn only if GitHub URI is not same as the package URI.
* guix/scripts/lint.scm (check-github-url): Warn only if the GitHub URI
obtained after following redirects is not same as the original URI.
* tests/lint.scm ("github-url: already the correct github url"): New test.
2019-01-10 15:39:35 +05:30
Ludovic Courtès 804b9b18ac
build-system/asdf: 'package-with-build-system' accesses inputs lazily.
Fixes a bug whereby we would, at the top-level (while evaluation
lisp.scm package definitions), attempt to access package inputs.
Because of circular dependencies, this could lead to unbound variables
as reported by Arun Isaac <arunisaac@systemreboot.net> at
<https://debbugs.gnu.org/cgi/bugreport.cgi?bug=33801#56>.

* guix/build-system/asdf.scm (package-with-build-system)[transform]
(new-propagated-inputs): Turn into a procedure.
Adjust user accordingly.
2019-01-09 15:01:40 +01:00
Ludovic Courtès 6e54e488c6
self: Drop support for Guix < 0.15 on Guile 2.0.
* guix/self.scm (false-if-wrong-guile, package-for-guile): Remove.
(specification->package): Remove "guile2.0-" variants.
(compiled-guix): #:guile-for-build defaults to (default-guile).
Use 'specification->package' instead of 'package-for-guile'.
(guile-for-build): Remove.
(guix-derivation): Use 'default-guile' instead of 'guile-for-build'.
Check whether we're running on Guile 2.0 with PULL-VERSION < 1.
2019-01-09 14:47:53 +01:00
Ludovic Courtès 76832d3420
Remove most uses of the _IO*F constants.
These constants, for use with 'setvbuf', were deprecated in Guile 2.2
and disappeared in Guile 3.0.  Here we keep these constants in
build-side code where removing them is not feasible.

* guix/build/download-nar.scm (download-nar): Adjust 'setvbuf' calls to
the Guile 2.2+ API.
* guix/build/download.scm (open-socket-for-uri): Likewise.
(open-connection-for-uri, url-fetch): Likewise.
* guix/build/make-bootstrap.scm (make-stripped-libc): Likewise.
* guix/build/union.scm (setvbuf) [guile-2.0]: New conditional wrapper.
(union-build): Adjust to new API.
* guix/ftp-client.scm (ftp-open, ftp-list, ftp-retr): Likewise.
* guix/http-client.scm (http-fetch): Likewise.
* guix/inferior.scm (proxy): Likewise.
* guix/scripts/substitute.scm (fetch, http-multiple-get): Likewise.
* guix/self.scm (compiled-modules): Likewise.
* guix/ssh.scm (remote-daemon-channel, store-import-channel)
(store-export-channel): Likewise.
* guix/ui.scm (initialize-guix): Likewise.
* tests/publish.scm (http-get-port): Likewise.
* guix/store.scm (%newlines): Adjust comment.
2019-01-09 14:47:53 +01:00
Ludovic Courtès c3d9bca48a
download: Remove Guile 2.0 workaround.
* guix/build/download.scm: Remove Guile 2.0 workaround.
2019-01-09 14:47:53 +01:00
Ludovic Courtès a65177a657
maint: Remove 'cond-expand' forms for Guile 2.0.
Note: Leave 'cond-expand' forms used in the build-side modules that can
run on %BOOTSTRAP-GUILE, which is currently Guile 2.0.

* guix/build/compile.scm: Move 'use-modules' clause from 'cond-expand'
to 'define-module' form.
(%default-optimizations): Remove 'cond-expand'.
* guix/build/download.scm (tls-wrap): Remove 'cond-expand'.
* guix/build/syscalls.scm: Remove 'cond-expand' form around
'%set-automatic-finalization-enabled?!' and
'without-automatic-finalization'.
* guix/inferior.scm (port->inferior): Remove 'cond-expand'.
* guix/scripts/pack.scm (wrapped-package)[build]: Remove 'cond-expand'.
* guix/status.scm (build-event-output-port): Remove 'cond-expand'.
* guix/store.scm (open-inet-socket): Remove 'cond-expand'.
* guix/ui.scm (install-locale): Remove 'cond-expand'.
* tests/status.scm ("current-build-output-port, UTF-8 + garbage"):
Remove 'cond-expand'.
* tests/store.scm ("current-build-output-port, UTF-8 + garbage"):
Remove 'cond-expand'.
2019-01-09 14:47:53 +01:00
Ludovic Courtès a21a906fcd
pull: Document '--system'.
Fixes <https://bugs.gnu.org/34010>.
Reported by Alex Kost <alezost@gmail.com>.

This is a followup to 5923102f7b.

* guix/scripts/pull.scm (show-help): Add '--system'.
2019-01-08 18:38:15 +01:00
Ludovic Courtès 08fdee3911
self: Compress Info files.
Fixes <https://bugs.gnu.org/33993>.
Reported by Adonay Felipe Nogueira <adfeno@hyperbola.info>.

* guix/self.scm (info-manual): Compress Info files.
2019-01-08 18:38:15 +01:00
Ludovic Courtès efff32452a
gexp: 'gexp->script' does not emit load-path expression when unnecessary.
This removes two elements from %LOAD-PATH and %LOAD-COMPILED-PATH of the
'guix' command and thus further reduces the number of 'stat' calls it
makes.

* guix/gexp.scm (load-path-expression): Return #f when MODULES and
EXTENSIONS are both empty.
(gexp->script): Don't emit anything when SET-LOAD-PATH is #f.
2019-01-07 23:50:56 +01:00
Ludovic Courtès 49c35bbb71
self: Move all modules into a single directory.
This halves the number of elements in %LOAD-PATH and %LOAD-COMPILED-PATH
and halves the number of 'stat' calls as reported by:

  env -i $(type -P guix) build -e '(@ (gnu packages base) coreutils)' -nd

* guix/self.scm (node-source+compiled, guile-module-union): New
procedures.
(guix-command): Remove 'compiled-modules' parameter.  Remove
'source-directories' and 'object-directories' variables and add
'module-directory'.  Change command so that it adds nothing but
MODULE-DIRECTORY to %LOAD-PATH and %LOAD-COMPILED-PATH.
(whole-package): Remove #:compiled-modules.  Assume MODULES contains
'share/guile/site' and 'lib/guile' and adjust code accordingly.
(compiled-guix): When PULL-VERSION is 1, use 'node-source+compiled'
only.  Remove #:compiled-modules argument to 'whole-package'.
* guix/channels.scm (whole-package-for-legacy): Add 'module+compiled'
and pass it to 'whole-package'.
2019-01-07 23:50:56 +01:00
Julien Lepiller f31ce9ecf1
import: opam: Parse comments.
* guix/import/opam.scm: Add comment support in parser.
2019-01-07 22:05:51 +01:00
Julien Lepiller 755e6d4a0a
import: opam: Add updater.
* guix/import/opam.scm (%opam-updater): New variable.
2019-01-07 22:05:45 +01:00
Julien Lepiller 6090b0beb0
import: opam: Add recursive option.
* guix/script/import/opam.scm: Add recursive option.
* guix/import/opam.scm (opam->guix-package): return two values.
(opam-recursive-import): New variable.
2019-01-07 22:05:43 +01:00
Ludovic Courtès 54ddb6a154
lint: Avoid 'dirname' call at the top level.
* guix/scripts/lint.scm (%distro-directory): Wrap in 'mlambda'.
(check-patch-file-names): Adjust accordingly.
2019-01-07 14:41:00 +01:00
Ludovic Courtès 46cf4cd676
Remove (guix build pull).
This module had been unused since commit
5f93d97005 (Oct. 2017).

* guix/build/pull.scm: Delete.
* Makefile.am (MODULES): Remove.
2019-01-07 14:40:59 +01:00
Ludovic Courtès b5f8c2c885
hydra: Compute jobs in an inferior.
Previously we would rely on auto-compilation of all the Guix modules.
The complete evaluation would take ~15mn on berlin.guixsd.org and
require lots of RAM.  This approach should be faster since potentially
only part of the modules are rebuilt.  Furthermore, as a side-effect, it
builds the derivations that 'guix pull' uses.

* build-aux/hydra/gnu-system.scm: Remove 'eval-when' form.
(hydra-jobs): New procedure.
* gnu/ci.scm (package->alist, qemu-jobs, system-test-jobs)
(tarball-jobs): Return strings for the 'license' field.
* guix/self.scm (compiled-guix)[*cli-modules*]: Add (gnu ci).
2019-01-06 21:41:07 +01:00
Ludovic Courtès 012bf5c4c0
lint: Rename checker to 'github-url'.
* guix/scripts/lint.scm (%checkers): Rename 'github-uri' to 'github-url'
to match the documentation.
2019-01-06 00:22:05 +01:00
Ludovic Courtès c070d1423f
git-download: Use 'invoke'.
* guix/build/git.scm (git-fetch): Use 'invoke' instead of 'system*' for
"git submodule update".
2019-01-06 00:22:05 +01:00
Ludovic Courtès 18524466bb
git-download: 'git-fetch' really returns #f upon error.
This allows the fallback code in (guix git-download) to actually run.
Regression introduced in commit 329dabe13b.

Fixes <https://bugs.gnu.org/33911>.
Reported by Björn Höfling <bjoern.hoefling@bjoernhoefling.de>.

* guix/build/git.scm (git-fetch): Guard against 'invoke-error?' and
really return #f upon failure.
2019-01-06 00:22:05 +01:00
Ludovic Courtès a173f09811
ui: It's 2019 now!
* guix/ui.scm (show-version-and-exit): Change year to 2019.
2019-01-05 00:08:04 +01:00
Ludovic Courtès ec651f2562
guix build: Honor '--system' for file-like objects and gexps.
Fixes a bug whereby "guix build -f file.scm -s SYSTEM" would not honor
SYSTEM when 'file.scm' returns a gexp or a file-like object.

* guix/scripts/build.scm (options->derivations): Pass #:system to
'run-with-store' in the 'file-like?' and 'gexp?' cases.
2019-01-05 00:08:04 +01:00
Ludovic Courtès 9ec154f51f
gexp: Lowering a <computed-file> honors SYSTEM and TARGET.
* guix/gexp.scm (computed-file-compiler): Pass #:system and #:target to
'gexp->derivation'.
* tests/gexp.scm ("lower-object, computed-file, #:system"): New test.
2019-01-05 00:08:04 +01:00
Ricardo Wurmus 2a13642b65
import: cran: Default to 'cran repo.
* guix/import/cran.scm (cran-recursive-import): Default to 'cran repo.
2019-01-03 08:34:41 +01:00
Ricardo Wurmus 7bb6420c5a
import: cran: Abort if no description could be fetched.
* guix/import/cran.scm (cran->guix-package): Only proceed if a valid
description could be fetched.
2019-01-03 08:34:41 +01:00
Ricardo Wurmus 632ea817b8
import: cran: Use HTTPS.
* guix/import/cran.scm (%cran-url): Use HTTPS.
2019-01-03 08:34:41 +01:00
Ricardo Wurmus b3d0617a55
import: cran: Download tarballs only once.
* guix/import/cran.scm (download): New procedure.
(fetch-description, description->package): Use it.
2019-01-03 08:34:41 +01:00
Eric Bavier 789fc77bef
refresh: github: updates for origins using 'git-fetch'.
* guix/import/github.scm (updated-github-url): Respond with the repository url
for the 'git-fetch' fetch method.
(github-package?): Simplify boolean expression.
(github-repository, github-user-slash-repository): Strip trailing ".git" from
project if present.
(latest-release)<origin-github-uri>: Recognize a 'git-reference'.
2018-12-31 19:00:23 -06:00
Efraim Flashner c180017b6f
lint: Check for unstable tarballs.
* guix/scripts/lint.scm (check-source-unstable-tarball): New procedure.
(%checkers): Add it.
* tests/lint.scm ("source-unstable-tarball", "source-unstable-tarball:
source #f", "source-unstable-tarball: valid", "source-unstable-tarball:
package named archive", "source-unstable-tarball: not-github",
"source-unstable-tarball: git-fetch"): New tests.
* doc/guix.texi (Invoking guix lint): Document it.
2018-12-27 14:55:54 +02:00
Ludovic Courtès 5923102f7b
pull: Add '--system'.
* guix/scripts/pull.scm (%options): Add '--system'.
(guix-pull): Honor it.
* doc/guix.texi (Invoking guix pull): Document it.
2018-12-27 12:08:25 +01:00
Ludovic Courtès 0ef595b996
offload: Remove unnecessary locking on machine slots.
This extra level of locking turned out to be unnecessary.

* guix/scripts/offload.scm (with-machine-lock): Remove.
(machine-lock-file): Remove.
(acquire-build-slot): Remove surrounding 'with-machine-lock'.
2018-12-26 18:40:49 +01:00
Ludovic Courtès 7f4d102c2f
offload: Remove the "machine choice" lock.
This lock was unnecessary and it led to a contention when many 'guix
offload' processes are polling for available machines.

* guix/scripts/offload.scm (machine-choice-lock-file): Remove.
(choose-build-machine): Remove surrounding 'with-file-lock (machine-lock-file)'.
2018-12-26 18:40:49 +01:00
Ludovic Courtès 10b2834f82
offload: Adjust 'test' and 'status' to the latest changes.
This is a followup to ed7b44370f71126087eb953f36aad8dc4c44109f;
following that commit, 'guix offload test' and 'guix offload status'
would abort with a backtrace instead of clearly diagnosing a missing
'guix' command on the build machine.

* guix/scripts/offload.scm (assert-node-has-guix): Call 'leave' when
NODE is not an inferior.  Remove 'catch' blocks for 'node-repl-error'.
(check-machine-availability): Invoke 'assert-node-has-guix' first.
(check-machine-status): Print a warning when 'remote-inferior' returns #f.
2018-12-25 17:13:43 +01:00
Ludovic Courtès ed7b44370f
offload: Use (guix inferior) instead of (ssh dist node).
Using inferiors and thus 'guix repl' simplifies setup on build
machines (no need to worry about GUILE_LOAD_PATH etc.)

Furthermore, the 'guix repl -t machine' protocol running in a remote
pipe addresses several issues with the current implementation of nodes
and RREPLs in Guile-SSH: fewer round trips, doesn't leave a 'guile
--listen' process behind it, stateless (since a new process is started
each time), more efficient (the SSH channel can be reused), more
reliable (no 'pgrep', 'pkill', and shellology; see
<https://github.com/artyom-poptsov/guile-ssh/issues/11> as an example.)

* guix/ssh.scm (inferior-remote-eval): New procedure.
(send-files): Use it instead of 'make-node' and 'node-eval'.
* guix/scripts/offload.scm (node-guile-version): New procedure.
(node-free-disk-space, transfer-and-offload, node-load)
(choose-build-machine, assert-node-has-guix): Use 'remote-inferior'
instead of 'make-node' and 'inferior-eval' instead of 'node-eval'.
(assert-node-can-import, assert-node-can-export): Likewise, and add
'session' parameter.
(check-machine-availability): Likewise, and add calls to
'close-inferior' and 'disconnect!'.
(check-machine-status): Likewise.
* doc/guix.texi (Daemon Offload Setup): Remove bit related to 'guile' in
$PATH and $GUILE_LOAD_PATH; mention 'guix' alone.
2018-12-24 16:06:32 +01:00
Ludovic Courtès af15fe13b6
ssh: Add 'remote-inferior'.
* guix/inferior.scm (<inferior>)[close]: New field.
(port->inferior): New procedure.
(open-inferior): Rewrite in terms of 'port->inferior'.
(close-inferior): Honor INFERIOR's 'close' field.
(inferior-eval-with-store): Add FIXME comment.
* guix/ssh.scm (remote-inferior): New procedure.
2018-12-24 16:06:32 +01:00
Efraim Flashner c39491829a
scripts: refresh: Allow searching recursively.
* guix/scripts/refresh.scm (refresh-recursive, list-transitive): New
procedures.
(show-help): Document it.
(guix-refresh): Add flags and checks for new options.
* doc/guix.texi (Invoking guix refresh): Document new options.
2018-12-24 12:19:17 +02:00
Arun Isaac 0865d8a8f6
guix: lint: Check for source URIs redirecting to GitHub.
* guix/scripts/lint.scm (check-github-uri): New procedure.
(%checkers): Add it.
* doc/guix.texi (Invoking guix lint): Document it.
* tests/lint.scm ("github-url", "github-url: one suggestion"): New tests.
2018-12-24 08:15:17 +05:30
Ludovic Courtès 62b845c5e2
offload: Display the normalized load in 'guix offload status' output.
Fixes a regression introduced in
bbe66a530a whereby the actual
load (non-normalized) would be displayed.

* guix/scripts/offload.scm (check-machine-status): Add call to
'normalized-load'.
2018-12-23 22:14:15 +01:00
Ludovic Courtès bdf860c2e9
database: Use "write-ahead log" mode and set a long "busy timeout".
This should avoid "database is locked" errors when there's a lot of
concurrency, for instance when offloading simultaneously a lot of
builds.

* guix/store/database.scm (call-with-database): Add two 'sqlite-exec'
calls to set 'journal_mode' and 'busy_timeout'.
2018-12-21 23:50:13 +01:00
Ludovic Courtès b96e05aefd
offload: Recognize build failures due to lack of disk space.
Previously, if a remote build would fail due to lack of disk space, this
would be considered a permanent failure and thus cached as a build
failure if the local daemon runs with '--cache-failures'.

* guix/scripts/offload.scm (transfer-and-offload): Upon
'nix-protocol-error?' call 'node-free-disk-space' and return 1 instead
of 100 if the result if lower than 10 MiB.
2018-12-21 23:50:13 +01:00
Ludovic Courtès 63b0c3eacc
offload: Skip machines that are low on disk space.
Fixes <https://bugs.gnu.org/33378>.

* guix/scripts/offload.scm (node-free-disk-space): New procedure.
(%minimum-disk-space): New variable.
(choose-build-machine): Call 'node-free-disk-space' and take it into
account in addition to LOAD.
(check-machine-status): Display the free disk space.
2018-12-21 23:50:13 +01:00
Ludovic Courtès bbe66a530a
offload: Decompose 'machine-load' into simpler procedures.
* guix/scripts/offload.scm (machine-load): Remove.
(node-load, normalized-load): New procedures.
(choose-build-machine): Call 'open-ssh-session' and 'make-node' from
here; pass the node to 'node-load'.
(check-machine-status): Use 'node-load' instead of 'machine-load'.  Call
'disconnect!' on SESSION.
2018-12-21 23:50:13 +01:00
Ricardo Wurmus 10a1cacb16
import: cran: Try import via CRAN if package is not on Bioconductor.
* guix/import/cran.scm (fetch-description): Return #F on failure.
(cran->guix-package): Retry from CRAN on failure to fetch description from
bioconductor.
2018-12-20 09:42:22 +01:00
Ludovic Courtès 40cc850aeb
download: 'built-in-builders*' relies on the functional cache.
The previous caching strategy, which used STORE as an 'eq?' key, would
no longer work when the functional cache is used because subsequent
store values are not 'eq?'.

* guix/download.scm (built-in-builders*): Rewrite in terms of
'mcached'.
2018-12-19 23:52:25 +01:00
Ludovic Courtès 87b711d200
utils: Memoize 'absolute-dirname'.
* guix/utils.scm (absolute-dirname): Wrap in 'mlambda'.
2018-12-19 23:52:25 +01:00
Ludovic Courtès 0b1be8fd57
packages: Turn 'cache!' into a single-value-return cache.
* guix/packages.scm (cache!): Assume THUNK returns a single value.
(cached): Likewise.
2018-12-19 23:52:24 +01:00
Ludovic Courtès b334674fe5
Use 'mapm' instead of 'sequence' + 'map'.
Previously we'd use the (sequence M (map P L)) idiom just because 'mapm'
was slower (not specialized for the given monad).  This is no longer the
case since commit dcb95c1fc9.

* guix/gexp.scm (lower-inputs): Use (mapm M P L) instead of (sequence
M (map P L)).
(lower-references, gexp->sexp, imported-files): Likewise.
* guix/profiles.scm (profile-derivation): Likewise.
* guix/scripts/environment.scm (inputs->requisites): Likewise.
* guix/scripts/system.scm (copy-closure): Likewise.
2018-12-19 23:52:24 +01:00
Ludovic Courtès 73b0ebdd5e
store: Add 'GUIX_PROFILING' support for the object cache.
* guix/store.scm (profiled?): New procedure.
(record-operation): Use it.
(record-cache-lookup!): New procedure.
(lookup-cached-object): Use it.
2018-12-19 23:52:24 +01:00
Ricardo Wurmus 80eebee9f7
ui: Report profile hooks separately.
* guix/ui.scm (profile-hook-derivation?): New procedure.
(show-what-to-build): Distinguish among BUILD derivations that match
'profile-hook-derivation?'.  Report them separately.
* guix/status.scm (hook-message): New procedure.
(print-build-event): Display profile hooks with readable hook name.
* guix/profiles.scm (info-dir-file, ghc-package-cache-file,
ca-certificate-bundle, glib-schemas, gtk-icon-themes, gtk-im-modules,
xdg-desktop-database, xdg-mime-database, fonts-dir-file, manual-database):
Augment derivation with "type" and "hook" properties.
2018-12-19 23:46:38 +01:00
Julien Lepiller 6e8986c838
build: Add dune-build-system.
* guix/build/dune-build-system.scm,
  guix/build-system/dune.scm: New files.
* Makefile.am (MODULES): Add them.
* doc/guix.texi (Build Systems): Document dune-build-system.
* guix/build-system/ocaml.scm (lower, default-findlib, default-ocaml): Export
them.
(package-with-explicit-ocaml): Also transform packages built with
dune-build-system.
2018-12-18 22:16:23 +01:00
swedebugia bd5a81f9b8
guix system: Clarify the three strategies available.
* guix/scripts/system.scm (show-help): Clarify the three choices.
* doc/guix.texi (Invoking guix system): Add 3 @cindex to make on-error=strategy
easier to find.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2018-12-18 16:04:25 +01:00
Timothy Sample 6616a35202
ui: Report file names in 'system-error' exceptions from 'execlp'.
Fixes <https://bugs.gnu.org/33755>.

* guix/ui.scm (apply-formals): New macro.
(execlp): New error-reporting wrapper.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2018-12-18 16:04:25 +01:00
Ludovic Courtès 9b9de08477
publish: Add a 'Cache-Control' header on /nar responses.
Fixes <https://bugs.gnu.org/33721>.
Reported by Chris Marusich <cmmarusich@gmail.com>.

* guix/scripts/publish.scm (render-nar/cached): Add #:ttl and honor it.
(make-request-handler): Pass #:ttl to 'render-nar/cached'.
* tests/publish.scm ("with cache, uncompressed"): Pass "--ttl=42h" to
'guix publish'.  Check 'Cache-Control' on narinfo response and on nar
response.
2018-12-17 23:33:42 +01:00
Ludovic Courtès a93c160631
environment: Support package transformation options.
Fixes <https://bugs.gnu.org/33776>.
Reported by Adrien Guilbaud <adrien.guilbaud@inria.fr>.

* guix/scripts/environment.scm (show-help): Add call to
'show-transformation-options-help'.
(%options): Add %TRANSFORMATION-OPTIONS.
(options/resolve-packages): Add 'store' parameter.
[transform, package->manifest-entry*]: New procedures.
Use 'package->manifest-entry*' instead of 'package->manifest-entry'.
(guix-environment): Move definition of 'manifest' within 'with-store'.
* tests/guix-environment.sh: Add test.
2018-12-17 23:33:42 +01:00
Julien Lepiller cce654fabd
import: Update opam importer.
* guix/import/opam.scm: Update importer for opam 2.
* tests/opam.scm: Update tests for the opam 2 importer.
2018-12-17 21:43:51 +01:00
Ludovic Courtès adb158b739
deduplication: Gracefully handle ENOSPC raised by 'link' calls.
Reported by Andreas Enge <andreas@enge.fr>
in <https://bugs.gnu.org/33676>.

* guix/store/deduplication.scm (replace-with-link): Catch ENOSPC around
'get-temp-link'.  Do nothing when 'get-temp-link' throws ENOSPC.  Move
code to restore PARENT's permissions outside of 'catch'.
* tests/store-deduplication.scm ("deduplicate, ENOSPC"): New test.
2018-12-14 12:07:24 +01:00
Ludovic Courtès 60b04024f8
substitute: Ignore irrelevant narinfo signatures.
Fixes <https://bugs.gnu.org/33733>.

Fixes a bug whereby 'guix substitute' would accept narinfos whose
signature does not cover the StorePath/NarHash/References tuple.

* guix/scripts/substitute.scm (narinfo-sha256)[%mandatory-fields]: New
variable.
Compute SIGNED-FIELDS; return #f unless each of the %MANDATORY-FIELDS
is among SIGNED-FIELDS.
 * tests/substitute.scm ("query narinfo with signature over nothing")
("query narinfo with signature over irrelevant bits"): New tests.
2018-12-14 00:02:59 +01:00
Eric Bavier cba7ddcf60
refresh: Account for overlapping updater coverage.
* guix/scripts/refresh.scm (list-updaters-and-exit): Do not assume updater
predicates are disjoint.  Track covered packages directly.
2018-12-10 19:59:01 -06:00
Ricardo Wurmus af12790bdd
guix: Add support for channel dependencies.
* guix/channels.scm (<channel-metadata>): New record.
(read-channel-metadata, channel-instance-dependencies): New procedures.
(latest-channel-instances): Include channel dependencies; add optional
argument PREVIOUS-CHANNELS.
(channel-instance-derivations): Build derivation for additional channels and
add it as dependency to the channel instance derivation.
* doc/guix.texi (Channels): Add subsection "Declaring Channel Dependencies".
* tests/channels.scm: New file.
* Makefile.am (SCM_TESTS): Add it.
2018-12-09 13:55:22 +01:00
Ludovic Courtès 6ddc63e599
guix system: Fix bootloader config file generation by 'guix system roll-back'.
Fixes <https://bugs.gnu.org/33623>.
Reported by Diego Nicola Barbato <dnbarbato@posteo.de>.

Regression introduced in commit
46c296dcc4.

* guix/scripts/system.scm (reinstall-bootloader): Add call to
'lower-object'.
2018-12-07 15:14:12 +01:00
Ludovic Courtès ed9c8eb4e5
describe: In 'channels' format, quote the channel name.
Fixes a regression introduced in
commit 8548f99549.

* guix/scripts/describe.scm (channel->sexp): Quote the channel name.
2018-12-07 15:14:12 +01:00
Ludovic Courtès 7bc5657f84
grafts: Mark as non substitutable.
* guix/grafts.scm (graft-derivation/shallow): Pass #:substitutable? to
'build-expression->derivation'.
2018-12-04 10:57:56 +01:00
Ludovic Courtès 9300e2e893
refresh: '--list-dependents' ignores deprecated packages.
* guix/scripts/refresh.scm (all-packages): Filter out deprecated packages.
2018-12-04 10:57:56 +01:00
Ludovic Courtès 0a5fa004f7
build: Default to https://ci.guix.info for substitutes.
* config-daemon.ac (guix_substitute_urls): Always default to
"https://ci.guix.info".
* doc/guix.texi (SUBSTITUTE-SERVER): Switch to ci.guix.info.
* guix/scripts/build.scm (%default-log-urls): Likewise.
* guix/scripts/substitute.scm (%default-substitute-urls): Likewise.
* guix/store.scm (%default-substitute-urls): Likewise.
2018-12-04 10:57:56 +01:00
Ludovic Courtès 0bc02becca
Remove most references to hydra.gnu.org.
* Makefile.am (assert-binaries-available): Don't mention hydra.gnu.org
in comment.
* build-aux/check-available-binaries.scm: Likewise.
* build-aux/check-final-inputs-self-contained.scm: Likewise.
* doc/guix.texi (SUBSTITUTE-SERVER): New variable.
Use it throughout instead of "mirror.hydra.gnu.org".
* doc/contributing.texi (Submitting Patches): Likewise.
* gnu/services/base.scm (hydra-key-authorization)
(guix-activation): Remove mentions of "hydra.gnu.org" in comments and
messages.
* gnu/system/install.scm (%installation-services): Likewise.
* guix/scripts/size.scm (guix-size): Likewise.
2018-12-04 10:57:56 +01:00
Ludovic Courtès 6a837b6062
etc: Add "ci.guix.info.pub" public key file.
* etc/substitutes/ci.guix.info.pub: New file.
* Makefile.am (dist_pkgdata_DATA): Add it.
* guix/self.scm (miscellaneous-files): Add
"share/guix/ci.guix.info.pub".
2018-12-04 10:57:56 +01:00
Björn Höfling b8ca5b3146
hg-fetch: Remove .hg directories of sub-repositories.
* guix/build/hg.scm (hg-fetch): Remove all .hg directories recursively.
2018-12-03 12:29:08 +01:00
Ludovic Courtès 194451347d
Merge branch 'core-updates' 2018-12-03 08:52:17 +01:00
Oleg Pykhalov 37c6f11f8d
repl: Load user's initialization file.
* guix/scripts/repl.scm (guix-repl): Load user's initialization file.
2018-12-03 08:04:51 +03:00
Ludovic Courtès 2d33776050
self: Provide UTF-8 locales when building the manual.
Fixes <https://bugs.gnu.org/33580>.
Reported by <znavko@tutanota.com>.

* guix/self.scm (info-manual)[glibc-utf8-locales]: New variable.
[build]: Add call to 'setenv' for "GUIX_LOCPATH".
2018-12-02 22:53:22 +01:00
Ludovic Courtès a3d77c51bc
git: Nicely report '--with-commit' errors.
* guix/git.scm (latest-repository-commit*): Rewrite to catch
'git-error'.
* po/guix/POTFILES.in: Add guix/git.scm.
* tests/guix-build-branch.sh: Test --with-commit errors.
2018-11-30 17:03:04 +01:00
Ludovic Courtès b18f7234aa
guix build: Add '--with-commit'.
* guix/git.scm (<git-checkout>)[commit]: New field.
(git-checkout-compiler): Honor it.
* guix/scripts/build.scm (evaluate-git-replacement-specs): Add 'proc'
parameter and honor it.
(transform-package-source-branch)[replace]: New procedure.
Adjust 'evaluate-git-replacement-specs' accordingly.
(transform-package-source-commit): New procedure.
(%transformations, %transformation-options)
(show-transformation-options-help): Add 'with-commit'.
* tests/guix-build-branch.sh: Add test.
* doc/guix.texi (Package Transformation Options): Document it.
2018-11-30 17:03:04 +01:00
Ludovic Courtès 96915a448c
guix build: Add '--with-branch' transformation option.
* guix/scripts/build.scm (evaluate-git-replacement-specs)
(transform-package-source-branch): New procedures.
(%transformations, %transformation-options): Add 'with-branch'.
(show-transformation-options-help): Likewise.
* tests/guix-build-branch.sh: New file.
* Makefile.am (SH_TESTS): Add it.
* doc/guix.texi (Package Transformation Options): Document it.
2018-11-30 17:03:04 +01:00
Ludovic Courtès 49ae3f6d89
git: Add <git-checkout> record type.
* guix/git.scm (<git-checkout>): New record type.
(latest-repository-commit*): New procedure.
(git-checkout-compiler): New gexp compiler.
2018-11-30 17:03:04 +01:00
Ludovic Courtès 35cb37ea9c
git: 'latest-repository-commit' logs its progress.
* guix/git.scm (latest-repository-commit): Add #:log-port and honor it.
2018-11-30 17:03:03 +01:00
Marius Bakke 25ca46985c
Merge branch 'master' into core-updates 2018-11-29 15:56:49 +01:00
Ludovic Courtès d09ce3f91b
docker: Hide scary-looking but harmless tar failure messages.
* guix/docker.scm (build-docker-image): Wrap "tar --delete" invocation
in 'with-error-to-port'.
2018-11-29 09:30:00 +01:00
Ludovic Courtès 13bcc6b45f
download: Add berlin.guixsd.org as a content-addressed mirror.
* guix/download.scm (%content-addressed-mirrors)[guix-publish]: New
procedure.
Use it for "mirror.hydra.gnu.org" and add "berlin.guixsd.org" too.
2018-11-28 22:25:34 +01:00
Ludovic Courtès a52ae1b662
download: Make (guix base16) a soft dependency.
Fixes <https://bugs.gnu.org/33542>.
Reported by Mark H Weaver <mhw@netris.org>.

* guix/download.scm (%content-addressed-mirrors): Autoload (guix base16).
2018-11-28 22:25:34 +01:00
Tim Gesthuizen e91152e9f2
guix hash: Fix version and help messages
ca71942445 changes the name of the executable to
be displayed by the --version and --help commands of `guix hash` to
"gcrypt hash".
This is reverted by this commit.

* guix/scripts/hash.scm (show-help): Change string literals

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2018-11-28 10:39:58 +01:00
Ludovic Courtès fe5db4eb03
channels: Add 'checkout->channel-instance'.
* guix/channels.scm (checkout->channel-instance): New procedure.
2018-11-28 10:39:58 +01:00
Ludovic Courtès 94c0e61fe7
inferior: Add 'inferior-eval-with-store'.
* guix/inferior.scm (inferior-eval-with-store): New procedure, with code
formerly in 'inferior-package-derivation'.
(inferior-package-derivation): Rewrite in terms of
'inferior-eval-with-store'.
* tests/inferior.scm ("inferior-eval-with-store"): New test.
2018-11-28 10:39:58 +01:00
Ludovic Courtès d4aa147eec
ui: 'show-what-to-build' reports grafts separately.
* guix/ui.scm (graft-derivation?): New procedure.
(show-what-to-build): Distinguish among BUILD derivations that match
'graft-derivation?'.  Report them separately.
2018-11-28 10:39:58 +01:00
Ludovic Courtès af1f1c38fb
status: Report grafting derivations specially.
* guix/status.scm (print-build-event): In 'build-started' event handler,
check the properties of DRV and handle 'graft' derivations specially.
2018-11-28 10:39:58 +01:00
Ludovic Courtès 64fd1c01bc
grafts: Record metadata as derivation properties.
* guix/grafts.scm (graft-derivation/shallow): Pass #:properties to
'build-expression->derivation'.
* tests/grafts.scm ("graft-derivation, grafted item is a direct
dependency"): Check the value returned by 'derivation-properties'.
2018-11-28 10:39:58 +01:00
Ludovic Courtès 8856f409d1
derivations: Add properties.
* guix/derivations.scm (derivation): Add #:properties parameter.
[user+system-env-vars]: Honor it.
(derivation-properties): New procedure.
(build-expression->derivation): Add #:properties and pass it to
'derivation'.
* guix/gexp.scm (gexp->derivation): Likewise.
* tests/derivations.scm ("derivation-properties"): New test.
* tests/gexp.scm ("gexp->derivation properties"): New test.
* doc/guix.texi (Derivations, G-Expressions): Adjust accordingly.
2018-11-28 10:39:58 +01:00
Efraim Flashner db08ea4087
pack: List the available formats.
* guix/scripts/pack.scm (show-formats): New variable.
(%options, show-help): Add 'list-formats' option.
2018-11-27 19:23:39 +02:00
Oleg Pykhalov 01262f1ece
describe: Delete 'directory' argument from 'display-checkout-info'.
This commit follows 1255400faa.

* guix/scripts/describe.scm (display-checkout-info): Delete 'directory'
argument.
2018-11-27 20:09:03 +03:00
Ludovic Courtès ee6b3bb60d
swh: Export 'save-origin' and related bindings.
* guix/swh.scm: Export bindings related to 'save-origin'.
2018-11-27 12:12:33 +01:00
Oleg Pykhalov 3133d678a8
repl: Do not exit repl on SIGINT.
* guix/scripts/repl.scm (guix-repl): Do not exit repl on SIGINT.
2018-11-26 15:08:05 +03:00
Ludovic Courtès 608d3dca89
git-download: Download from Software Heritage as a last resort.
* guix/git-download.scm (git-fetch)[inputs]: Add gzip and tar when
'git-reference-recursive?' is false.
[guile-json, gnutls]: New variables.
[modules]: Add (guix swh).
[build]: Wrap in 'with-extensions'.  Add call to 'swh-download'.
2018-11-26 11:10:20 +01:00
Ludovic Courtès de2bfe9029
Add (guix swh).
* guix/swh.scm: New file.
* Makefile.am (MODULES): Add it.
2018-11-26 11:10:20 +01:00
Ludovic Courtès 3b5829bbcb
git-download: Use 'git-minimal' instead of 'git'.
* guix/git-download.scm (git-package): Refer to 'git-minimal'.
2018-11-26 11:10:20 +01:00
Ludovic Courtès 63fd9f084a
ssh: Make 'send-files' more robust.
Possibly fixes <https://bugs.gnu.org/33239>.

* guix/ssh.scm (send-files): Call 'channel-get-exit-status' only when
RESULT is true.
2018-11-24 19:52:16 +01:00
Marius Bakke 4820b75de0
Merge branch 'master' into core-updates 2018-11-24 19:44:05 +01:00
Jelle Licht 3fe6fcc45f
build-system: clojure-build-system: Fix %default-clojure location.
* guix/build-system/clojure.scm (%default-clojure): Use new package path.
2018-11-24 16:25:55 +01:00
Marius Bakke 4d8f4a3f00
Merge branch 'master' into core-updates 2018-11-24 01:58:18 +01:00
Ludovic Courtès 08f410834b
pack: Add '--profile-name'.
* guix/scripts/pack.scm (self-contained-tarball): Add #:profile-name and
honor it.
(squashfs-image, docker-image): Add #:profile-name.
(%default-options): Add 'profile-name'.
(%options, show-help): Add "--profile-name".
(guix-pack): Honor it.
* tests/guix-pack-localstatedir.sh: New file.
* Makefile.am (SH_TESTS): Add it.
* doc/guix.texi (Invoking guix pack): Document "--profile-name".
2018-11-23 15:42:01 +01:00
Ludovic Courtès 694e638e78
status: Display 'build-remote' events.
* guix/status.scm (print-build-event): Add clause for 'build-remote'.
2018-11-23 15:42:00 +01:00
Ludovic Courtès 60e1c1099f
Update Guile-SQLite3 URL everywhere.
* README: Update Guile-SQLite3 URL.
* doc/guix.texi (Requirements): Likewise.
* guix/store/database.scm (sqlite-exec): Likewise.
* m4/guix.m4 (GUIX_CHECK_GUILE_SQLITE3): Likewise.
2018-11-23 15:42:00 +01:00
Oleg Pykhalov 85e9c4b919
describe: Add recutils format.
* guix/scripts/describe.scm (channel->recutils): New procedure.
(display-checkout-info, display-profile-info): Use this.
(%options): Add 'recutils' option.
* doc/guix.texi (Invoking guix describe): Document this.
2018-11-22 21:17:55 +03:00
Oleg Pykhalov 81a40ee0cb
describe: Add json format.
* guix/scripts/describe.scm (channel->json): New procedure.
(display-checkout-info, display-profile-info): Use this.
(%options): Add 'json' option.
* doc/guix.texi (Invoking guix describe): Document this.
2018-11-22 21:17:54 +03:00
Oleg Pykhalov 8548f99549
describe: Use a procedure to format output.
* guix/scripts/describe.scm (channel->sexp): New procedure.
(display-checkout-info, display-profile-info): Use this.
2018-11-22 21:17:38 +03:00
Marius Bakke ec8130eb23
Merge branch 'master' into core-updates 2018-11-22 00:10:44 +01:00
Ludovic Courtès a29ce1f97d
guix system: Fix 'init' again.
Fixes a regression introduced in
52ee4479ef, whereby 'install' would now be
passed a procedure instead of a lowerable object.

* guix/scripts/system.scm (perform-action): Pass BOOTLOADER-SCRIPT as
the #:bootloader-installer argument of 'install'.
2018-11-21 23:26:58 +01:00
Efraim Flashner 9cf4ff199c
Merge remote-tracking branch 'origin/master' into core-updates 2018-11-21 19:41:43 +02:00
Oleg Pykhalov 1255400faa
describe: Add profile option.
* guix/scripts/describe.scm (%options): Add profile option.
(show-help): Document this.
(display-checkout-info): Check for profile argument.
* doc/guix.texi (Invoking guix describe): Document this.
2018-11-21 14:41:13 +03:00
Oleg Pykhalov 3dd28aa37c
describe: Fix 'format' option.
Fix ‘guix describe’ ignores ‘--format=FORMAT’ option.

* guix/scripts/describe.scm (%options): Fix 'format' option.
2018-11-21 14:41:13 +03:00
Ludovic Courtès 40bbcaa65d
lint: 'check-derivation' fully disables grafts.
Previously grafting could take place indirectly, for instance when
lowering origins.

* guix/scripts/lint.scm (check-derivation)[try]: Parameterize
'%graft?'.
2018-11-20 18:36:05 +01:00
Ludovic Courtès 3b32891b12
lint: 'check-derivation' tries all the package's supported systems.
This allows us to catch architecture-specific evaluation failures.

* guix/scripts/lint.scm (check-derivation): Move body into...
[try]: ... this.  New procedure.
Call 'try' for each supported system of PACKAGE.
2018-11-20 18:36:05 +01:00
Marius Bakke 4f70db97a0
Merge branch 'master' into core-updates 2018-11-20 01:14:12 +01:00
Alex Vong df730f6757
build-system: Add 'clojure-build-system'.
* guix/build-system/clojure.scm, guix/build/clojure-build-system.scm: New
files.
* guix/build/clojure-utils.scm (@*, @@*): New macros.
(%source-dirs, %test-dirs, %compile-dir, %main-class, %omit-source?,
%aot-include, %aot-exclude, %tests?, %test-include, %test-exclude,
%clojure-regex): New variables.
(package-name->jar-names, canonicalize-relative-path, find-files*,
file-sans-extension, relative-path->clojure-lib-string, find-clojure-libs,
compiled-from?, include-list\exclude-list, eval-with-clojure, create-jar):
New procedures.
* Makefile.am (MODULES): Add them.
* doc/guix.texi (Build Systems): Document 'clojure-build-system'.
2018-11-19 12:07:44 +01:00
Alex Vong 53f316ab90
guix: Add clojure-utils.
* guix/build/clojure-utils.scm: New file.
* gnu/packages/lisp.scm (clojure)[arguments]: Use it.
* Makefile.am (MODULES): Add it.
2018-11-19 12:05:19 +01:00
Ludovic Courtès 1d6669afef
guix system: Fix 'init'.
Fixes a regression introduced in
52ee4479ef, whereby 'install' would now be
passed a <computed-file> object instead of a derivation.

* guix/scripts/system.scm (install): Call 'lower-object' on BOOTCFG.
2018-11-19 09:59:07 +01:00
Ludovic Courtès ab6caf4f1d
guix system: Clarify 'perform-action'.
* guix/scripts/system.scm (perform-action): Move non-monadic local
variables outside the 'mlet' form.
2018-11-18 23:37:45 +01:00
Ludovic Courtès 52ee4479ef
guix system: De-monadify bootloader installation script.
* guix/scripts/system.scm (bootloader-installer-derivation): Rename
to...
(bootloader-installer-script): ... this.  Use 'scheme-file' instead of
'gexp->file'.
(perform-action): Adjust accordingly.  Move 'lower-object' call to the
point where DRVS is computed.
2018-11-18 23:37:45 +01:00
Ludovic Courtès 6e47628d4c
guix system: Simplify bootloader package handling.
* guix/scripts/system.scm (perform-action): Remove 'bootloader-package'
variable.  Pass (bootloader-package bootloader) as the 2nd argument to
'bootloader-installer-derivation'.  Remove BOOTLOADER-PACKAGE from DRVS
since it's redundant.
2018-11-18 23:37:45 +01:00
Ludovic Courtès 9782c82217
system: De-monadify 'operating-system-bootcfg'.
* gnu/system.scm (operating-system-bootcfg): Remove 'mlet*' and
'lower-object' call.
* gnu/system/vm.scm (system-disk-image)
(system-qemu-image/shared-store): Adjust accordingly.
* guix/scripts/system.scm (perform-action): Add 'lower-object' call for
BOOTCFG.
2018-11-18 23:37:45 +01:00
Julien Lepiller 564cf93f2a
gnu: ocaml: Update to 4.7.0.
Update ocaml to the latest version and fixes dependent packages by
updating them or by adding new inputs, such as ocaml-num and ocamlbuild,
that were removed from the core ocaml package. Rename packages that
cannot be built with the new compiler with an ocaml4.02 prefix. Add
ocaml4.02 dependencies.

* gnu/packages/ocaml.scm (ocaml): Update to 4.7.0.
(ocaml-4.02, ocamlbuild, camlp4-4.02, ocaml-num, ocaml4.02-menhir)
(ocaml4.02-lablgtk, ocaml4.02-findlib, ocaml4.02-ounit, ocaml4.02-camlzip)
(ocaml4.02-ocamlmod, ocaml4.02-zarith, ocaml4.02-qcheck, ocaml4.02-qtest)
(ocaml4.02-stringext, ocaml4.02-bisect, dune, ocaml-migrate-parsetree)
(ocaml-ppx-tools-versioned, ocaml-ppx-tools-versioned)
(ocaml4.02-bitstring, ocaml4.02-result, ocaml4.02-topkg, ocaml4.02-rresult)
(ocaml4.02-sqlite3, ocaml4.02-csv, ocaml4.02-mtime, ocaml4.02-cmdliner)
(ocaml4.02-fmt, ocaml4.02-astring, ocaml4.02-alcotest, ocaml4.02-ppx-tools)
(ocaml4.02-react, ocaml4.02-ssl, ocaml4.02-lwt, ocaml-lwt-log)
(ocaml4.02-lwt-log, ocaml4.02-logs, ocaml4.02-fpath, ocaml4.02-bos)
(ocaml4.02-xmlm, ocaml4.02-ulex, ocaml4.02-uchar, ocaml4.02-uutf)
(ocaml4.02-jsonm, ocaml4.02-ocurl, ocaml4.02-base64, ocaml4.02-omake)
(ocaml4.02-batteries, ocaml4.02-pcre, ocaml4.02-oasis)
(ocaml4.02-js-build-tools, ocaml4.02-cppo, ocaml-seq, ocaml4.02-seq)
(ocaml4.02-re, ocaml4.02-ocplib-endian, ocaml4.02-easy-format)
(ocaml4.02-piqilib, ocaml4.02-uuidm, ocaml4.02-graph, ocaml4.02-piqi)
(ocaml4.02-camomile, ocaml4.02-zed, ocaml4.02-lambda-term): New packages.
(opam): Update to 2.0.0.
(camlp4): Update to 4.07+1.
(camlp5): Update to 7.06.
(hevea): Update to 2.32.
(coq)[inputs]: Add ocaml-num.
(emacs-tuareg): Update to 2.2.0.
(ocaml-menhir)[native-inputs]: Add ocamlbuild.
(ocaml-lablgtk): Update to 2.18.6.
(unison)[inputs]: Use ocaml-4.02.
(ocaml-findlib): Update to 1.8.0.
(ocaml-ounit)[native-inputs]: Add ocamlbuild.
(ocamlmod): Update to 0.0.9.
(ocaml-frontc)[arguments]: Use ocaml-4.02.
(ocaml-qcheck)[native-inputs]: Add ocamlbuild.
(ocaml-qtest)[native-inputs]: Remove ocaml-findlib and add ocamlbuild.
(ocaml-stringext)[native-inputs]: Add ocamlbuild.
(ocaml-bisect): Update to 1.3.1.
(ocaml4.01-bisect): Downgrade to 1.3.
(ocaml-bitstring): Update to 3.1.0.
(ocaml-topkg)[native-inputs]: Add ocamlbuild.
(ocaml-rresult)[native-inputs]: Add ocamlbuild.
(ocaml-sqlite3)[native-inputs]: Add ocamlbuild.
(ocaml-csv)[native-inputs]: Add ocamlbuild.
(ocaml-mtime)[native-inputs]: Add ocamlbuild.
(ocaml-cmdliner)[native-inputs]: Add ocamlbuild.
(ocaml-fmt)[native-inputs]: Add ocamlbuild.
(ocaml-astring)[native-inputs]: Add ocamlbuild.
(ocaml-alcotest)[native-inputs]: Add ocamlbuild.
(ocaml-ppx-tools)[native-inputs]: Add ocamlbuild.
(ocaml-react)[native-inputs]: Add ocamlbuild.
(ocaml-ssl)[arguments]: Return #t in phases.
(ocaml-lwt): Update to 4.1.0.
(ocaml-logs)[native-inputs]: Add ocamlbuild.
(ocaml-fpath)[native-inputs]: Add ocamlbuild.
(ocaml-bos)[native-inputs]: Add ocamlbuild.
(ocaml-xmlm): Update to 1.3.0.
(ocaml-ulex): Update to 1.2.0.
(ocaml-uchar)[native-inputs]: Add ocamlbuild.
(ocaml-uutf): Update to 1.0.1.
(ocaml-jsonm): Update to 1.0.1.
(ocaml-ocurl): Update to 0.8.2.
(ocaml-base64)[native-inputs]: Add ocamlbuild.
(ocamlify)[native-inputs]: Use ocaml-4.02.
(omake): Update to 0.10.3.
(ocaml-batteries): Update to 2.9.0.
(ocaml-pcre)[native-inputs]: Add ocamlbuild.
(ocaml-expect): Update 0.0.6.
(ocaml4.02-fileutils): Update to 0.5.3.
(ocaml-oasis): Update 0.4.11.
(ocaml-js-build-tools)[native-inputs]: Add ocamlbuild.
(ocaml-bin-prot): Rename to ocaml4.02-bin-prot.
(ocaml-fieldslib): Rename to ocaml4.02-fieldslib.
(ocaml-ppx-core): Rename to ocaml4.02-ppx-core.
(ocaml-ppx-optcomp): Rename to ocaml4.02-ppx-optcomp.
(ocaml-ppx-driver): Rename to ocaml4.02-ppx-driver.
(ocaml-cppo): Update to 1.6.5.
(ocaml-ppx-deriving): Rename to ocaml4.02-ppx-deriving.
(ocaml-ppx-type-conv): Rename to ocaml4.02-ppx-type-conv.
(ocaml-ppx-inline-test): Rename to ocaml4.02-ppx-inline-test.
(ocaml-ppx-bench): Rename to ocaml4.02-ppx-bench.
(ocaml-ppx-compare): Rename to ocaml4.02-ppx-compare.
(ocaml-sexplib): Rename to ocaml4.02-sexplib.
(ocaml-typerep): Rename to ocaml4.02-typerep.
(ocaml-variantslib): Rename to ocaml4.02-variantslib.
(ocaml-ppx-sexp-conv): Rename to ocaml4.02-ppx-sexp-conv.
(ocaml-ppx-variants-conv): Rename to ocaml4.02-ppx-variants-conv.
(ocaml-ppx-here): Rename to ocaml4.02-ppx-here.
(ocaml-ppx-assert): Rename to ocaml4.02-ppx-assert.
(ocaml-ppx-enumerate): Rename to ocaml4.02-ppx-enumerate.
(ocaml-ppx-let): Rename to ocaml4.02-ppx-let.
(ocaml-ppx-typerep-conv): Rename to ocaml4.02-ppx-typerep-conv.
(ocaml-ppx-sexp-value): Rename to ocaml4.02-ppx-sexp-value.
(ocaml-ppx-pipebang): Rename to ocaml4.02-ppx-pipebang.
(ocaml-ppx-bin-prot): Rename to ocaml4.02-ppx-bin-prot.
(ocaml-ppx-fail): Rename to ocaml4.02-ppx-fail.
(ocaml-ppx-custom-printf): Rename to ocaml4.02-ppx-custom-printf.
(ocaml-ppx-sexp-message): Rename to ocaml4.02-ppx-sexp-message.
(ocaml-ppx-fields-conv): Rename to ocaml4.02-ppx-fields-conv.
(ocaml-re): Update to 1.8.0.
(ocaml-ppx-expect): Rename to ocaml4.02-ppx-expect.
(ocaml-ppx-jane): Rename to ocaml4.02-ppx-jane.
(ocaml-core-kernel): Rename to ocaml4.02-core-kernel.
(ocaml-async-kernel): Rename to ocaml4.02-async-kernel.
(ocaml-async-rpc-kernel): Rename to ocaml4.02-async-rpc-kernel.
(ocaml-core): Rename to ocaml4.02-core.
(ocaml-async-unix): Rename to ocaml4.02-async-unix.
(ocaml-async-extra): Rename to ocaml4.02-async-extra.
(ocaml-async): Rename to ocaml4.02-async.
(ocaml-ocplib-endian)[native-inputs]: Update to 1.0.
(ocaml-cstruct): Rename to ocaml4.02-cstruct.
(ocaml-hex): Rename to ocaml4.02-hex.
(ocaml-ezjsonm): Rename to ocaml4.02-ezjsonm.
(ocaml-uri): Rename to ocaml4.02-uri.
(optcomp): Use ocaml-4.02.
(ocaml-piqilib): Update to 0.6.14.
(ocaml-uuidm)[native-inputs]: Add ocamlbuild.
(ocaml-graph): Update to 1.8.8.
(ocaml-piqi): Update to 0.7.6.
(bap): Update to 1.3.0.
(ocaml-camomile): Update to 1.0.1.
(ocaml-jbuilder): Use ocaml-4.02.
(ocaml-lambda-term): Update to 1.13.
(ocaml-utop): Update to 2.2.0.
(ocaml-integers)[native-inputs]: Add ocamlbuild.
(ocaml-ctypes): Update to 0.14.0.
(ocaml-ocb-stubblr)[native-inputs]: Add ocamlbuild.
(ocaml-tsdl)[native-inputs]: Add ocamlbuild.
* gnu/packages/machine-learning.scm (ocaml-mcl): Use ocaml-4.02.
* gnu/packages/maths.scm (cubicle): Update to 1.1.2.
* gnu/packages/patches/ocaml-bisect-fix-camlp4-in-another-directory.patch:
Update patch.
* guix/build-system/ocaml.scm: (default-ocaml4.02, default-ocaml4.02-findlib)
(package-with-ocaml4.02, strip-ocaml4.02-variant): New variables.
2018-11-18 18:51:08 +01:00
Julien Lepiller 5a0affba3f
build-system/ocaml: Use invoke and return #t.
* guix/build/ocaml-build-system.scm (configure, build, check, install)
(prepare-install): Use invoke and return #t.
2018-11-18 18:40:53 +01:00
Clément Lassieur d827fd31ca
progress: Do not display the last 0B transfer when size is unknown.
* guix/progress.scm (display-download-progress): Don't display anything when
both SIZE and TRANSFERRED are null.
2018-11-16 14:53:44 +01:00
Clément Lassieur 0289dc1473
progress: Fix crash because of division by zero.
* guix/progress.scm (display-download-progress): Handle the case where SIZE is
null.
2018-11-16 14:53:40 +01:00
Ludovic Courtès 89f1fee8e7
download: Access content-addressed mirrors over HTTPS.
Bug <http://bugs.gnu.org/22774> is no longer relevant now that we use
"builtin:download" exclusively.

* guix/download.scm (%content-addressed-mirrors): Use "https", not
"http".
2018-11-14 21:34:08 +01:00
Ludovic Courtès ee2cfdfe86
download: Add Software Heritage as a content-addressed mirror.
* guix/download.scm (%content-addressed-mirrors): Add Software
Heritage.
2018-11-14 21:34:07 +01:00
Marius Bakke 79ee97a144
Merge branch 'master' into core-updates 2018-11-14 21:20:46 +01:00
Ludovic Courtès f5a2724ae4
deduplication: Restore directory mtime and permissions after deduplication.
Fixes <https://bugs.gnu.org/33361>.

* guix/store/deduplication.scm (replace-with-link): Call 'set-file-time'
and 'chmod' after 'rename-file'.
* tests/nar.scm ("restore-file-set with directories (signed, valid)"):
New test.
2018-11-13 14:59:46 +01:00
Ludovic Courtès 8390869811
tests: Check file canonicalization for 'restore-file-set'.
* guix/tests.scm (canonical-file?): New procedure.
* tests/nar.scm ("restore-file-set (signed, valid)"): Check that every
item of FILES matches 'canonical-file?'.
2018-11-13 14:59:46 +01:00
Ludovic Courtès 1afe1985f5
nar: Access the database instead of connecting to the daemon.
* guix/store/database.scm (%default-database-file): New variable.
(path-id): Export.
* guix/nar.scm (finalize-store-file): Use 'with-database' instead of
'with-store', and use 'path-id' instead of 'valid-path?'.
2018-11-13 14:59:45 +01:00
Ricardo Wurmus 05a5721f06
build-system/dub: Let all phases return #T unconditionally.
* guix/build/dub-build-system.scm (configure, build, check): Return #T
unconditionally; use INVOKE.
2018-11-13 10:46:00 +01:00
Ludovic Courtès c6080c3249
store: Add a functional object cache and use it in 'lower-object'.
This leads to ~25% improvements on things like:

  guix system build desktop.tmpl --no-grafts -d

* guix/store.scm (<nix-server>)[object-cache]: New field.
* guix/store.scm (open-connection): Initialize it.
(cache-object-mapping, lookup-cached-object, %mcached): New procedures.
(mcached): New macro.
* guix/gexp.scm (lower-object): Use it.
* guix/grafts.scm (grafting?): New procedure.
2018-11-12 23:37:13 +01:00
Ludovic Courtès 9ed86fe175
tests: Add 'test-assertm' to (guix tests).
* guix/tests.scm (test-assertm): New macro.
* tests/gexp.scm (test-assertm): Remove.
* tests/profiles.scm (test-assertm): Remove.
* tests/challenge.scm (%store, test-assertm): Remove.
* tests/debug-link.scm (%store, test-assertm): Remove.
* tests/size.scm (%store, test-assertm): Remove.
2018-11-12 23:37:13 +01:00
Ricardo Wurmus 1767581fb5
build-system/haskell: Fix register phase.
This is a follow-up to commit a7e231a2a3.

Reported by Marius Bakke <mbakke@fastmail.com>.

* guix/build/haskell-build-system.scm (register): Use "when" instead of
"unless".
2018-11-12 18:21:04 +01:00
Pierre Neidhardt 0fd115d536
build-system/go: Plan removal of the pkg folder for go-1.11 onward.
* guix/build/go-build-system.scm (install): New comment.
2018-11-12 10:28:46 +01:00
Ludovic Courtès 6c843907e9
guix system: Invoking 'guix system init' twice keeps timestamps zeroed.
Fixes a bug whereby running 'guix system init config.scm /mnt' twice
would, on the second run, change timestamps in /mnt/gnu/store from the
Epoch to now.  This is because the 'register-path' call would bypass the
'reset-timestamps' phase altogether in that case, as a consequence of
commit bb3b6ccb05.

Reported by Christopher Baines.

* guix/scripts/system.scm (install): When TARGET/var/guix exists, delete
it.  As a side-effect, this ensures that later on, the 'register-path'
call invokes 'reset-timestamps' on all the copied store items.
2018-11-11 23:53:29 +01:00
Ludovic Courtès 652163154c
guix package: '--show' errors when asked for a non-existent package.
Fixes <https://bugs.gnu.org/33323>.
Reported by swedebugia <swedebugia@riseup.net>.

* guix/scripts/package.scm (process-query): Call 'leave' when
'find-packages-by-name' returns the empty list.
* tests/guix-package.sh: Test it.
2018-11-11 23:53:29 +01:00
Ludovic Courtès a3b72a8f17
ci: Add procedures to access evaluations.
* guix/ci.scm (<checkout>, <evaluation>): New record types.
(latest-builds): Add #:evaluation and #:system and honor it.  Define
'option'.
(json->checkout, json->evaluation, latest-evaluations)
(evaluations-for-commit): New procedures.
2018-11-10 23:33:46 +01:00
Ludovic Courtès 5230dce154
gnu-maintenance: Base kernel.org updater on HTML directory listings.
Partially fixes <https://bugs.gnu.org/28159>.

The FTP server at ftp.free.fr had become unable to produce directory
listings, effectively making the updater dysfunctional.  Furthermore FTP
is considered obsolescent so HTTP + HTML looks more future-proof.

* guix/gnu-maintenance.scm (html->sxml, html-links)
(latest-html-release): New procedures.
(latest-kernel.org-release): Rewrite in terms of 'latest-html-release'.
2018-11-10 23:33:46 +01:00
Ludovic Courtès bc1ff4aaba
gnu-maintenance: ".sign" and ".asc" files no longer match 'release-file?'.
* guix/gnu-maintenance.scm (release-file?): Exclude ".sign" and ".asc"
file in addition to ".sig".
2018-11-10 23:33:46 +01:00
Marius Bakke 64461ba20a
Merge branch 'master' into core-updates 2018-11-09 17:02:08 +01:00
Ludovic Courtès ea68b3f652
pull: Add missing monadic 'return'.
Fixes a regression introduced in
5f7dd092ca where, upon completion, 'guix
pull' would fail (instead of printing the new/upgraded packages) with
ugly errors like:

  successfully built /gnu/store/…-profile.drv
  1 package in profile
  Backtrace:
  […]
  In guix/store.scm:
    1605:24  1 (run-with-store _ _ #:guile-for-build _ #:system _ # _)
  In unknown file:
	     0 (_ #<build-daemon 256.97 2476b40>)

  ERROR: Wrong type to apply: #t

Reported by thorwil on #guix.

* guix/scripts/pull.scm (build-and-install): Add missing 'return' when
DRY-RUN? is wrong.
2018-11-07 21:56:16 +01:00
Marius Bakke 55174e668f
Merge branch 'master' into core-updates 2018-11-07 21:09:57 +01:00
Ludovic Courtès 72dc64f8f7
store-copy: Canonicalize the mtime and permissions of the store copy.
Fixes a bug whereby directories in the output of 'guix pack -f tarball'
would not be read-only.

* guix/build/store-copy.scm (reset-permissions): New procedure.
(populate-store): Pass #:keep-mtime? #t to 'copy-recursively'.  Call
'reset-permissions'.
* tests/pack.scm ("self-contained-tarball"): In CHECK, define
'canonical?' and use it to check that every file has an mtime of 1 and
is read-only.
* tests/guix-pack.sh: Invoke "chmod -Rf +w" before "rm -rf" in trap.
2018-11-06 23:21:24 +01:00
Ludovic Courtès 598a6b87cc
pack: Squashfs backend now honors '--localstatedir'.
* guix/scripts/pack.scm (squashfs-image)[database]: New variable.
[build]: Add (gnu build install) to the closure.  Call
'install-database-and-gc-roots' when DATABASE is true, and invoke
mksquashfs once more.
* tests/pack.scm ("squashfs-image + localstatedir"): New test.
2018-11-06 23:21:24 +01:00
Ludovic Courtès f5a2fb1bfb
pack: Docker backend now honors '--localstatedir'.
* guix/docker.scm (build-docker-image): Add #:database parameter.
Create /var/guix/db, /var/guix/profiles, etc. when DATABASE is true.
* guix/scripts/pack.scm (docker-image): Export.  Remove #:deduplicate?
parameter.  Define 'database' and pass it to 'docker-image'.
* tests/pack.scm (test-assertm): Recompile the derivation of
%BOOTSTRAP-GUILE.
("docker-image + localstatedir"): New test.
2018-11-06 23:21:24 +01:00
Ludovic Courtès b27ef1d46c
pack: Import (guix store database) only when '--localstatedir' is passed.
This is another way to address <https://bugs.gnu.org/32184>, which was
previously addressed in commit 19c924af4f.

* gnu/build/install.scm (register-closure): Move to...
* gnu/build/vm.scm (register-closure): ... here.  New procedure.
* guix/scripts/pack.scm (self-contained-tarball)[build]: Remove
now unneeded 'with-extensions' form and custom (guix config) module.
* tests/guix-pack.sh: Revert the strategy from
commit 19c924af4f.
* tests/pack.scm ("self-contained-tarball"): Likewise.
2018-11-06 23:21:23 +01:00
Ludovic Courtès ec4c81fe32
pack: Move store database creation to a separate derivation.
* guix/scripts/pack.scm (store-database): New procedure.
(self-contained-tarball): Use it when LOCALSTATEDIR? is true.
Remove 'schema' and add 'database'.
[build]: Pass DATABASE to 'populate-single-profile-directory'.
(squashfs-image): Remove #:deduplicate? parameter.
[build]: Remove (gnu build install) and (guix config) from the imported
modules.  Remove 'with-extensions'.
* gnu/build/install.scm (populate-single-profile-directory): Remove
 #:deduplicate?, #:register?, and #:schema; add #:database.  Remove call
to 'register-closure' and simply copy DATABASE instead.
2018-11-06 23:21:23 +01:00
Ricardo Wurmus 9da4848632
guix: Update to Bioconductor 3.8.
* guix/import/cran.scm (%bioconductor-version): Update to 3.8.
* guix/build-system/r.scm (bioconductor-uri): Update archive URL.
2018-11-06 18:21:24 +01:00
Ludovic Courtès e3744779aa
self: Install shell completion files.
* guix/self.scm (miscellaneous-files): New procedure.
(whole-package): Remove #:substitute-keys, add #:miscellany.
[build]: Remove code for SUBSTITUTE-KEYS and add code to copy MISCELLANY
to OUTPUT.
(compiled-guix): Adjust call to 'whole-package'.
2018-11-06 17:00:02 +01:00
Ludovic Courtès 6cf502d164
self: Rename 'sub-directory' to 'file-append*'.
* guix/self.scm (sub-directory): Rename to...
(file-append*): ... this.  Add #:recursive? parameter and pass it to
'local-file'.
(locale-data, info-manual, compiled-guix): Adjust accordingly.
2018-11-06 17:00:02 +01:00
Maxim Cournoyer 2e4d83398b
ssh: Honor the SOCKET-NAME argument of connect-to-remote-daemon.
* guix/ssh.scm (connect-to-remote-daemon): Pass the `socket-name' variable to
the `open-connection' call so that it is honored.
2018-11-05 21:28:59 -05:00
Ludovic Courtès 8d3beb3a44
self: Install substitute keys.
* guix/self.scm (whole-package): Add #:substitute-keys and honor it.
(compiled-guix): Pass #:substitute-keys to 'whole-package' when
PULL-VERSION is one.
2018-11-06 00:04:11 +01:00
Ludovic Courtès cbe7387c04
self: Remove extra paren in manual version string.
* guix/self.scm (info-manual)[build]: Remove extra closing paren in
VERSION.
2018-11-06 00:04:11 +01:00
Ludovic Courtès 5f7dd092ca
pull: Make '--dry-run' behave as expected.
* guix/scripts/pull.scm (show-help): Document '--dry-run'.
(build-and-install): Add #:dry-run? parameter and honor it.
(guix-pull): Remove (assoc-ref opts 'dry-run?) condition.  Instead, pass
it as #:dry-run? to 'build-and-install'.
* doc/guix.texi (Invoking guix pull): Document '--dry-run'.  Move
'--verbose' to the bottom.
2018-11-06 00:04:11 +01:00
Marius Bakke f4a5faa9dc
Merge branch 'master' into core-updates 2018-11-05 23:56:22 +01:00
Maxim Cournoyer 2f18b7329d
git-download: Print a message when falling back to a full fetch.
Otherwise the user might believe that git-fetch stalled, observing the lack of
output following a 'fatal' git error message (see:
https://debbugs.gnu.org/33100).

* guix/build/git.scm (git-fetch): Print message when falling back to a full
fetch.
2018-10-28 22:17:17 -04:00
Ludovic Courtès 63eb2b899b
Add 'guix processes'.
* guix/scripts/processes.scm, tests/processes.scm: New files.
* Makefile.am (MODULES): Add the former.
(SCM_TESTS): Add the latter.
* po/guix/POTFILES.in: Add guix/scripts/processes.scm.
* doc/guix.texi (Invoking guix processes): New node.
(Invoking guix-daemon): Reference it.
2018-10-29 00:13:38 +01:00
Arun Isaac 69b0a847fb
import: hackage: Do not repeat inputs in native-inputs.
* guix/import/hackage.scm (hackage-module->sexp): Do not repeat inputs again
in native-inputs. native-inputs should only contain packages that are not
already listed in inputs.
2018-10-28 13:51:20 +05:30
Ludovic Courtès 932d160056
gexp: 'gexp-modules' now consistently deletes duplicates.
Fixes <https://bugs.gnu.org/32966>.
Reported by Clément Lassieur <clement@lassieur.org>.

* guix/gexp.scm (gexp-attribute): Add 'equal?' optional parameter; pass
it to 'delete-duplicates'.
(gexp-modules)[module=?]: New procedure.
Pass it to 'gexp-attribute'.
* tests/gexp.scm ("gexp-modules deletes duplicates"): New test.
2018-10-27 16:39:29 +02:00
Ludovic Courtès 003789e837
pack: Hide 'zip' colliding binding.
* guix/scripts/pack.scm: Hide 'zip' from (gnu packages compression).
2018-10-27 16:39:29 +02:00
Ludovic Courtès 46727e3a9d
pack: Remove unused variable.
* guix/scripts/pack.scm (self-contained-tarball)[libgcrypt]: Remove.
2018-10-27 16:39:29 +02:00
Ludovic Courtès fdc4f665dc
profiles: Fix typo in exports.
* guix/profiles.scm (&profile-collistion-error): Fix typo in export list.
2018-10-26 20:05:21 +02:00
Ludovic Courtès 62a14bd26f
scripts: Suggest running 'guix gc' when we're short on disk space.
* guix/scripts.scm (%disk-space-warning): New variable.
(warn-about-disk-space): New procedure.
* guix/scripts/package.scm (build-and-use-profile): Use it.
* guix/scripts/system.scm (process-action): Likewise.
2018-10-23 01:04:39 +02:00
Marius Bakke ffddb42d6c
Merge branch 'master' into core-updates 2018-10-21 18:06:02 +02:00
Alex Vong 418f1b2414
java-utils: Use 'strip-store-file-name'.
See the discussion at
<https://lists.gnu.org/archive/html/guix-devel/2018-10/msg00250.html>.

* guix/build/java-utils.scm (package-name-version): Remove it.
(install-javadoc): Use 'strip-store-file-name' instead of
'package-name-version'.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2018-10-19 23:11:07 +02:00
Alex Vong 58352f269e
build-system/haskell: Use 'strip-store-file-name'.
See the discussion at
<https://lists.gnu.org/archive/html/guix-devel/2018-10/msg00250.html>.

* guix/build/haskell-build-system.scm (package-name-version): Remove it.
(configure): Use 'strip-store-file-name' instead of 'package-name-version'.
(setup-compiler): Likewise.
(make-ghc-package-database): Likewise.
(register): Likewise.
* gnu/packages/haskell.scm (ghc-cairo)[arguments]: Likewise.
* gnu/packages/agda.scm (agda)[arguments]: Likewise.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2018-10-19 23:11:07 +02:00
Ludovic Courtès 19c924af4f
tests: Run 'guix pack' tests using the external store.
Fixes <https://bugs.gnu.org/32184>.

* guix/tests.scm (call-with-external-store): New procedure.
(with-external-store): New macro.
* tests/pack.scm (%store): Remove.
(test-assertm): Add 'store' parameter.
("self-contained-tarball"): Wrap in 'with-external-store'.
* tests/guix-pack.sh: Connect to the external store, if possible, by
setting NIX_STORE_DIR and GUIX_DAEMON_SOCKET.  Remove most uses of
'--bootstrap'.
2018-10-19 18:28:57 +02:00
Ludovic Courtès fbdb7b9526
pack: Fix "-C none -f tarball".
Fixes a regression introduced in
48b444304e whereby "guix pack -C none
hello" would fail with:

  ERROR: In procedure string-join:
  In procedure string-join: Wrong type argument in position 1: #f
  builder for `/gnu/store/…-tarball-pack.tar.drv' failed with exit code 1

* guix/scripts/pack.scm (self-contained-tarball): Adjust for when
'compressor-command' returns #f.
2018-10-19 18:28:57 +02:00
Leo Famulari 7277d06d8b
gnu: Use pypi.org.
<pypi.io> redirects to <pypi.org>.

* guix/build-system/python.scm (pypi-uri): Replace pypi.io with pypi.org.
* guix/import/pypi.scm (pypi-url?): Likewise.
* tests/pypi.scm: Likewise.
2018-10-18 23:46:33 -04:00
Ludovic Courtès 39d7fdce45
services: dhcp-client: Deprecate 'dhcp-client-service' procedure.
* gnu/services/networking.scm (dhcp-client-service-type): Add default
value.
* gnu/system/examples/bare-bones.tmpl: Use (service
dhcp-client-service-type) instead of (dhcp-client-service).
* gnu/system/examples/beaglebone-black.tmpl: Likewise.
* gnu/tests/base.scm (%avahi-os): Likewise.
* gnu/tests/databases.scm (%memcached-os): Likewise.
(%mongodb-os): Likewise.
* gnu/tests/dict.scm (%dicod-os): Likewise.
* gnu/tests/mail.scm (%opensmtpd-os): Likewise.
(%exim-os): Likewise.
(%dovecot-os): Likewise.
* gnu/tests/messaging.scm (run-xmpp-test): Likewise.
(run-bitlbee-test): Likewise.
* gnu/tests/monitoring.scm (%prometheus-node-exporter-os): Likewise.
* gnu/tests/networking.scm (%inetd-os): Likewise.
(run-iptables-test): Likewise.
* gnu/tests/nfs.scm (%base-os): Likewise.
* gnu/tests/rsync.scm (%rsync-os): Likewise.
* gnu/tests/ssh.scm (run-ssh-test): Likewise.
* gnu/tests/version-control.scm (%cgit-os): Likewise.
(%git-http-os): Likewise.
(%gitolite-os): Likewise.
* gnu/tests/virtualization.scm (%libvirt-os): Likewise.
* gnu/tests/web.scm (%httpd-os): Likewise.
(%nginx-os): Likewise.
(%varnish-os): Likewise.
(%php-fpm-os): Likewise.
(%hpcguix-web-os): Likewise.
(%tailon-os): Likewise.
* tests/guix-system.sh: Likewise.
* doc/guix.texi (Networking Services): Document
'dhcp-client-service-type' and remove 'dhcp-client-service'.
2018-10-18 01:12:22 +02:00
Marius Bakke d02bb02f7d
Merge branch 'master' into core-updates 2018-10-17 20:47:11 +02:00
Pierre Neidhardt c4d62443eb
import cran: Document "recursive" option.
* guix/scripts/import/cran.scm: (show-help): Document "recursive" option.
2018-10-17 13:06:25 +02:00
Eric Bavier 278f86a43f
ui: Fix port-buffering with guile@2.0.
* guix/status.scm (build-event-output-port)[guile@2.0]: Do not call 'setvbuf'
on custom binary port.
* tests/status.scm (current-build-output-port, UTF-8 + garbage)[guile@2.0]:
Use "?" in place of REPLACEMENT CHARACTER.
2018-10-16 17:12:09 -05:00
Danny Milosavljevic ad0082afe0
import: json: Handle the error case.
* guix/import/json.scm (json-fetch-alist): Handle the error case.
2018-10-16 23:17:36 +02:00
Ludovic Courtès f9a8fce10f
status: Build upon multiplexed build output.
This allows for more accurate status tracking and parsing of extended
build traces.

* guix/status.scm (multiplexed-output-supported?): New procedure.
(print-build-event): Don't print \r when PRINT-LOG? is true.
Adjust 'build-log' handling for when 'multiplexed-output-supported?'
returns true.
(bytevector-index, split-lines): New procedures.
(build-event-output-port)[%build-output-pid, %build-output]
[%build-output-left]: New variables.
[process-line]: Handle "@ build-output" traces.
[process-build-output]: New procedure.
[write!]: Add case for when %BUILD-OUTPUT-PID is true.  Use
'bytevector-index' rather than 'string-index'.
(compute-status): Add #:derivation-path->output-path.  Use it.
* tests/status.scm ("compute-status, multiplexed build output"):
New test.
("build-output-port, UTF-8")
("current-build-output-port, UTF-8 + garbage"): Adjust to new
'build-log' output.
* guix/scripts/build.scm (set-build-options-from-command-line):
Pass #:multiplexed-build-output?.
(%default-options): Add 'multiplexed-build-output?'.
* guix/scripts/environment.scm (%default-options): Likewise.
* guix/scripts/pack.scm (%default-options): Likewise.
* guix/scripts/package.scm (%default-options): Likewise.
* guix/scripts/pull.scm (%default-options): Likewise.
* guix/scripts/system.scm (%default-options): Likewise.
2018-10-15 23:06:55 +02:00
Ludovic Courtès 6ef61cc4c3
daemon: Support multiplexed build output.
This allows clients to tell whether output comes from the daemon or, if
it comes from a builder, from which builder it comes.  The latter is
particularly useful when MAX-BUILD-JOBS > 1.

* nix/libstore/build.cc (DerivationGoal::tryBuildHook)
(DerivationGoal::startBuilder): Print the child's PID in "@ build-started"
traces.
(DerivationGoal::handleChildOutput): Define 'prefix', pass it to
'writeToStderr'.
* nix/libstore/globals.cc (Settings:Settings): Initialize
'multiplexedBuildOutput'.
(Settings::update): Likewise.
* nix/libstore/globals.hh (Settings)[multiplexedBuildOutput]: New field.
Update 'printBuildTrace' documentation.
* nix/libstore/worker-protocol.hh (PROTOCOL_VERSION): Bump to 0.163.
* nix/nix-daemon/nix-daemon.cc (performOp) <wopSetOptions>: Special-case
"multiplexed-build-output" and remove "use-ssh-substituter".
* guix/store.scm (set-build-options): Add #:multiplexed-build-output?
and honor it.
(%protocol-version): Bump to #x163.
* tests/store.scm ("multiplexed-build-output"): New test.

fixlet
2018-10-15 22:40:35 +02:00
Ludovic Courtès 38a2f5eafb
status: Avoid "sucessfully built" messages when in quiet mode.
* guix/status.scm (print-build-event): Print "successfully built"
messages only when PRINT-LOG? is true, like we do for
'substituter-started' events.
2018-10-14 23:48:49 +02:00
Ludovic Courtès e0caff9ed0
describe: Canonicalize the profile.
Fixes a regression introduced in
795d430d90 whereby 'guix describe' would
no longer display the generation number of ~/.config/guix/current.

* guix/scripts/describe.scm (guix-describe): Call 'canonicalize-profile'.
2018-10-14 23:48:49 +02:00
Ludovic Courtès aa227b3be3
pull: Fix target of /var/guix/profiles/per-user/USER/current-guix.
This is a followup to 8155a20907.

* guix/scripts/pull.scm (migrate-generations): Compute the right target
for /var/guix/profiles/per-user/USER/current-guix.  Previously we'd
return "current-N-link" instead of "current-guix-N-link'.
2018-10-12 16:45:34 +02:00
Ludovic Courtès 8036b0942b
pull: Don't use rename(2) across potentially different devices.
Reported by Formbi on #guix.

* guix/scripts/pull.scm (migrate-generations): Use 'symlink' and
'delete-file' instead of 'rename-file'.  The latter could lead to EXDEV
when $HOME and /var were different partitions.
2018-10-12 15:18:41 +02:00
Ludovic Courtès 1c795c4fd2
profiles: 'user-friendly-profile' now recognizes ~/.config/guix/current.
* guix/profiles.scm (%known-shorthand-profiles): New variable.
(user-friendly-profile): Use it.
2018-10-12 00:13:14 +02:00
Ludovic Courtès 8155a20907
pull: Create /var/guix/profiles/per-user/USER/current-guix.
Previously the migration code would fail to create that file, so
~/.config/guix/current would be dangling.

* guix/scripts/pull.scm (migrate-generations): Create
/var/guix/profiles/per-user/USER/current-guix.
2018-10-12 00:13:14 +02:00
Ludovic Courtès 795d430d90
pull: Turn ~/.config/guix/current into a symlink to /var/guix/profiles.
This is more consistent with what 'guix package' does, more pleasant for
users (we no longer clobber ~/.config/guix), and more
cluster-friendly (since /var/guix/profiles is usually an NFS share
already.)

* guix/scripts/pull.scm (%current-profile, %user-profile-directory): New
variables.
(migrate-generations, ensure-default-profile): New procedures.
(guix-pull): Use %CURRENT-PROFILE by default.  Call
'ensure-default-profile'.
* doc/guix.texi (Invoking guix pull): Adjust 'guix package -p
~/.config/guix/current' example.
* guix/scripts.scm (warn-about-old-distro): Check %PROFILE-DIRECTORY
"/current-guix".
2018-10-11 18:29:11 +02:00
Ludovic Courtès 50c72ecd9e
profiles: Generalize 'canonicalize-profile'.
* guix/profiles.scm (canonicalize-profile): Rewrite to work with any
profile that lives under %PROFILE-DIRECTORY.
2018-10-11 18:29:11 +02:00
Ludovic Courtès 77dcfb4c02
profiles: Add 'ensure-profile-directory'.
* guix/scripts/package.scm (ensure-default-profile): Move
/var/guix/profiles/per-user handling to...
* guix/profiles.scm (ensure-profile-directory): ... here.  New
procedure.
* po/guix/POTFILES.in: Add 'guix/profiles.scm'.
2018-10-11 18:29:11 +02:00
Ludovic Courtès 099bb0175f
self: Use Guile 2.2 unconditionally for recent 'guix pull'.
Fixes <https://bugs.gnu.org/32929>.
Reported by Michael Bowcutt <mwb71@case.edu>.

* guix/self.scm (guix-derivation)[guile]: Use "2.2" when PULL-VERSION >= 1.
Likewise for the #:guile-version argument.
2018-10-10 14:54:18 +02:00
Ludovic Courtès b33e191c86
guix build: '-f' accepts file-like objects.
* guix/scripts/build.scm (options->things-to-build)[validate-type]:
Check for 'file-like?'.
(options->derivations): Accept 'file-like?'.
* tests/guix-build.sh: Add a test with 'computed-file'.
* doc/guix.texi (Additional Build Options): Mention file-like objects.
2018-10-09 18:54:12 +02:00
Ludovic Courtès 88d9eccc11
profiles: Make Geiser happy.
* guix/profiles.scm (manual-database)[config.scm]: Use ungexp/quote
trick to placate Geiser, which otherwise thinks it's in (guix config).
2018-10-09 18:54:12 +02:00
Ludovic Courtès e54aec7b8e
pull: '-l' now honors '-p'.
* guix/scripts/pull.scm (process-query): Add 'profile' parameter and
remove 'profile' local variable.
(guix-pull): Adjust caller.
2018-10-09 18:54:12 +02:00
Ludovic Courtès fe17037b38
status: Gracefully handle invalid UTF-8 in build logs.
* guix/status.scm (maybe-utf8->string): New procedure.
(build-event-output-port): Use it in lieu of 'utf8->string'.
* tests/status.scm ("build-output-port, UTF-8")
("current-build-output-port, UTF-8 + garbage"): New tests.
2018-10-09 18:54:12 +02:00
Leo Famulari e8bd1946ec
Merge branch 'master' into core-updates 2018-10-07 20:49:14 -04:00
Leo Famulari 68afb9dccf
build-system/glib-or-gtk: Build 'in-source' by default.
* guix/build-system/glib-or-gtk.scm (glib-or-gtk-build): Change to
'out-of-source? #f'.
* gnu/packages/audio.scm (audacity)[arguments]: Use the default 'out-of-source?'
setting.
* gnu/packages/libreoffice.scm (libreoffice): Likewise.
2018-10-07 16:13:51 -04:00
Ludovic Courtès 42384b517e
progress: Fix total size in "@ download-succeeded" traces.
Fixes a regression introduced in
1d0be47ab6 whereby the total size for
directories (coming from substitutes) would be 4KiB.  This led the
progress bar to go back to the start, typically.

* guix/progress.scm (progress-reporter/trace): Add 'total'.  In 'start',
initialize it.  Adjust 'report' to update it.  Adjust 'stop' to prefer
SIZE as the actual size and then TOTAL.  Do not use the size of FILE as
the total since that could be 4KiB when FILE is a directory.
2018-10-05 23:54:18 +02:00
Marius Bakke cf6db76d2a
Merge branch 'master' into core-updates 2018-10-05 19:15:39 +02:00
Ludovic Courtès 1d0be47ab6
progress: Generate valid 'download-progress' traces when the size is unknown.
Fixes <https://bugs.gnu.org/32895>.
Reported by Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de>.

* guix/progress.scm (progress-reporter/trace): In 'stop', make sure SIZE
is an integer.  Previously we'd generate a "@ download-progress" trace
with #f for the 'transferred' number when downloading files whose size
is not known in advance.
2018-10-04 10:24:34 +02:00
Andy Patterson a7b751965f
build-system/asdf: Properly handle dependency specification casing.
* guix/build/lisp-utils.scm (normalize-dependency): Modify match
clauses to match the upper-case symbols that lisp produces.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2018-10-02 14:53:39 +02:00
Timothy Sample 127586adfb
guix: import: stackage: Fix JSON accessors.
* guix/import/stackage.scm (lts-info-ghc-version, lst-info-packages): Use
assoc-ref for accessing parsed JSON.
2018-10-01 12:12:08 +02:00
Timothy Sample bb6419f374
build-system: haskell: Add #:cabal-revision argument.
Add a #:cabal-revision argument for specifying which Cabal file revision
from Hackage should be used.

* guix/build-system/haskell.scm (source-url->revision-url): New function.
(lower): Accept a cabal-revision keyword argument, convert it to an
origin record, and add it to the resulting bag's host-inputs.
(haskell-build): Pass the cabal-revision input to the builder as an
argument.
* guix/build/haskell-build-system.scm (patch-cabal-file): New phase.
(%standard-phases): Add it.
2018-10-01 12:12:08 +02:00
Ludovic Courtès f9051e3870
status: Always print the daemon's "waiting for locks" messages.
Reported by Ricardo Wurmus <rekado@elephly.net>.

* guix/status.scm (print-build-event) <build-log>: Let "waiting for
locks" messages through.
2018-09-30 22:20:13 +02:00
Ludovic Courtès 1dc876a39f
status: Tweak colorization.
* guix/status.scm (colorize-log-line): Add "\<" before "FAIL" (to
distinguish from "XFAIL".
Use MAGENTA instead of ORANGE, which doesn't exist.
2018-09-28 23:34:09 +02:00
Ludovic Courtès fb94d82bc2
status: Be more defensive when looking for a log file.
* guix/store.scm (derivation-log-file): New procedure.o
(log-file): Use it.
* guix/status.scm (print-build-event): Use 'derivation-log-file' instead
of 'log-file'.  Check wheter the return value is #f.
2018-09-28 23:28:03 +02:00
Ludovic Courtès 240a9c69a6
perform-download: Optionally report a "download-progress" trace.
* guix/scripts/perform-download.scm (perform-download): Add
 #:print-build-trace? and pass it to 'url-fetch'.
(guix-perform-download): Define 'print-build-trace?' and pass it to
'perform-download'.
* guix/build/download.scm (ftp-fetch): Add #:print-build-trace? and
honor it.
(url-fetch): Likewise.
* nix/libstore/builtins.cc (builtinDownload): Set _NIX_OPTIONS
environment variable.
2018-09-27 23:21:53 +02:00
Ludovic Courtès dc0f74e5fc
Add (guix status) and use it for pretty colored output.
* guix/progress.scm (progress-reporter/trace): New procedure.
(%progress-interval): New variable.
(progress-reporter/file): Use it.
* guix/scripts/build.scm (set-build-options-from-command-line): Pass
 #:print-extended-build-trace?.
(%default-options): Add 'print-extended-build-trace?'.
(guix-build): Parameterize CURRENT-TERMINAL-COLUMNS.  Use
'build-status-updater'.
* guix/scripts/environment.scm (%default-options): Add
'print-extended-build-trace?'.
(guix-environment): Wrap body in 'with-status-report'.
* guix/scripts/pack.scm (%default-options): Add 'print-build-trace?' and
'print-extended-build-trace?'.
(guix-pack): Wrap body in 'with-status-report'.
* guix/scripts/package.scm (%default-options, guix-package): Likewise.
* guix/scripts/system.scm (%default-options, guix-system): Likewise.
* guix/scripts/pull.scm (%default-options, guix-pull): Likewise.
* guix/scripts/substitute.scm (progress-report-port): Don't call STOP
when TOTAL is zero.
(process-substitution): Add #:print-build-trace? and honor it.
(guix-substitute)[print-build-trace?]: New variable.
Pass #:print-build-trace? to 'process-substitution'.
* guix/status.scm: New file.
* guix/store.scm (set-build-options): Add #:print-extended-build-trace?;
pass it into PAIRS.
(%protocol-version): Bump.
(protocol-version, nix-server-version): New procedures.
(current-store-protocol-version): New variable.
(with-store, build-things): Parameterize it.
* guix/ui.scm (build-output-port): Remove.
(colorize-string): Export.
* po/guix/POTFILES.in: Add guix/status.scm.
* tests/status.scm: New file.
* Makefile.am (SCM_TESTS): Add it.
* nix/libstore/worker-protocol.hh (PROTOCOL_VERSION): Bump to 0x162.
* nix/libstore/build.cc (DerivationGoal::registerOutputs)
(SubstitutionGoal::finished): Print a "@ hash-mismatch" trace before
throwing.
2018-09-27 23:21:53 +02:00
Ludovic Courtès fe65b559a6
progress: Add 'display-download-progress'.
* guix/progress.scm (display-download-progress): New procedure.
(progress-reporter/file)[render]: Rewrite in terms of
'display-download-progress'.
2018-09-27 23:21:53 +02:00
Carlo Zancanaro 4245ddcbc9
guix system: Load all services on reconfigure, not just stopped ones.
This uses the 'replacement' service slot introduced in the Shepherd
version 0.5.0.

* gnu/services/shepherd.scm (shepherd-service-upgrade): Return a list of
  services that need to be restarted to complete their upgrade.
* guix/scripts/system.scm (call-with-service-upgrade-info): Rename an internal
  variable to reflect the change to shepherd-service-upgrade.
  (upgrade-shepherd-services): Call 'load-services/safe' instead of
  'load-services'.  Print a message about services that need to be
  manually restarted.
* gnu/services/herd.scm (load-services/safe): New procedure.
* doc/guix.texi (Invoking guix system): Document the new behaviour.

Co-authored-by: Ludovic Courtès <ludo@gnu.org>
2018-09-26 23:40:36 +02:00
Marius Bakke 6a0427af6c
Merge branch 'master' into core-updates 2018-09-26 01:11:32 +02:00
Marius Bakke 280fc83512
git-download: Don't assume the working directory is the parent of ".git".
This makes it do the right thing w.r.t. git worktrees.

* guix/git-download.scm (git-file-list): Use REPOSITORY-WORKING-DIRECTORY to
locate checkout.  Rename from "top" to "workdir".
2018-09-26 00:33:00 +02:00
Ludovic Courtès 88268a34bc
pull: Try harder to use the host's X.509 certificates.
* guix/scripts/pull.scm (honor-x509-certificates): Use commonly-found
certificate bundles.
2018-09-25 18:45:51 +02:00
Ludovic Courtès f85dbc4f3b
substitute: Progress port really closes underlying port.
* guix/scripts/substitute.scm (progress-report-port): Use 'close-port'
instead of 'close-connection'.  Move 'stop' call first.
2018-09-25 18:45:50 +02:00
Ludovic Courtès cfe19684ea
progress: 'progress-reporter-report!' takes any number of arguments.
* guix/progress.scm (progress-reporter-report!): Accept an arbitrary
number of arguments and pass them to REPORT.
2018-09-25 18:45:50 +02:00
Ludovic Courtès 2e3a6250f8
gnupg: Change default keyserver.
* guix/gnupg.scm (%openpgp-key-server): Change default to
"pool.sks-keyservers.net".
2018-09-25 18:45:50 +02:00
Ludovic Courtès bb3b6ccb05
database: Register each store item only once.
Fixes <https://bugs.gnu.org/32600>.
Reported by Leo Famulari.

* guix/store/database.scm (register-items): Check whether TO-REGISTER is
in DB by calling 'path-id',  and skip the reset-timestamps,
registration, and deduplication phases when it is.
2018-09-23 23:34:17 +02:00
Ludovic Courtès f0addd6461
database: 'register-items' shows a progress bar.
* guix/store/database.scm (register-items): Add #:log-port.  Use
'progress-reporter/bar' to show a progress report.
(register-path): Pass #:log-port to 'register-items'.
2018-09-23 23:34:16 +02:00
Ludovic Courtès a387b0bebb
store-copy: Display a progress bar when copying store items.
* guix/build/store-copy.scm (populate-store): Add #:log-port parameter.
Use 'progress-reporter/bar' to report progress.
2018-09-23 23:34:16 +02:00
Ludovic Courtès c122a2e509
serialization: Remove redundancy in 'write-file'.
* guix/serialization.scm (write-file): Remove redundant 'member' call.
2018-09-23 23:34:16 +02:00
Ludovic Courtès 2dad031375
inferior: Add 'inferior-for-channels'.
* guix/inferior.scm (%inferior-cache-directory): New variable.
(inferior-for-channels): New procedure.
2018-09-21 17:04:38 +02:00
Ludovic Courtès c37f38bde6
channels: Add 'channel-instances->derivation'.
* guix/channels.scm (channel-instances->derivation): New procedure.
(latest-channel-derivation): Use it.
(channel-instance-derivations): Make private.
2018-09-21 17:04:38 +02:00
Ludovic Courtès 811b21fb15
profiles: 'packages->manifest' now accepts inferior packages.
* guix/profiles.scm (packages->manifest)[inferiors-loaded?]: New
variable.
[inferior->entry]: New procedure.
Accept inferior packages when INFERIORS-LOADED? is true.
* tests/guix-package.sh: Add test using a manifest with an inferior.
* tests/inferior.scm ("packages->manifest"): New test.
2018-09-21 17:04:37 +02:00
Ludovic Courtès 2e6d64e122
inferior: Add 'inferior-package->manifest-entry'.
* guix/inferior.scm (inferior-package->manifest-entry): New procedure.
* tests/inferior.scm (manifest-entry->list): New procedure.
("inferior-package->manifest-entry"): New test.
2018-09-21 17:04:37 +02:00
Ludovic Courtès eee8b303f6
inferior: Add 'inferior-package-search-paths' & co.
* guix/inferior.scm (%inferior-package-search-paths)
(inferior-package-native-search-paths)
(inferior-package-search-paths)
(inferior-package-transitive-native-search-paths): New procedures.
* tests/inferior.scm ("inferior-package-search-paths"): New test.
2018-09-21 17:04:37 +02:00
Ludovic Courtès 6030396aec
inferior: Add 'inferior-package-inputs' & co.
* guix/inferior.scm (open-inferior): Use (ice-9 match).
(inferior-package-input-field, inferior-package-inputs):
(inferior-package-native-inputs)
(inferior-package-propagated-inputs)
(inferior-package-transitive-propagated-inputs): New procedures.
* tests/inferior.scm ("inferior-package-inputs"): New test.

inputs fixlet
2018-09-21 17:04:37 +02:00
Ludovic Courtès e1a4ffdab5
inferior: Add 'lookup-inferior-packages'.
* guix/inferior.scm (<inferior>)[packages, table]: New fields.
(open-inferior): Initialize these new fields.
(inferior-packages): Rename to...
(%inferior-packages): ... this.
(inferior-packages): New procedure; force the promise.
(%inferior-package-table, lookup-inferior-packages): New procedures.
* tests/inferior.scm ("lookup-inferior-packages")
("lookup-inferior-packages and eq?-ness"): New tests.
2018-09-21 17:04:37 +02:00
Ludovic Courtès 9daf046c5d
inferior: Add 'inferior-package-derivation'.
* guix/inferior.scm (read-inferior-response)
(send-inferior-request): New procedures.
(inferior-eval): Rewrite in terms of these.
(proxy, inferior-package-derivation, inferior-package->derivation)
(package-compiler): New procedures.
* tests/inferior.scm ("inferior-package-derivation"): New test.
2018-09-21 17:04:37 +02:00
Marius Bakke 2817ac3c18
Merge branch 'master' into core-updates 2018-09-20 13:37:58 +02:00
Andy Patterson 5f6908d664
build-system/asdf: Adopt asdf conventions.
The asdf documentation specifies that asdf:load-asd should be preferred to
calling load on a system definition file.

* guix/build/lisp-utils.scm (compile-system): Replace load with asdf:load-asd.
(system-dependencies): Likewise.
(test-system): Likewise.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2018-09-19 18:25:28 +02:00
Andy Patterson e831a1668b
build-system/asdf: Use invoke.
* guix/build/lisp-utils.scm (lisp-eval-program): Replace system* and error
handling with invoke.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2018-09-19 18:25:28 +02:00
Andy Patterson 29a3ffb446
build-system/asdf: Log lisp system invocations.
* guix/build/lisp-system.scm: (lisp-eval-program): Log the arguments to
system*.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2018-09-19 18:25:28 +02:00
Andy Patterson 7b6b7cdcc5
build-system/asdf: Handle all asdf dependency specifications.
Add support for dependencies of the form (:version <name> <version>),
(:feature <feature> <dependency-specification>) and (:require <module-name>),
as defined by
<https://common-lisp.net/project/asdf/asdf.html#The-defsystem-grammar>.

* guix/build/lisp-utils.scm (normalize-dependency): New variable.
(make-asd-file)[dependencies]: Use it to generate dependencies with normalized
names.
[dependency-name]: New variable.
[registry]: Use it to flatten the normalized dependencies.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2018-09-19 18:25:28 +02:00
Ludovic Courtès 20f8d73fac
pull: Use /etc/ssl/certs by default if it exists and is non-empty.
Previously, on machines where /etc/ssl/certs did exist, we'd have this:

  $ unset SSL_CERT_DIR
  $ unset SSL_CERT_FILE
  $ guix pull
  Updating channel 'guix' from Git repository at 'https://git.savannah.gnu.org/git/guix.git'...
  guix pull: error: Git error: the SSL certificate is invalid

This is because we'd let OpenSSL look for certificates in its default
location, which is an empty directory in its own prefix.

* guix/scripts/pull.scm (honor-x509-certificates): New procedure.
(guix-pull): Use it instead of calling 'honor-lets-encrypt-certificates!'.
2018-09-18 23:23:44 +02:00
Ludovic Courtès 1d2b542d34
pull: Assume 'set-tls-certificate-locations!' is available.
* guix/scripts/pull.scm (honor-lets-encrypt-certificates!): Call
'set-tls-certificate-locations!' unconditionally.
2018-09-18 23:23:44 +02:00
Ludovic Courtès 912adda316
describe: Work correctly on generation-less profiles.
Previously a command like:

  $(readlink -f ~/.config/guix/current)/bin/guix describe

would succeed without printing anything.

* guix/scripts/describe.scm (display-profile-info): Don't call
'generation-file-name' when NUMBER is zero.
* guix/scripts/pull.scm (display-profile-content): Likewise.
2018-09-18 23:23:44 +02:00
Ludovic Courtès 000bbe02e2
store: Add another missing buffer flush.
This is a followup to 3809824199.

* guix/store.scm (add-file-tree-to-store): Add 'write-buffered-output'
call.
2018-09-18 23:23:43 +02:00
Ludovic Courtès e83b2b0fdd
git: Choose a saner default for '%repository-cache-directory'.
* guix/git.scm (%repository-cache-directory): Use 'cache-directory'
by default unless running as root.
2018-09-17 22:10:31 +02:00
Ludovic Courtès 3809824199
store: Add missing buffer flushes.
This could result in deadlock in unusual situations, whereby we'd start
waiting for a reply while the query hasn't been flushed to the socket.

* guix/store.scm (buffering-output-port)[flush]: Add call to
'force-output'.
(add-to-store): Add call to 'write-buffered-output'.
2018-09-17 22:10:31 +02:00
Ludovic Courtès b9e1fddfd8
gnupg: Use 'gpgv' and keybox files; adjust 'guix refresh' accordingly.
* guix/gnupg.scm (%gpgv-command, current-keyring): New variables
(gnupg-verify): Add optional 'keyring' parameter.  Use 'gpgv' instead of
'gpg' and pass it '--keyring'.
(gnupg-receive-keys): Add optional 'keyring' parameter and honor it.
(gnupg-verify*): Add #:keyring and honor it.
* guix/scripts/refresh.scm (%options, show-help): Add '--keyring'.
(guix-refresh): Parameterize CURRENT-KEYRING.
* doc/guix.texi (Invoking guix refresh): Document '--keyring' and the
keybox format.
2018-09-16 23:00:44 +02:00
Ludovic Courtès 3c0e16391e
channels: Add Guile-Git as a dependency of external channels.
Fixes a regression introduced in
aed0a59405 whereby external channels would
fail to build due to the lack of a (git) module.

Reported by Alex ter Weele on #guix.

* guix/channels.scm (channel-instance-derivations)[guile-gcrypt]:
Remove.
[dependencies]: New variable.
Use it in the 2nd argument to 'build-channel-instance'.
2018-09-16 23:00:44 +02:00
Ludovic Courtès ebbfc59c21
graph: Add '--system'.
* guix/scripts/graph.scm (%options, show-help): Add '--system'.
(%default-options): Add 'system'.
(guix-graph): Pass #:system to 'run-with-store'.
2018-09-16 23:00:44 +02:00
Ludovic Courtès 13512e1b8f
git-download: 'git-predicate' returns #f on Git errors.
Fixes a regression introduced in
aed0a59405 whereby 'git-predicate' would
throw to 'git-error instead of returning #f as the docstring says.

* guix/git-download.scm (git-predicate): Return #f upon 'git-error'.
2018-09-14 11:23:08 +02:00
Leo Famulari d763940711
Merge branch 'master' into core-updates 2018-09-13 13:32:39 -04:00
Ludovic Courtès aed0a59405
git-download: Rewrite 'git-predicate' using Guile-Git.
Fixes <https://bugs.gnu.org/27925>.

* guix/git-download.scm (files->directory-tree)
(directory-in-tree?): Remove.
(git-file-list): New procedures.
(git-predicate): Use it instead of opening a pipe to 'git'.  Remove
directory tree hack and rely exclusively on inode/device numbers.
2018-09-13 00:20:42 +02:00
Ricardo Wurmus 1afd1fbf3c
guix: Do not close current-error-port.
Reported-by: Ludovic Courtès <ludo@gnu.org>.

* guix/scripts/build.scm (guix-build),
guix/scripts/package.scm (guix-package): Duplicate port before handing it to
build-output-port.
2018-09-11 23:19:42 +02:00
Ricardo Wurmus f72e5f93b7
ui: Do not filter hash mismatch lines.
Reported by Pjotr Prins <pjotr.public12@thebird.nl>.

* guix/ui.scm (build-output-port): Add pattern for hash mismatch error; be
more careful with error messages in verbose mode.
2018-09-11 23:19:42 +02:00
Ludovic Courtès 2225d56a14
profiles: Correctly deal with etc/ being a relative symlink.
Fixes <https://bugs.gnu.org/32686>.
Reported by Oleg Pykhalov <go.wigust@gmail.com>.

* guix/build/profiles.scm (ensure-writable-directory): Add #:symlink.
[absolute?]: New procedure.
[unsymlink]: Use it to determine how to resolve readlink's result.
(build-profile): Pass SYMLINK to 'ensure-writable-directory'.
* tests/profiles.scm ("profile-derivation when etc/ is a relative symlink"):
New test.
2018-09-11 00:14:58 +02:00
Leo Famulari 875d068176
Adjust all users of (gnu packages ldc) to use (gnu packages dlang).
This is a followup to commit 98d6543f86.

* gnu/packages/bioinformatics.scm, guix/build-system/dub.scm: Adjust
accordingly.
2018-09-10 15:44:32 -04:00
Ludovic Courtès 7d05868847
substitute: Ignore exceptions thrown by 'set-thread-name'.
Fixes <https://bugs.gnu.org/32669>.
Reported by Ricardo Wurmus <rekado@elephly.net>.

* guix/scripts/substitute.scm (guix-substitute): Swallow 'system-error'
exceptions around 'set-thread-name' call.
2018-09-10 17:47:52 +02:00
Ludovic Courtès f8121329b1
syscalls: Report lack of a libc symbol as ENOSYS.
* guix/build/syscalls.scm (syscall->procedure): Throw to 'system-error
with ENOSYS when NAME cannot be found.
2018-09-10 17:47:52 +02:00
Marius Bakke fe79ce3b1f
Merge branch 'master' into core-updates 2018-09-10 01:37:32 +02:00
Ricardo Wurmus 15cc7e6adf
ui: Add soft port for styling and filtering build output.
* guix/ui.scm (build-output-port): New procedure.
* guix/scripts/package.scm (%default-options): Print build trace.
(guix-package): Use build-output-port.
* guix/scripts/build.scm (guix-build): Use build-output-port.

Co-authored-by: Sahithi Yarlagadda <sahi@swecha.net>
2018-09-09 23:18:21 +02:00
Sahithi Yarlagadda 80ec1b73d2
ui: Add support for colorization.
* guix/ui.scm (ansi-color-tables): New variable.
(color, colorize-string): New procedures.

Signed-off-by: Ricardo Wurmus <rekado@elephly.net>
2018-09-09 22:26:54 +02:00
Marius Bakke 0aeb134850
Merge branch 'master' into core-updates 2018-09-09 17:40:35 +02:00
Ludovic Courtès 5dec93bb8b
gexp: 'file-union' accepts directory names.
* guix/gexp.scm (file-union): Import (guix build utils).  Make the
parent directories of TARGET.
* tests/gexp.scm ("file-union"): New test.
2018-09-08 23:02:01 +02:00
Ludovic Courtès da34a19f3a
guix describe: Display information about the current generation.
* guix/scripts/describe.scm (display-profile-info)[number]: Use the
current generation number instead of the last generation number.
2018-09-07 14:19:42 +02:00
Ludovic Courtès 2b73d82830
guix package: Record package provenance in manifest entries.
* guix/profiles.scm (package->manifest-entry): Add #:properties and
honor it.
* guix/scripts/package.scm (package-provenance)
(package->manifest-entry*): New procedures.
(transaction-upgrade-entry, options->installable): Use
'package->manifest-entry*' instead of 'package->manifest-entry'.
2018-09-07 11:40:25 +02:00
Ludovic Courtès bd7470185b
Add 'guix describe'.
* guix/scripts/describe.scm: New file.
* Makefile.am (MODULES): Add it.
(SH_TESTS): Add tests/guix-describe.sh.
* po/guix/POTFILES.in: Add it.
* guix/scripts/pull.scm (display-profile-content): Export.
* guix/describe.scm (current-profile, current-profile-entries): Export.
* tests/guix-describe.sh: New file.
* doc/guix.texi (Features): Mention 'guix pull' and provenance tracking.
(Invoking guix pull): Link to 'guix describe'.
(Channels): Likewise.
(Invoking guix describe): New node.
2018-09-07 11:40:22 +02:00
Ludovic Courtès ee94cfeb99
pull: Add '--profile'.
* guix/scripts/pull.scm (show-help, %options): Add '--profile'.
(build-and-install): Change 'config-dir' argument to 'profile'.
(guix-pull): Honor '--profile'.
* doc/guix.texi (Invoking guix pull): Document it.
2018-09-07 11:40:18 +02:00
Ludovic Courtès 37a6cdbf1b
git: Don't require users to specifiy "origin/" for branches.
Fixes <https://bugs.gnu.org/32618>.
Reported by Eric Brown <brown@fastmail.com>.

* guix/git.scm (update-cached-checkout): Remove "origin/" from default
REF.  Define CANONICAL-REF and use it instead of REF.
(latest-repository-commit): Remove "origin/" from default REF.
* guix/channels.scm (%default-channels): Remove "origin/" from
'branch'.
2018-09-05 23:50:38 +02:00
Ludovic Courtès cb341c1219
channels: Fix external channel builds.
This fixes a regression introduced in
ca71942445 whereby external channels would
fail to build due to the lack of (gcrypt …) modules.

* guix/channels.scm (channel-instance-derivations): Add 'guile-gcrypt'.
Pass it along CORE to 'build-channel-instance'.
2018-09-05 23:33:49 +02:00
Ludovic Courtès 030f1367f0
channels: Add 'latest-channel-derivation' convenience procedure.
* guix/channels.scm (latest-channel-derivations): Remove.
(latest-channel-instances*, latest-channel-derivation): New procedures.
2018-09-05 12:01:48 +02:00
Ludovic Courtès ca71942445
Switch to Guile-Gcrypt.
This removes (guix hash) and (guix pk-crypto), which now live as part of
Guile-Gcrypt (version 0.1.0.)

* guix/gcrypt.scm, guix/hash.scm, guix/pk-crypto.scm,
tests/hash.scm, tests/pk-crypto.scm: Remove.
* configure.ac: Test for Guile-Gcrypt.  Remove LIBGCRYPT and
LIBGCRYPT_LIBDIR assignments.
* m4/guix.m4 (GUIX_ASSERT_LIBGCRYPT_USABLE): Remove.
* README: Add Guile-Gcrypt to the dependencies; move libgcrypt as
"required unless --disable-daemon".
* doc/guix.texi (Requirements): Likewise.
* gnu/packages/bash.scm, guix/derivations.scm, guix/docker.scm,
guix/git.scm, guix/http-client.scm, guix/import/cpan.scm,
guix/import/cran.scm, guix/import/crate.scm, guix/import/elpa.scm,
guix/import/gnu.scm, guix/import/hackage.scm,
guix/import/texlive.scm, guix/import/utils.scm, guix/nar.scm,
guix/pki.scm, guix/scripts/archive.scm,
guix/scripts/authenticate.scm, guix/scripts/download.scm,
guix/scripts/hash.scm, guix/scripts/pack.scm,
guix/scripts/publish.scm, guix/scripts/refresh.scm,
guix/scripts/substitute.scm, guix/store.scm,
guix/store/deduplication.scm, guix/tests.scm, tests/base32.scm,
tests/builders.scm, tests/challenge.scm, tests/cpan.scm,
tests/crate.scm, tests/derivations.scm, tests/gem.scm,
tests/nar.scm, tests/opam.scm, tests/pki.scm,
tests/publish.scm, tests/pypi.scm, tests/store-deduplication.scm,
tests/store.scm, tests/substitute.scm: Adjust imports.
* gnu/system/vm.scm: Likewise.
(guile-sqlite3&co): Rename to...
(gcrypt-sqlite3&co): ... this.  Add GUILE-GCRYPT.
(expression->derivation-in-linux-vm)[config]: Remove.
(iso9660-image)[config]: Remove.
(qemu-image)[config]: Remove.
(system-docker-image)[config]: Remove.
* guix/scripts/pack.scm: Adjust imports.
(guile-sqlite3&co): Rename to...
(gcrypt-sqlite3&co): ... this.  Add GUILE-GCRYPT.
(self-contained-tarball)[build]: Call 'make-config.scm' without
 #:libgcrypt argument.
(squashfs-image)[libgcrypt]: Remove.
[build]: Call 'make-config.scm' without #:libgcrypt.
(docker-image)[config, json]: Remove.
[build]: Add GUILE-GCRYPT to the extensions  Remove (guix config) from
the imported modules.
* guix/self.scm (specification->package): Remove "libgcrypt", add
"guile-gcrypt".
(compiled-guix): Remove #:libgcrypt.
[guile-gcrypt]: New variable.
[dependencies]: Add it.
[*core-modules*]: Remove #:libgcrypt from 'make-config.scm' call.
Add #:extensions.
[*config*]: Remove #:libgcrypt from 'make-config.scm' call.
(%dependency-variables): Remove %libgcrypt.
(make-config.scm): Remove #:libgcrypt.
* build-aux/build-self.scm (guile-gcrypt): New variable.
(make-config.scm): Remove #:libgcrypt.
(build-program)[fake-gcrypt-hash]: New variable.
Add (gcrypt hash) to the imported modules.  Adjust load path
assignments.
* gnu/packages/package-management.scm (guix)[propagated-inputs]: Add
GUILE-GCRYPT.
[arguments]: In 'wrap-program' phase, add GUILE-GCRYPT to the search
path.
2018-09-04 17:25:11 +02:00
Ludovic Courtès 7e1d229019
inferior: Add home-page and location package accessors.
* guix/inferior.scm (inferior-package-home-page)
(inferior-package-location): New procedures.
* tests/inferior.scm ("inferior-packages"): Test them.
2018-09-04 17:22:55 +02:00
Marius Bakke 70dc8db8e7
Merge branch 'master' into core-updates 2018-09-03 19:20:06 +02:00
Ludovic Courtès 0d39a3b989
Add (guix channels) and use it in (guix scripts pull).
* guix/channels.scm: New file.
* Makefile.am (MODULES): Add it.
* guix/scripts/pull.scm: Use it.
(%default-options): Remove 'repository-url' and 'ref'.
(show-help, %options): Add '--channels'.
(%self-build-file, %pull-version, build-from-source)
(whole-package-for-legacy, derivation->manifest-entry): Remove.  These
now exist in a similar form in (guix channels).
(build-and-install): Change 'source' to 'instances'.  Remove #:url,
 #:branch, and #:commit.  Rewrite using 'channel-instances->manifest'.
(channel-list): New procedure.
(guix-pull): Parameterize %REPOSITORY-CACHE-DIRECTORY.  Call
'honor-lets-encrypt-certificates!' unconditionally.  Load
~/.config/guix/channels.scm.  Rewrite to use (guix channels).
[use-le-certs?]: Remove.
* po/guix/POTFILES.in: Add (guix channels).
* doc/guix.texi (Invoking guix pull): Group the description of '--url',
'--commit', and '--branch'.  Remove mention of 'GUIX_PULL_URL'.  Add
references to "Channels".  Document '--channels'.
(Channels): New node.
(Defining Packages): Link to "Channels" instead of "Package Modules".
(Invoking guix edit): Link to "Package Modules" instead of "Defining
Packages".
(Package Modules): Document both GUIX_PACKAGE_PATH and channels.
2018-09-02 16:51:40 +02:00
Ludovic Courtès fe634eaf93
Add (guix describe) and use it to initialize '%package-search-path'.
* guix/describe.scm: New file.
* Makefile.am (MODULES): Add it.
* gnu/packages.scm (%default-package-module-path): New variable.
(%package-module-path): Honor 'package-path-entries'.
* build-aux/update-NEWS.scm (main): Use %DEFAULT-PACKAGE-MODULE-PATH
instead of (last (%package-module-path)).
2018-09-02 16:43:10 +02:00
Ludovic Courtès 02fa1d251c
discovery: Add 'scheme-modules*'.
* guix/self.scm (scheme-modules*): Move to...
* guix/discovery.scm (scheme-modules*): ... here.  New procedure.  Make
'sub-directory' an optional parameter.
2018-09-02 16:43:10 +02:00
Ludovic Courtès 301aa9e76c
pack: Correctly report "unknown pack format" errors.
* guix/scripts/pack.scm (guix-pack): Fix "unknown pack format" error
message.
2018-08-31 17:26:56 +02:00
Ludovic Courtès 8e1395be5c
records: Adjust to test changes in 'record-abi-mismatch-error'.
Fixes a test failure introduced in
de5cbd4a38.

* guix/records.scm (abi-check): Refer to TYPE in an unquoted context so
we get at the RTD.
* tests/records.scm ("ABI checks"): Adjust 'catch' handler to changes
in the 'record-abi-mismatch-error' arguments.
2018-08-31 17:26:56 +02:00
Ricardo Wurmus ac906cb7bb
import: pypi: Support recursive importing.
* guix/import/pypi.scm (guess-requirements): Use upstream names.
(compute-inputs): Return the upstream dependency names as an additional value.
(make-pypi-sexp): Likewise.
(pypi->guix-package): Memoize it.
(pypi-recursive-import): New procedure.
* guix/scripts/import/pypi.scm (show-help, %options): Accept "recursive"
option.
(guix-import-pypi): Use pypi-recursive-import.
* doc/guix.texi (Invoking guix import): Document it.
2018-08-30 15:22:22 +02:00
Ricardo Wurmus e37f889404
import: pypi: Also guess dependencies from *.egg-info/requires.txt.
* guix/import/pypi.scm (guess-requirements): Extract "requires.txt" from the
egg-info directory in addition to "requirements.txt"; strip off version
constraints; use call-with-temporary-directory.
2018-08-30 15:22:14 +02:00
Ricardo Wurmus a3ece51a29
import: stackage: Support recursive importing.
* guix/import/hackage.scm (hackage-name->package-name): Export procedure.
* guix/import/stackage.scm (lts-info-packages-lts-info): Fix match expression.
(stackage-recursive-import): New procedure.
(stackage->guix-package): Memoize results.
* guix/scripts/import/stackage.scm (show-help, %options,
guix-import-stackage): Support recursive importing.
* doc/guix.texi (Invoking guix import): Document option.
2018-08-30 15:22:06 +02:00
Ludovic Courtès de5cbd4a38
records: Adjust 'record-abi-mismatch-error' arguments.
Previously, 'display-error' (as used by 'warn-about-load-error', for
instance) would be called with a wrong number of arguments when a
'record-abi-mismatch-error' was caught:

  warning: failed to load '(gnu tests install)':
  Backtrace:
  [...]
  ERROR: In procedure display-error:
  Wrong number of arguments to #<procedure display-error (_ _ _ _ _ _)>

Now you get warnings and error reports as intended:

  warning: failed to load '(gnu tests install)':
  In procedure abi-check: <openssh-configuration>: record ABI mismatch; recompilation needed
  warning: failed to load '(gnu tests ssh)':
  In procedure abi-check: <openssh-configuration>: record ABI mismatch; recompilation needed

* guix/records.scm (print-record-abi-mismatch-error): Remove.
Remove top-level call to 'set-exception-printer!'.
(abi-check): Use arguments as expected by 'display-error'.
2018-08-29 23:32:01 +02:00
Marius Bakke 61fca0fd22
Merge branch 'master' into core-updates 2018-08-28 01:22:24 +02:00
Ludovic Courtès a0a2c2f16a
pull: Use (git) and (guix git) unconditionally.
The autoload hack was added a year ago, before 0.14.0, i.e., before any
release would depend on Guile-Git.  Both 0.14.0 and 0.15.0 required
Guile-Git, and 'guix pull' now automatically pulls it in, so this hack
is no longer necessary.

* guix/scripts/pull.scm: Use (git) and (guix git).  Remove top-level
call to 'module-autoload!'.
(ensure-guile-git!): Remove.
(guix-pull): Remove call to 'ensure-guile-git!'.
2018-08-27 23:22:17 +02:00
Ludovic Courtès f2d0a2cf5c
self: Shrink the module search path of the 'guix' command.
Previously we'd have lots of useless entries on the search paths, such
as libtasn1, libidn2, zlib, gmp, etc. because they are propagated by
gnutls.

* guix/self.scm (guix-command)[source-directories, object-directories]:
New variables.  Use them in the body of "guix-command".  Filter their
items with 'file-exists?'.
2018-08-27 23:22:17 +02:00
Ludovic Courtès 8a928aa729
cve: Update feed URL.
* guix/cve.scm (yearly-feed-uri): Remove "static." from the URL since
the web site now redirects to the URL without "static.".
2018-08-26 01:47:40 +02:00
Marius Bakke 839167ff9d
Merge branch 'staging' into core-updates 2018-08-25 16:44:07 +02:00
Marius Bakke 173d291466
Merge branch 'master' into staging 2018-08-25 16:38:51 +02:00
Ludovic Courtès 93c333895a
grafts: Add (guix build debug-link) and use it.
Fixes <https://bugs.gnu.org/19973>.
Reported by Mark H Weaver <mhw@netris.org>.

* guix/build/debug-link.scm: New file.
* guix/build/graft.scm (%graft-hooks): New variable.
(graft): Add #:hooks and honor it.
* guix/grafts.scm (graft-derivation/shallow): Add (guix build
debug-link) and (guix elf) to #:modules.
* tests/debug-link.scm: New file.
* Makefile.am (MODULES): Add guix/build/debug-link.scm.
(SCM_TESTS): Add tests/debug-link.scm.
2018-08-24 18:01:05 +02:00
Ludovic Courtès e4297aa8b9
grafts: Add high-level 'graft' procedure on the build side.
* guix/build/graft.scm (graft): New procedure.
* guix/grafts.scm (graft-derivation/shallow)[build]: Use it instead of
inline code.
2018-08-24 17:57:56 +02:00
Marius Bakke 233df51ebc
Merge branch 'master' into staging 2018-08-22 18:14:04 +02:00
Marius Bakke bf91e6835d
build-system/meson: Strip RUNPATH and remove PatchELF traces.
* guix/build-system/meson.scm (%meson-build-system-modules): Don't
import (guix build rpath).
* guix/build/meson-build-system.scm (fix-runpath): Rename to ...
(shrink-runpath): ... this.  Update docstring.  Remove AUGMENT-RPATH calls and
related code.
(%standard-phases): Add 'shrink-runpath'.
2018-08-22 18:01:09 +02:00
Ludovic Courtès a81b59b1bf
inferior: Adjust for Guile 2.0.
Partly fixes <https://bugs.gnu.org/32326>.
Reported by Michael Bowcutt <mbowcutt@riseup.net>.

* guix/inferior.scm (open-inferior): Wrap 'setvbuf' call in 'cond-expand'.
2018-08-21 23:27:08 +02:00
Pierre Neidhardt dece8c91a9
build-system/asdf: Fix typo in "dependency".
* guix/build-system/asdf.scm (default-lisp): Fix typo in "dependency".
2018-08-21 16:27:03 +02:00
Jelle Licht e6c4e41102
utils: Generate valid substitutions in 'wrap-program'.
* guix/build/utils.scm (wrap-program)[export-variable]: Generate valid bash
  substitutions when using custom separators.
2018-08-20 17:00:45 +02:00
Ludovic Courtès bab4dc58f7
import: github: Filter out tags that don't look like version numbers.
* guix/import/github.scm (latest-released-version): Filter out RELEASE
if it doesn't start with digit.
2018-08-20 16:32:18 +02:00
Ludovic Courtès 45c01189cc
import: github: Get /tags when /releases returns the empty list.
This allows "guix refresh" to work for many packages where it would
previously fail with "no updater for PACKAGE".

* guix/import/github.scm (fetch-releases-or-tags): New procedure.
(latest-released-version): Use it instead of calling 'json-fetch'.
Adjust 'hash-ref' call.
2018-08-20 16:32:18 +02:00