Commit Graph

1132 Commits (5d986a3b418a29d83dd6d3ddc1556694bc10e9eb)

Author SHA1 Message Date
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
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
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
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 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
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
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
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 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 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 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 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 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 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
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
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 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 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 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
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
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
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
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 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 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 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
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 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 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
Ricardo Wurmus a928596162
import: hackage: Support recursive importing.
* guix/import/hackage.scm (hackage-recursive-import): New procedure.
(hackage-module->sexp): Return dependencies alongside dependencies.
(hackage->guix-package): Memoize results.
* guix/scripts/import/hackage.scm (show-help, %options, guix-import-hackage):
Support recursive importing.
* doc/guix.texi (Invoking guix import): Document option.
2018-08-11 18:53:46 +02:00
Marius Bakke e9be2c5409
Revert "guix: Compress and decompress xz archives in parallel."
Threaded compression makes archives non-deterministic: the result depends on
the number of threads used for compressing.  See <https://bugs.gnu.org/31015>.

This reverts commit 63102406f2.
2018-07-22 18:01:35 +02:00
Ludovic Courtès bca302c67a
pull: Display new/upgraded packages upon completion.
* guix/scripts/pull.scm (display-profile-news): New procedure.
(build-and-install): Call it.
(display-new/upgraded-packages): Add #:heading and honor it.
2018-07-13 17:28:40 +02:00
Ludovic Courtès dc733e6a12
pull: Use (guix inferior) to display new and upgraded packages.
* guix/scripts/pull.scm (display-profile-content): Call
'display-generation'.
(display-new/upgraded-packages, display-profile-content-diff): New
procedures.
(process-query)[list-generation]: Remove.
[list-generations]: New procedure.
Adjust accordingly.
* doc/guix.texi (Invoking guix pull): Update example of '-l'.
2018-07-13 17:28:40 +02:00
Ludovic Courtès 2ca299caf6
Add (guix inferior) and (guix scripts repl).
* guix/inferior.scm, guix/scripts/repl.scm, tests/inferior.scm: New
files.
* Makefile.am (MODULES): Add 'guix/scripts/repl.scm' and
'guix/inferior.scm'.
(SCM_TESTS): Add 'tests/inferior.scm'.
* doc/guix.texi (Invoking guix repl): New node.
2018-07-13 17:28:39 +02:00
Ludovic Courtès bc6e291ef0
guix package: Use relative symlinks to generations.
Reported by Roel Janssen <roel@gnu.org>
at <https://lists.gnu.org/archive/html/guix-devel/2018-07/msg00036.html>.

* guix/profiles.scm (switch-to-generation): Use (basename generation) as
the symlink target.
* guix/scripts/package.scm (build-and-use-profile): Likewise,
use (basename name) as the symlink target.
* tests/guix-package.sh: Adjust --roll-back test accordingly.  Add
explicitly test with '-p foo/prof'.
2018-07-13 17:28:39 +02:00
Oleg Pykhalov 88388766f7
import: gem: Add recursive import.
* doc/guix.texi (Invoking guix import): Document gem recursive import.
* guix/import/gem.scm (gem->guix-package): Return package and dependencies
values.
(gem-recursive-import): New procedure.
* guix/scripts/import/gem.scm (show-help, %options): Add recursive option.
(guix-import-gem): Use 'gem-recursive-import'.
* tests/gem.scm (test-json): Rename to 'test-foo-json'.
("gem->guix-package"): Use 'test-foo-json'.
(test-bar-json, test-bundler-json): New variables.
("gem-recursive-import"): New test.
2018-07-11 07:08:54 +03:00