Commit Graph

3864 Commits

Author SHA1 Message Date
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
Ludovic Courtès
2766282f5a
import: github: Request API v3 in the 'Accept' header.
* guix/import/json.scm (json-fetch): Add #:headers argument and honor it.
* guix/import/github.scm (latest-released-version): Pass #:headers to
'json-fetch'.
2018-08-20 16:32:18 +02:00
Julien Lepiller
dd1e45335e
guix: svn: Remove all .svn folders.
* guix/build/svn.scm (svn-fetch): Remove all .svn folders as they contain
timestamps.
2018-08-19 17:34:22 +02:00
Marius Bakke
df570bf271
Merge branch 'master' into staging 2018-08-16 20:56:38 +02:00
Ricardo Wurmus
b86c019efb
Merge branch 'staging' into core-updates 2018-08-13 20:39:32 +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
Tobias Geerinckx-Rice
9aba9b1278
Migrate search.cpan.org home pages to metacpan.org.
The venerable search.cpan.org has retired[0].

[0]: https://log.perl.org/2018/05/goodbye-search-dot-cpan-dot-org.html

* guix/import/cpan.scm (cpan-home): Generate metacpan.org home page URIs.
Update all previously generated ones in (gnu packages) to their
canonical new homes.
2018-08-11 17:22:31 +02:00
Marius Bakke
7b38f045c0
Merge branch 'master' into staging 2018-08-10 15:32:51 +02:00
Ricardo Wurmus
a7e231a2a3
build-system/haskell: Let all phases return #T unconditionally.
* guix/build/haskell-build-system.scm (make-ghc-package-database, register,
check, haddock): Return #T unconditionally; use INVOKE.
2018-08-09 14:48:31 +02:00
Ricardo Wurmus
f60784228a
import: cabal, hackage: Avoid error when custom setup section is missing.
Fixes <https://debbugs.gnu.org/32387>.

* guix/import/cabal.scm (eval-cabal): Avoid mis-match when the custom-setup
section cannot be created.
* guix/import/hackage.scm (cabal-custom-setup-dependencies->names): Do not
crash when cabal-package-custom-setup returns #F.
2018-08-07 20:39:12 +02:00
Mark H Weaver
82230603ce
build-system/gnu: If a phase returns #f, the build fails.
Fixes <https://bugs.gnu.org/31974>.
Introduced by commit d8a3b1b9e8.

* guix/build/gnu-build-system.scm (gnu-build): Use 'every' instead
of 'for-each'.
2018-08-03 23:12:33 -04:00
Marius Bakke
4214066d45
Merge branch 'master' into core-updates 2018-08-01 15:53:17 +02:00
Marius Bakke
869250809b
Merge branch 'master' into staging 2018-07-30 18:08:28 +02:00
Ludovic Courtès
b90d97ec2e
ssh: Display the size of the store items being sent.
* guix/ssh.scm (send-files): Compute the size of MISSING and display
it.
2018-07-29 18:50:28 +02:00
Marius Bakke
1af575f04d
Merge branch 'master' into staging 2018-07-28 18:34:59 +02:00
Marius Bakke
a1454169e0
gnu: python: Update to 3.7.0.
* gnu/packages/python.scm (python-3.6): Rename to ...
(python-3.7): ... this.  Update to 3.7.0.
[arguments]: Remove phase 'patch-timestamp-for-pyc-files' and related code.
Add phases to unset SOURCE_DATE_EPOCH during the check phase.
(python-3): Is now PYTHON-3.7.
* guix/build/python-build-system.scm (enable-bytecode-determinism): Don't set
DETERMINISTIC_BUILD.
2018-07-28 15:52:26 +02:00
Marius Bakke
94eb59fb4a
build-system/meson: Remove RUNPATH workarounds.
* guix/build-system/meson.scm (default-patchelf): Remove.
(lower)[build-inputs]: Remove PATCHELF.
(meson-build): Don't delete 'fix-runpath' phase on armhf.
* guix/build/meson-build-system.scm (configure): Add "--c_link_args" and
  "-cpp_link_args" instead of setting LDFLAGS.
(meson-build): Don't apply 'fix-runpath' phase.
2018-07-28 14:54:18 +02:00
Danny Milosavljevic
d804d0b9ef
import: hackage: Emit native-inputs in the importer.
* guix/import/cabal.scm (cabal-custom-setup-dependencies): Export.
(cabal-package-custom-setup): Export.
(<cabal-package>): New field "custom-setup".
(make-cabal-package): Modify.
(eval-cabal): Modify.
* guix/import/hackage.scm (cabal-dependencies->names): Factor out...
(cabal-test-dependencies->names): ...this.
(cabal-custom-setup-dependencies->names): New procedure.
(hackage-module->sexp): Modify.
2018-07-27 11:42:53 +02:00
Ludovic Courtès
8bece84022
gnu: guile: Remove version 2.2.2.
* gnu/packages/guile.scm (guile-2.2.2): Remove.
* guix/self.scm (guile-for-build): Remove special case for "2.2.2".
(guix-derivation): Likewise.
* build-aux/build-self.scm (build): Likewise.
2018-07-27 11:28:15 +02:00
Ludovic Courtès
2abd76e8af
gnu: guile: Update to 2.2.4.
* gnu/packages/guile.scm (guile-2.2): Update to 2.2.4.
(guile-2.2.4): Remove.
* gnu/packages/package-management.scm (guix)[inputs]: Switch to
GUILE-2.2.
* guix/self.scm (guile-for-build): Likewise.
2018-07-27 11:22:12 +02:00
Ludovic Courtès
8afa18d6e7
gexp: Remove #:deprecation-warnings from 'imported-files'.
This is a followup to 30d722c392.

* guix/gexp.scm (imported-files/derivation): Remove
 #:deprecation-warnings.  Pass "GUILE_WARN_DEPRECATED=no"
unconditionally to #:env-vars of 'gexp->derivation'.  Adjust caller.
(imported-files): Remove #:deprecation-warnings and adjust callers.
(imported-modules): Likewise.
(compiled-modules, gexp->derivation): Adjust accordingly.
2018-07-27 00:09:52 +02:00
Ludovic Courtès
4a42abc52c
gexp: Inline bug-fix in 'compiled-modules'.
This is a followup to 5d669883ec.

* guix/gexp.scm (compiled-modules)[build-utils-hack?]: Remove.
Inline everything as if BUILD-UTILS-HACK? is true.
2018-07-27 00:02:00 +02:00
Ludovic Courtès
8c7bebd6ea
gexp: Remove backward compatibility hack for 'imported-files'.
* guix/gexp.scm (gexp->derivation): Remove #:import-creates-derivation?.
(imported-files): Remove #:derivation? and adjust callers.
(imported-modules), compiled-modules): Likewise.
* guix/packages.scm (patch-and-repack): Adjust 'gexp->derivation' call.
2018-07-26 22:59:49 +02:00
Ludovic Courtès
28c4905b12
packages: 'patch-and-repack' compresses tarballs again.
* guix/packages.scm (patch-and-repack): Add missing "a" in "tar cvfa".
Fixes a regression introduced in
3e95125e9b whereby we'd always create
uncompressed tarballs.
2018-07-26 22:58:30 +02:00
Ludovic Courtès
ac46a1c8e4
Merge branch 'master' into core-updates 2018-07-26 18:15:13 +02:00
Danny Milosavljevic
8376f10a30
ruby-build-system: Make phase "replace-git-ls-files" handle more cases.
* guix/build/ruby-build-system.scm (replace-git-ls-files): Modify.
2018-07-24 22:55:38 +02:00
Marius Bakke
706ae8e15c
Merge branch 'master' into core-updates 2018-07-24 19:56:35 +02:00
Marius Bakke
8440db459a
import: PyPI: Update redirected URL.
* guix/import/pypi.scm (guix-package->pypi-name, pypi->guix-package): Update
docstrings.
(pypi-package?): Test for pypi.org, too.
(pypi-fetch): s/pypi.python.org/pypi.org/
* tests/pypi.scm ("guix-package->pypi-name, new URL style",
"pypi->guix-package", "pypi->guix-package, wheels"): Likewise.
2018-07-24 17:42:04 +02:00
Ludovic Courtès
2a3b1b3235
build-system: Add 'guile-build-system'.
* guix/build-system/guile.scm, guix/build/guile-build-system.scm: New
files.
* Makefile.am (MODULES): Add them.
* doc/guix.texi (Build Systems): Document 'guile-build-system'.
2018-07-23 12:25:31 +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
Marius Bakke
3e95125e9b
Revert "packages: Enable threaded compression of source tarballs."
Threaded compression makes tarballs non-deterministic: the result depends on
the number of threads used for compressing.  See <https://bugs.gnu.org/31015>.

This reverts commit c8a3dea847.
2018-07-22 17:58:16 +02:00
Ludovic Courtès
e475211869
database: Reset timestamps to one second after the Epoch.
Previously, store items registered in the database by this code (for
instance, store items retrieved by 'guix offload' and passed to
'restore-file-set') would have an mtime of 0 instead of 1.

This would cause problems for things like .go files: Guile would
consider them to be older than the corresponding .scm file, and
consequently it would ignore them and possibly use another (incorrect)
.go file.

Reported by Ricardo Wurmus.

* guix/store/database.scm (reset-timestamps): Pass 1, not 0, to
'utime'.
* tests/store-database.scm ("register-path"): Check the mtime of FILE
and REF.
2018-07-20 15:01:33 +02:00
Ludovic Courtès
4f89a8eec6
deduplication: Work around Guile bug in 'seek'.
Fixes <https://bugs.gnu.org/32161>.
Reported by Ricardo Wurmus <rekado@elephly.net>.

This mostly reverts 83099892e0.

* guix/store/deduplication.scm (counting-wrapper-port): New procedure.
(nar-sha256): Use it.
2018-07-20 15:01:33 +02:00