Commit Graph

4130 Commits (b8fa86adfc01205f1d942af8cb57515eb3726c52)

Author SHA1 Message Date
Maxim Cournoyer 7e84d3eef7
build: go-build-system: Use WHEN for side-effect conditionals.
* guix/build/go-build-system.scm (unpack): Replace single branch `if' by
`when'.
2019-05-05 20:06:18 -04:00
Maxim Cournoyer b5f0528354
build: go-build-system: Re-ident.
* guix/build/go-build-system.scm (unpack): Fix indentation.
2019-05-05 20:06:18 -04:00
Ricardo Wurmus 6490cd31cc
guix: Update to Bioconductor 3.9.
* guix/build-system/r.scm (bioconductor-uri): Use 3.9 archive URL.
* guix/import/cran.scm (%bioconductor-version): Update to 3.9.
2019-05-06 00:14:27 +02:00
Ludovic Courtès 746ac457cc
Merge branch 'version-1.0.0' 2019-05-02 15:32:30 +02:00
Ludovic Courtès 757e633d57
build: Change default substitute server to "ci.guix.gnu.org".
* config-daemon.ac: Replace "ci.guix.info" with "ci.guix.gnu.org".
* doc/guix.texi (SUBSTITUTE-SERVER): Likewise.
* etc/substitutes/ci.guix.gnu.org.pub: New file.
* Makefile.am (dist_pkgdata_DATA): Add it.
* guix/scripts/build.scm (%default-log-urls): Update.
* guix/scripts/substitute.scm (%default-substitute-urls): Likewise.
* guix/store.scm (%default-substitute-urls): Likewise.
* guix/self.scm (miscellaneous-files): Add "ci.guix.gnu.org".
2019-05-01 11:05:47 +02:00
Tobias Geerinckx-Rice e13bd3088d
guix: Fix another typo in another docstring.
* guix/build/clojure-utils.scm (include-list\exclude-list)<docstring>:
Fix typo.
2019-04-30 14:13:50 +02:00
Tobias Geerinckx-Rice 88401314f9
guix: Fix typo in docstring.
* guix/build/syscalls.scm (device-in-use?)<docstring>: Fix typo.
2019-04-30 13:56:35 +02:00
Ludovic Courtès c20d4cac1f
processes: Gracefully handle daemons without clients.
Fixes <https://bugs.gnu.org/34716>.
Reported by Mark H Weaver <mhw@netris.org>.

The problem could be reproduced by running, on one hand:

  sh -c 'exec -a guix-daemon sleep 777'

and on the other hand:

  guix processes

If there is no process with PID 777, 'guix processes' would barf as it
stumbles upon a <daemon-session> record whose client is #f.

* guix/scripts/processes.scm (daemon-sessions)[child-process->session]:
New procedure, with lambda formerly passed to 'map'.  Handle #f returns
from 'lookup-process'.
Call 'child-process->session' within 'filter-map', not just 'map'.
2019-04-29 21:54:10 +02:00
Ludovic Courtès c21d912a02
processes: 'process-open-files' ignores disappeared /proc/PID/fd entries.
Previously, 'process-open-files' would throw ENOENT if an entry had
vanished after the 'scandir' call and before the 'readlink' call.

* guix/scripts/processes.scm (process-open-files): Catch ENOENT errors
from 'readlink'.
2019-04-29 21:39:38 +02:00
Ludovic Courtès da56f10971
guix package: Add 'guix search' alias.
* guix/scripts/search.scm: New file.
* Makefile.am (MODULES): Add it.
* po/guix/POTFILES.in: Add it.
* tests/guix-package-aliases.sh: Add test.
* doc/guix.texi (Invoking guix package): Document it and use it in a
couple of examples.
2019-04-29 12:19:24 +02:00
rendaw 9d3053819d
file-systems: Support the 'no-atime' flag.
* guix/build/syscalls.scm (MS_NOATIME): New variable.
* gnu/build/file-systems.scm (mount-flags->bit-mask): Support it.
* doc/guix.texi (File Systems): Document it and add cross-references to
the relevant documentation.

Co-authored-by: Ludovic Courtès <ludo@gnu.org>
2019-04-29 12:19:03 +02:00
Ludovic Courtès d824cfbabe
guix package: Add 'install', 'remove', and 'upgrade' aliases.
* guix/scripts/install.scm, guix/scripts/remove.scm,
guix/scripts/upgrade.scm, tests/guix-package-aliases.sh: New files.
* Makefile.am (MODULES, SH_TESTS): Add them.
* po/guix/POTFILES.in: Add them.
* guix/scripts/package.scm (guix-package): Split with...
(guix-package*): ... this.  New procedure.
* doc/guix.texi (Invoking guix package): Document them.
(Binary Installation, Application Setup, Package Management)
(Packages with Multiple Outputs, Package Modules)
(X.509 Certificates, Installing Debugging Files): Use 'guix install' in
simple examples.
* etc/completion/bash/guix (_guix_complete): Handle "install", "remove",
and "upgrade".
2019-04-29 10:13:44 +02:00
Ludovic Courtès 0663302618
describe: Provide a hint when origin detection fails.
* guix/scripts/describe.scm (display-checkout-info): Add call to
'display-hint' in the error case.
2019-04-28 22:57:06 +02:00
Ludovic Courtès 7d62fa206b
Merge branch 'staging' 2019-04-28 14:45:35 +02:00
Julien Lepiller 554b30d2ac
self: Rebuild translated manuals.
* guix/self.scm (info-manual): Run po4a and related commands to generate
translated texi files before building translated manuals.
* guix/build/po.scm: New file.
* Makefile.am (MODULES_NOT_COMPILED): Add it.
2019-04-27 17:13:18 +02:00
Julien Lepiller c3634df2a4
gnu: ocaml@4.02: Remove the package, affected by a CVE, and its dependent
packages.

This fixes <https://bugs.gnu.org/27462>.

* gnu/packages/ocaml.scm (ocaml-4.02, camlp4-4.02, 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, 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, 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-bin-prot, ocaml4.02-fieldslib)
(ocaml4.02-ppx-core, ocaml4.02-ppx-optcomp, ocaml4.02-ppx-driver)
(ocaml4.02-cppo, ocaml4.02-ppx-deriving, ocaml4.02-ppx-type-conv)
(ocaml4.02-ppx-inline-test, ocaml4.02-ppx-bench, ocaml4.02-ppx-compare)
(ocaml4.02-sexplib, ocaml4.02-typerep, ocaml4.02-variantslib)
(ocaml4.02-ppx-sexp-conv, ocaml4.02-ppx-variants-conv)
(ocaml4.02-ppx-here, ocaml4.02-ppx-assert, ocaml4.02-ppx-enumerate)
(ocaml4.02-ppx-let, ocaml4.02-ppx-typerep-conv, ocaml4.02-ppx-sexp-value)
(ocaml4.02-ppx-pipebang, ocaml4.02-ppx-bin-prot, ocaml4.02-ppx-fail)
(ocaml4.02-ppx-custom-printf, ocaml4.02-ppx-sexp-message)
(ocaml4.02-ppx-fields-conv, ocaml4.02-seq, ocaml4.02-re)
(ocaml4.02-ppx-expect, ocaml4.02-ppx-jane, ocaml4.02-core-kernel)
(ocaml4.02-async-kernel, ocaml4.02-async-rpc-kernel, ocaml4.02-core)
(ocaml4.02-async-unix, ocaml4.02-async-extra, ocaml4.02-async)
(ocaml4.02-ocplib-endian, ocaml4.02-easy-format, optcomp)
(ocaml4.02-piqilib, ocaml4.02-uuidm, ocaml4.02-graph, ocaml4.02-piqi)
(ocaml4.02-camomile, ocaml4.02-zed, ocaml4.02-lambda-term): Remove variables.
* guix/build-system/ocaml.scm (default-ocaml4.02)
(default-ocaml4.02-findlib, package-with-ocaml4.02)
(strip-ocaml4.02-variant): Remove variables.
2019-04-25 19:01:31 +02:00
Tobias Geerinckx-Rice 52beae7b8a
gnu, guix: Yearly ritual purging of the filesystems.
* gnu/packages/android.scm (android-ext4-utils)[synopsis]: Fix ‘file
system’ spelling.
* gnu/packages/disk.scm (rmlint)[synopsis, description]: Likewise.
* gnu/packages/golang.scm (go-github-com-kr-fs)[synopsis, description]:
Likewise & edit for grammar.
* gnu/packages/ipfs.scm (gx, go-ipfs)[description]: Likewise.
* /gnu/packages/java.scm (java-commons-vfs)[synopsis]: Likewise.
* gnu/packages/linux.scm (fuseiso)[description]: Likewise.
(genext2fs)[synopsis, description]: Likewise.
* gnu/packages/package-management.scm (libostree)[description]: Likewise.
* gnu/packages/python-xyz.scm (python-requests-file)[description]:
Likewise & mark up.
* gnu/packages/rails.scm (ruby-with-advisory-lock)[description]:
Likewise.
* gnu/packages/ruby.scm (ruby-rerun)[description]: Likewise.
* guix/build/go-build-system.scm (setup-go-environment)<docstring>:
Likewise.
* guix/store/deduplication.scm (get-temp-link)<docstring>: Likewise.
2019-04-25 04:42:16 +02:00
Ludovic Courtès 17503ea8a2
self: Install 'guix.zh_CN.info'.
Reported by Julien Lepiller.

* guix/self.scm (info-manual): Adjust file name regexp so that it
matches *.zh_CN.texi.
2019-04-25 00:45:34 +02:00
Ludovic Courtès af41e504cf
guix system: Compute 'bootcfg' only for 'init' and 'reconfigure'.
Previously, 'guix system vm' would start by computing the bootcfg
derivation, which itself depended on an incorrect OS derivation (for the
original OS instead of the one passed through
'virtualized-operating-system'.)  That added overhead and would force
the user's config file to define a root file system, for example, even
though it makes no sense in the case of a VM.

* guix/scripts/system.scm (perform-action)[bootcfg]: Limit to the 'init'
and 'reconfigure' actions.
2019-04-23 23:44:35 +02:00
Marius Bakke 37da4fbe15
Merge branch 'master' into staging 2019-04-23 19:43:59 +02:00
Ludovic Courtès a06a95baff
pull: Create profile after the store connection has been opened.
Fixes <https://bugs.gnu.org/35341>.
Reported by Florian Pelz <pelzflorian@pelzflorian.de>.

Previously, we'd call 'ensure-default-profile' before the connection to
the daemon has been opened.  On the first connection, the daemon ensures
that /var/guix/profiles/per-user is world-writable.  Since we were
calling 'ensure-default-profile' before that,
/var/guix/profiles/per-user was typically non-writable (555 and
root-owned), and thus 'guix pull' would error out.

* guix/scripts/pull.scm (guix-pull): Call 'ensure-default-profile'
within 'with-store'.
2019-04-22 12:01:32 +02:00
Ludovic Courtès c5265a0951
pull: Add '--news'.
Suggested by Tobias Geerinckx-Rice <me@tobias.gr>.

* guix/scripts/pull.scm (%options, show-help): Add '--news'.
(display-profile-news): Add #:current-is-newer? and #:concise?.
Honor them.
(build-and-install): Pass #:concise? #t.
(display-new/upgraded-packages)[concise/max-item-count]: New variable.
Add call to 'display-hint'.
(process-query): Add clause for 'display-news'.
* doc/guix.texi (Invoking guix pull): Add '--news'.
2019-04-22 12:01:32 +02:00
Ludovic Courtès ea261dea0c
guix build: Accept multiple '-s' options.
* guix/scripts/build.scm (%default-options): Remove 'system'.
(%options) <--system>: Keep previous occurrences of 'system in RESULT.
(options->derivations)[system]: Remove.
[systems, things-to-build]: New variables.
[compute-derivation]: New procedure.
Iterate on all of SYSTEMS to compute the derivations of THINGS-TO-BUILD.
* tests/guix-build.sh: Add test for one and multiple '-s' flags.
* doc/guix.texi (Additional Build Options): Document this behavior.
2019-04-19 17:46:40 +02:00
Christopher Baines 3fdb9a375f
guile-build-system: Support building in parallel.
* guix/build/guile-build-system.scm (build): Use invoke-each, instead of
for-each, to use multiple cores if available.
(invoke-each, report-build-process): New procedures.
2019-04-18 23:13:48 +01:00
Ludovic Courtès 702c3c7dab
lint: 'check-github-url' uses our own 'open-connection-for-uri'.
Fixes <https://bugs.gnu.org/35053>.
Reported by Efraim Flashner <efraim@flashner.co.il>.

Previously 'check-github-url' would let Guile 2.2's (web client) module
take care of opening the connection.  Consequently, it wouldn't use the
TLS priority strings that we use in (guix build download),
'open-connection-for-uri'.  In particular, it would not disable TLSv1.3,
which would trigger <https://bugs.gnu.org/34102> for github.com.

* guix/scripts/lint.scm (check-github-url): Add #:timeout parameter.
[follow-redirect]: Change parameter name to 'url' and pass it to
'string->uri'.  Call 'guix:open-connection-for-uri' to open the
connection and pass it to 'http-head' via #:port.
2019-04-18 17:43:56 +02:00
Ludovic Courtès 72f749dcb8
pull: '--url', '--commit', and '--branch' apply to the 'guix' channel.
Suggested by pkill9 <pkill9@runbox.com>.

* guix/scripts/pull.scm (channel-list): Apply REF and URL to the 'guix'
channel.
* doc/guix.texi (Invoking guix pull): Adjust accordingly.
2019-04-17 13:56:40 +02:00
Ludovic Courtès f2d86ed0b3
build: No longer substitute 'LIBGCRYPT'.
This had become useless since ca71942445.

* configure.ac (LIBGCRYPT): Remove.
* guix/config.scm.in (%libgcrypt): Remove.
2019-04-17 11:53:53 +02:00
Ludovic Courtès ab77b69eca
self: Remove unused variable.
This variable is unused since commit
45779fa676.

* guix/self.scm (%dependency-variables): Remove.
* build-aux/build-self.scm (%dependency-variables): Remove.
2019-04-17 11:53:53 +02:00
Marius Bakke f5961dd585
Merge branch 'master' into staging 2019-04-17 00:08:34 +02:00
Ludovic Courtès d1f7748a2e
store: Add "add-data-to-store-cache" profiling component.
* guix/store.scm (add-data-to-store): Define 'lookup' and use it instead
of 'hash-ref'.
2019-04-16 17:30:21 +02:00
Ludovic Courtès e856177597
derivations: Reduce 'valid-path?' RPCs in 'derivation-prerequisites-to-build'.
On a profile with 280 packages, this reduces the number of
'valid-paths?' RPCs made by 'guix package -nu' from 6K to 500.

* guix/derivations.scm (derivation-prerequisites-to-build)[built?]:
Memoize 'valid-path?' calls.
2019-04-16 17:30:21 +02:00
Ludovic Courtès 3961edf230
store: Memoize 'built-in-builders' call directly in <store-connection>.
The caching strategy introduced in
40cc850aeb was ineffective since we
regularly start from an empty object cache.  For example, "guix build
inkscape -n" would make 241 'built-in-builders' RPCs.

* guix/store.scm (<store-connection>)[built-in-builders]: New field.
(open-connection): Adjust '%make-store-connection' call accordingly.
(port->connection): Likewise.
(built-in-builders): Rename to...
(%built-in-builders):  ... this.
(built-in-builders): New procedure.
* guix/download.scm (built-in-builders*): Remove 'mcached' call.
2019-04-16 17:30:21 +02:00
Ludovic Courtès 4aea820f09
guix build: Fix relative file name canonicalization for '--root'.
Fixes <https://bugs.gnu.org/35271>.
Reported by rendaw <7e9wc56emjakcm@s.rendaw.me>.

* guix/scripts/build.scm (register-root): When ROOT is a relative file
name, append the basename of ROOT, not ROOT itself.
* tests/guix-build.sh: Add test.
2019-04-15 16:57:12 +02:00
Ludovic Courtès 3dae43a929
ui: Highlight heading of generation lists.
* guix/ui.scm (display-generation): Highlight the "Generation" heading.
2019-04-14 23:40:52 +02:00
Ludovic Courtès c1c5d68a94
colors: Add 'highlight'.
* guix/colors.scm (%highlight-color): New variable.
(highlight): New procedure.
* guix/ui.scm (%highlight-argument)[highlight]: Remove.
(%highlight-color): Remove.
2019-04-14 23:40:52 +02:00
Danny Milosavljevic 0b30a1a072
build-system/linux-module: Configure module like the kernel.
* guix/build/linux-module-build-system.scm (configure): New procedure.
(%standard-phases): Add "configure" phase.
2019-04-12 00:46:08 +02:00
Danny Milosavljevic 88e13c2587
build-system/linux-module: Support module source versioning.
* guix/build-system/linux-module.scm (make-linux-module-builder)
[native-inputs]: Add linux.
[arguments]<#:phases>[install]: Install "System.map" and "Module.symvers".
* guix/build/linux-module-build-system.scm (configure): Delete procedure.
(%standard-phases): Delete "configure" phase.
2019-04-12 00:13:34 +02:00
Ludovic Courtès 544265acba
colors: Add 'colorize-matches'.
* guix/colors.scm (colorize-matches): New procedure.
(color-rules): Rewrite in terms of 'colorize-matches'.
2019-04-11 18:18:13 +02:00
Ludovic Courtès 2569ef9dab
colors: Introduce a disjoint type and pre-compute ANSI escapes.
* guix/colors.scm (color-table, color): Remove.
(<color>): New record type.
(print-color): New procedure.
(define-color-table, color): New macros.
(color-codes->ansi): New procedure.
(%reset): New variable.
(colorize-string): Rewrite accordingly.
(color-rules): Adjust accordingly.
* guix/status.scm (print-build-event): Adjust to new 'colorize-string'
interface.
* guix/ui.scm (%highlight-argument): Likewise.
(%warning-colors, %info-colors, %error-colors, %hint-colors)
(%highlight-colors): Remove.
(%warning-color, %info-color, %error-color, %hint-color)
(%highlight-color): New variables.
2019-04-11 18:18:13 +02:00
Ludovic Courtès c1df77e215
guix gc: '-d' does not attempt to delete non-user-owned roots.
* guix/scripts/gc.scm (guix-gc)[delete-generations]: Limit to user-owned
roots, unless we're running as root.
2019-04-11 18:18:13 +02:00
Danny Milosavljevic ce6312999f
Add (guix build-system linux-module).
* guix/build/linux-module-build-system.scm: New file.
* guix/build-system/linux-module.scm: New file.
* doc/guix.texi (Build Systems): Document it.
* Makefile.am (MODULES): Add them.
2019-04-11 17:50:18 +02:00
Julien Lepiller 7b1c7ecdfb
import: opam: Use dune-build-system when possible.
* guix/import/opam.scm (opam->guix-package): Detect when dune can be used.
2019-04-10 21:39:04 +02:00
Julien Lepiller 3e159dd0a4
import: opam: Add more patterns to opam file parser.
* guix/import/opam.scm: Add more patterns to peg parser.
(choice-pat choice condition-not condition-paren): New patterns.
(ground-value condition-content condition-var): Update patterns.
2019-04-10 21:38:45 +02:00
Ludovic Courtès 9c074f61ef
scripts: GC hint suggests 'guix gc -d 1m'.
* guix/scripts.scm (warn-about-disk-space): Suggest 'guix gc -d'.
2019-04-10 17:09:47 +02:00
Ludovic Courtès 96b8c2e6e2
guix gc: Add '--delete-generations'.
* guix/scripts/gc.scm (show-help, %options): Add
'--delete-generations'.  Change '--delete' shorthand to '-D'.
(delete-old-generations): New procedure.
(guix-gc)[delete-generations]: New procedure.
Call it when ACTION is 'collect-garbage' and OPTS contains
'delete-generations.
* doc/guix.texi (Invoking guix gc): Document it.
2019-04-10 17:09:47 +02:00
Ludovic Courtès c872b952c5
profiles: Add 'generation-profile'.
* guix/profiles.scm (%profile-generation-rx): New variable.
(generation-profile): New procedure.
2019-04-10 17:09:47 +02:00
Ludovic Courtès bacf980c76
guix gc: Add '--list-roots'.
* guix/scripts/gc.scm (show-help, %options): Add '--list-roots'.
(guix-gc)[list-roots]: New procedure.
Handle '--list-roots'.
* tests/guix-gc.sh: Test it.
* doc/guix.texi (Invoking guix gc): Document it.
2019-04-10 17:09:47 +02:00
Ludovic Courtès 72eda0624b
Add (guix store roots).
* guix/store/roots.scm, tests/store-roots.scm: New files.
* Makefile.am (STORE_MODULES): Add guix/store/roots.scm.
(SCM_TESTS): Add tests/store-roots.scm.
2019-04-10 17:09:47 +02:00
Ludovic Courtès 08d0f950b3
pull: Remove duplicate '--dry-run' description.
Reported by pkill9.

* guix/scripts/pull.scm (show-help): Remove duplicate '--dry-run'
description.
2019-04-10 17:09:47 +02:00
Ludovic Courtès 238589e566
ui: Highlight diagnostic format string arguments.
* guix/ui.scm (highlight-argument): New macro.
(%highlight-argument): New procedure.
(define-diagnostic): Use 'highlight-argument'.
2019-04-10 17:09:47 +02:00
Ludovic Courtès a7ae18b1b9
ui: Colorize hints.
* guix/ui.scm (%info-colors): Remove CYAN.
(%hint-colors): New variable.
(display-hint): Adjust so that the "hint:" prefix is colorized.
2019-04-10 17:09:46 +02:00
Ludovic Courtès 9e1e046040
ui: Colorize diagnostics.
* guix/ui.scm (define-diagnostic): Add 'colors' parameter and pass it to
'print-diagnostic-prefix'.
(warning, info, report-error): Add extra argument.
(%warning-colors, %info-colors, %error-colors): New variables.
(print-diagnostic-prefix): Add #:colors parameter and honor it.
2019-04-10 12:40:59 +02:00
Ludovic Courtès 402627714b
ui: Diagnostic procedures can display error location.
* guix/ui.scm (define-diagnostic): Add optional 'location' parameter.
Pass it to 'print-diagnostic-prefix'.
(print-diagnostic-prefix): Add optional 'location' parameter and honor
it.
(report-load-error): Use 'report-error' and 'warning' instead
of (format (current-error-port) …).
2019-04-10 12:40:59 +02:00
Ludovic Courtès cc3697d543
ui: Factorize 'print-diagnostic-prefix'.
* guix/ui.scm (define-diagnostic): Emit call to 'print-diagnostic-prefix'.
(print-diagnostic-prefix): New procedure.
2019-04-10 12:40:59 +02:00
Ludovic Courtès 26a2021a1f
ui: Make diagnostic message prefix translatable.
* guix/ui.scm (define-diagnostic): Expect PREFIX to be enclosed in
'G_'.   Emit call to 'gettext' on PREFIX.
(warning, info, report-error): Wrap prefix in 'G_'.
2019-04-10 12:40:59 +02:00
Ludovic Courtès 32813e8440
ui: Fix i18n for diagnostic messages.
Until now, we'd pass 'gettext' the "augmented" format string, which
'gettext' would not find in message catalogs.  Now we pass it FMT as is,
which is what catalogs contain.

* guix/ui.scm (define-diagnostic)[augmented-format-string]: Remove.
Emit one 'format' call to print the prefix, and a second one to print
the actual message.
2019-04-10 12:40:59 +02:00
Ludovic Courtès 5d9f9ad631
Add (guix colors).
* guix/colors.scm: New file.
* Makefile.am (MODULES): Add it.
* guix/ui.scm (color-table, color, colorize-string): Remove.
* guix/status.scm (isatty?*, color-output? color-rules): Remove.
2019-04-10 12:40:58 +02:00
Ludovic Courtès 95207e70d5
store: 'with-store' expands to a single procedure call.
* guix/store.scm (call-with-store): New procedure.
(with-store): Write in terms of 'call-with-store'.
2019-04-10 12:40:58 +02:00
Ludovic Courtès 21b3c0ca87
guix package: Use absolute file names in search path recommendations.
Suggested by Chris Marusich.

* guix/scripts/package.scm (absolutize): New procedure.
(display-search-paths): Use it.
2019-04-10 12:40:58 +02:00
Ivan Petkov 1d3acde508
build-system/cargo: refactor phases to successfully build
* guix/build-system/cargo.scm (%cargo-build-system-modules):
Add (json parser).
(cargo-build):
[vendor-dir]: Define flag and pass it to builder code.
[cargo-test-flags]: Likewise.
[skip-build?]: Likewise.
* guix/build/cargo-build/system.scm (#:use-module): use (json parser).
(package-name->crate-name): Delete it.
(manifest-targets): Add it.
(has-executable-target?): Add it.
(configure): Add #:vendor-dir name and use it.
Don't touch Cargo.toml.
Don't symlink to duplicate inputs.
Remove useless registry line from cargo config.
Define RUSTFLAGS to lift lint restrictions.
(build): Add #:skip-build? flag and use it.
(check): Likewise.
Add #:cargo-test-flags and pass it to cargo.
(install): Factor source logic to install-source.
Define #:skip-build? flag and use it.
Only install if executable targets are present.
(install-source): Copy entire crate directory not just src.
[generate-checksums] pass dummy file for unused second argument.
(%standard-phases): Add install-source phase.

Signed-off-by: Chris Marusich <cmmarusich@gmail.com>
2019-04-09 03:09:00 -07:00
Ludovic Courtès db7441e470
Merge branch 'master' into staging 2019-04-08 23:08:56 +02:00
Ludovic Courtès b227457f62
licenses: Remove 'bsd-style'.
This procedure had been deprecated since March 2015.

* guix/licenses.scm (bsd-style): Remove.
2019-04-08 10:42:51 +02:00
Marius Bakke ba00235a96
Merge branch 'master' into staging 2019-04-08 00:54:01 +02:00
Ludovic Courtès 1199da08aa
size: Optimize dependency size computation.
This reduces 'guix size' run time by ~4% here:

  items="$(guix build icecat inkscape emacs libreoffice)"
  guix size $items

* guix/scripts/size.scm (store-profile): Define 'size-table' and use it
to lookup the size of ITEM in 'dependency-size'.
2019-04-07 11:36:00 +02:00
Katherine Cox-Buday cd0a9c91b2
licenses: Add Lisp Lesser General Public License.
* gnu/licenses.scm (llgpl): New variable.

Signed-off-by: 宋文武 <iyzsong@member.fsf.org>
2019-04-07 09:14:41 +08:00
Ludovic Courtès 985730c1af
scripts: More commands default to verbosity level 1.
* guix/scripts/environment.scm (%default-options): Change 'verbosity' to 1.
* guix/scripts/pack.scm (%default-options): Likewise.
* guix/scripts/system.scm (guix-system): Likewise, except for the
'build' command.
2019-04-04 17:47:02 +02:00
Ludovic Courtès c1ef50ac79
gexp: Remove workarounds for <https://bugs.gnu.org/15602>.
* gnu/services/base.scm (hydra-key-authorization)[aaa]: Remove.
[default-acl]: Don't import it.
* guix/scripts/pack.scm (store-database)[build]: Don't import
(gnu build install).
2019-04-04 17:47:02 +02:00
Ludovic Courtès a31174e896
gexp: 'compiled-modules' loads modules before compiling them.
This works around <https://bugs.gnu.org/15602> in the context of
modules specified with 'with-imported-modules'.

* guix/gexp.scm (gexp->derivation): Add #:pre-load-modules? parameter
and pass it to 'compiled-modules'.
(compiled-modules): Add #:pre-load-modules? parameter and honor it.
* guix/packages.scm (patch-and-repack): Pass #:pre-load-modules? to
'gexp->derivation'.
2019-04-04 17:47:02 +02:00
Ludovic Courtès 5a6e04c53c
self: Ship all the (gnu bootloader …) modules.
* guix/self.scm (compiled-guix)[*system-modules*]: Explicitly add all of
gnu/bootloader/*.
2019-04-03 18:21:43 +02:00
Ludovic Courtès 1ccc0f807d
environment: '-C' creates namespaces where the user is not root.
* guix/scripts/environment.scm (launch-environment/container): Add UID
and GID.  Use them in PASSWD and GROUPS.  Pass them as #:guest-uid and
 #:guest-gid to 'call-with-container'.
* tests/guix-environment-container.sh: Test the inner UID.
In '--user' test, replace hard-coded 0 with 1000.
* doc/guix.texi (Invoking guix environment): Adjust accordingly.
2019-04-02 18:15:37 +02:00
Marius Bakke 571fb008a5
Merge branch 'master' into staging 2019-04-01 00:02:39 +02:00
Ludovic Courtès 154f1f0937
packages: Remove 'maintainers' field.
This field was never used and doesn't match the way we collectively
maintain packages.

* guix/packages.scm (<package>)[maintainers]: Remove.
2019-03-30 15:19:32 +01:00
Ludovic Courtès a7646bc5e1
packages: Remove 'self-native-input?' field.
This field has become unnecessary with the addition of 'this-package'.

* guix/packages.scm (<package>)[self-native-input?]: Remove.
(package->bag): Adjust accordingly.
* doc/guix.texi (package Reference): Remove 'self-native-input?'.
2019-03-30 15:19:32 +01:00
Ludovic Courtès adb6462c4c
packages: Define 'this-package' and 'this-origin'.
* guix/packages.scm (<origin>): Choose 'this-origin' as the 'this'
identifier.
(<package>): Choose 'this-package'.
* gnu/packages/gnucash.scm (gnucash)[arguments]: Use 'this-package'
instead of 'this-record'.
* gnu/packages/version-control.scm (git)[arguments]: Likewise.
2019-03-30 11:08:39 +01:00
Ludovic Courtès d2be7e3c4b
records: Support custom 'this' identifiers.
This lets record users choose an identifier other than 'this-record'.

* guix/records.scm (make-syntactic-constructor): Add #:this-identifier.
[wrap-field-value]: Honor it.
(define-record-type*): Add form with extra THIS-IDENTIFIER and honor
it.
* tests/records.scm ("define-record-type* & thunked & inherit & custom this"):
New test.
2019-03-30 11:08:39 +01:00
Ludovic Courtès 539af7f257
pull: Truncate the list of packages displayed on completion.
Previously, if you'd run 'guix pull' after a couple of weeks, it would
fill your screen with package names, which is unhelpful.

* guix/scripts/pull.scm (ellipsis): New procedure.
(display-new/upgraded-packages): Add #:concise?.
[list->enumeration]: New procedure.
Use it instead of 'string-join'.
(display-profile-news): Pass #:concise? #t.
2019-03-28 23:06:59 +01:00
Ludovic Courtès 9f4169f6c8
pull: Factorize pretty-printing for new/upgraded package lists.
* guix/scripts/pull.scm (display-new/upgraded-packages)[pretty]: New
procedure.
Use it.
2019-03-28 23:06:58 +01:00
Efraim Flashner 7c86fdda7c
Revert "build-system/ruby: Use invoke."
This reverts commit 0244952c11.

We prefer 'invoke', but the custom error handling works better with the
code as-is.
2019-03-28 20:19:44 +02:00
Efraim Flashner 0244952c11
build-system/ruby: Use invoke.
* guix/build/ruby-build-system.scm (install): Use invoke.
2019-03-28 19:17:48 +02:00
Ludovic Courtès 42314ffa07
refresh: Update the source code URL.
Reported by Tobias Geerinckx-Rice <me@tobias.gr>
in <https://bugs.gnu.org/35010>.

* guix/upstream.scm (update-package-source): Take 'source' instead of
'version' as the second argument.
[update-expression]: Change to take 'replacements', a list of
replacement pairs.
Compute OLD-URL and NEW-URL and replace the dirname of the OLD-URL with
that of NEW-URL.
* guix/scripts/refresh.scm (update-package): Adjust call to
'update-package-source' accordingly.
2019-03-27 14:59:42 +01:00
Ludovic Courtès 1ee3d2dcb8
upstream: 'package-update' returns the <upstream-source> object.
Fixes a regression introduced in
abd4d6b33d, where CHANGES would no longer
be a thunk.

Reported by Ricardo Wurmus.

* guix/upstream.scm (package-update/url-fetch): Return SOURCE as the
third value instead of CHANGES.
* guix/scripts/refresh.scm (update-package): Adjust accordingly.
2019-03-27 14:59:41 +01:00
Ludovic Courtès 9e5f2060ad
scripts: Skip 'guix pull' suggestion when running code from a checkout.
* guix/scripts.scm (warn-about-old-distro): Do not warn when
GUIX_UNINSTALLED is set.
2019-03-27 11:54:06 +01:00
Ludovic Courtès 952afb6f8c
environment: Create /etc/group in containers.
Reported by Pierre Neidhardt <mail@ambrevar.xyz>.

* guix/scripts/environment.scm (launch-environment/container): Create
GROUPS and call 'write-group'.
* tests/guix-environment-container.sh: Test it.
2019-03-26 18:11:52 +01:00
Ludovic Courtès 8a9922bdee
environment: Use (gnu build accounts) for /etc/passwd handling.
* guix/scripts/environment.scm (launch-environment/container): Remove
call to 'mock-passwd'; instantiate a <password-entry> instead.  Call
'write-passwd' to write the pasword database instead of using custom
code.
(mock-passwd): Remove.
* tests/guix-environment-container.sh: Test 'getpwuid'.
2019-03-26 18:11:52 +01:00
Ludovic Courtès e6301fb76d
packages: Adjust to new calling convention for "thunked" fields.
Fixes <https://bugs.gnu.org/34995>.

This is a followup to abd4d6b33d.

* guix/packages.scm (package->bag): Adjust calls to INPUTS,
PROPAGATED-INPUTS, NATIVE-INPUTS, and ARGS, passing them SELF as an
argument.
* gnu/packages/gnucash.scm (gnucash)[arguments]: Use (package-inputs
this-record) intead of (inputs).
* gnu/packages/version-control.scm (git)[arguments]: Likewise.
2019-03-26 10:26:02 +01:00
Ludovic Courtès abd4d6b33d
records: Allow thunked fields to refer to 'this-record'.
* guix/records.scm (this-record): New syntax parameter.
(make-syntactic-constructor)[wrap-field-value]: When F is thunked,
return a one-argument lambda instead of a thunk, and parameterize
THIS-RECORD.
(define-record-type*)[thunked-field-accessor-definition]: Pass X
to (real-get X).
* tests/records.scm ("define-record-type* & thunked & this-record")
("define-record-type* & thunked & default & this-record")
("define-record-type* & thunked & inherit & this-record"): New tests.
2019-03-25 23:37:06 +01:00
Ludovic Courtès 94aeec0aef
ui: Bypass Texinfo parsing and rendering for searches.
This makes search queries such as:

  LANGUAGE=fr guix package -s utilitaire -s recherche

about 6 times faster.

* guix/ui.scm (%package-metrics): Do not use 'package-synopsis-string'
and 'package-description-string' to bypass Texinfo parsing and
rendering.
2019-03-24 00:13:53 +01:00
Julien Lepiller 78b3748c1c
guix: dune-build-system: Add a package parameter.
* guix/build-system/dune.scm: Add a package parameter.
* guix/build/dune.scm (build, test, install): Use it.
* doc/guix.texi: Document it.
2019-03-23 22:58:52 +01:00
Marius Bakke 3cb61ca85a
Merge branch 'master' into staging 2019-03-23 22:50:07 +01:00
Efraim Flashner 4e4c311465
build: Add rakudo-build-system.
* guix/build-system/rakudo.scm,
guix/build/rakudo-build-system.scm: New files.
* Makefile.am (MODULES): Add them.
* doc/guix.texi (Build System): Document it.
2019-03-23 22:26:48 +02:00
Julien Lepiller a506a4c380
import: opam: Also update dune packages.
* guix/import/opam.scm (opam-package?): Also accept packages that use the
dune build system.
2019-03-23 18:37:29 +01:00
Ludovic Courtès a53ecfc897
graph: Factorize calls to 'fold-packages'.
* guix/scripts/graph.scm (all-packages): New procedure.
(%reverse-package-node-type, %reverse-bag-node-type): Use 'all-packages'
instead of 'fold-packages'.
2019-03-23 18:15:36 +01:00
Ludovic Courtès 2b81eac01e
graph: Add the 'reverse-bag' graph.
Suggested by Julien Lepiller.

* guix/scripts/graph.scm (%reverse-bag-node-type): New variable.
(%node-types): Add it.
* tests/graph.scm ("reverse bag DAG"): New test.
* doc/guix.texi (Invoking guix graph): Document it.
2019-03-23 18:15:36 +01:00
Marius Bakke 081850816f
Merge branch 'master' into staging 2019-03-21 23:18:54 +01:00
Marius Bakke ad4910eec0
build-system/meson: Add #:allowed-references and #:disallowed-references.
* guix/build-system/meson.scm (meson-build): Add support for
  #:allowed-references and #:disallowed-references.
2019-03-21 19:23:47 +01:00
Ludovic Courtès 6c5e618ca0
pack: Create an empty /home directory for '-f squashfs'.
Fixes <https://bugs.gnu.org/34914>.

* guix/scripts/pack.scm (squashfs-image)[build]: Pass "-p /home d 555 0 0".
2019-03-19 11:30:34 +01:00
Ludovic Courtès 427c87d0bd
pack: Produce relative symlinks when using '-f squashfs'.
Fixes <https://bugs.gnu.org/34913>.

* guix/scripts/pack.scm (squashfs-image)[build]: Use
'relative-file-name' when creating SYMLINKS.
* guix/scripts/pack.scm (guix-pack): Pass #:relative-symlinks? #t when
PACK-FORMAT is 'squashfs.
2019-03-19 11:30:34 +01:00
Arun Isaac ae031d453c
import: Add Launchpad updater.
* guix/import/launchpad.scm: New file.
* Makefile.am (MODULES): Register it.
* doc/guix.texi (Invoking guix refresh): Mention the Launchpad updater.
2019-03-18 20:55:55 +05:30
ng0 47956fa0c2
Correct name and email address for ng0.
* .mailmap, Makefile.am, doc/guix.de.texi, doc/guix.fr.texi,
doc/guix.texi, etc/completion/fish/guix.fish,
gnu/packages/accessibility.scm, gnu/packages/admin.scm,
gnu/packages/audio.scm, gnu/packages/autotools.scm,
gnu/packages/cdrom.scm, gnu/packages/check.scm,
gnu/packages/cinnamon.scm, gnu/packages/compression.scm,
gnu/packages/crypto.scm, gnu/packages/databases.scm,
gnu/packages/django.scm, gnu/packages/dns.scm, gnu/packages/elixir.scm,
gnu/packages/emacs-xyz.scm, gnu/packages/emacs.scm,
gnu/packages/enlightenment.scm, gnu/packages/erlang.scm,
gnu/packages/fonts.scm, gnu/packages/fontutils.scm,
gnu/packages/forth.scm, gnu/packages/fvwm.scm, gnu/packages/games.scm,
gnu/packages/gl.scm, gnu/packages/gnome.scm, gnu/packages/gnunet.scm,
gnu/packages/gnupg.scm, gnu/packages/gnuzilla.scm, gnu/packages/gtk.scm,
gnu/packages/guile-wm.scm,gnu/packages/guile-xyz.scm,
gnu/packages/haskell-check.scm, gnu/packages/haskell-crypto.scm,
gnu/packages/haskell.scm, gnu/packages/image-viewers.scm,
gnu/packages/image.scm, gnu/packages/irc.scm,
gnu/packages/language.scm, gnu/packages/libcanberra.scm,
gnu/packages/linux.scm, gnu/packages/lisp.scm, gnu/packages/lolcode.scm,
gnu/packages/lxde.scm, gnu/packages/lxqt.scm, gnu/packages/mail.scm,
gnu/packages/markup.scm, gnu/packages/mate.scm, gnu/packages/maths.scm,
gnu/packages/mc.scm, gnu/packages/messaging.scm, gnu/packages/music.scm,
gnu/packages/ncurses.scm, gnu/packages/networking.scm,
gnu/packages/nickle.scm, gnu/packages/openbox.scm, gnu/packages/pdf.scm,
gnu/packages/perl-check.scm, gnu/packages/perl.scm,
gnu/packages/python-compression.scm, gnu/packages/python-crypto.scm,
gnu/packages/python-web.scm, gnu/packages/python-xyz.scm,
gnu/packages/python.scm, gnu/packages/qt.scm, gnu/packages/ruby.scm,
gnu/packages/rust.scm, gnu/packages/scheme.scm,
gnu/packages/serialization.scm, gnu/packages/shells.scm,
gnu/packages/ssh.scm, gnu/packages/suckless.scm, gnu/packages/tbb.scm,
gnu/packages/telephony.scm, gnu/packages/text-editors.scm,
gnu/packages/textutils.scm, gnu/packages/time.scm, gnu/packages/tls.scm,
gnu/packages/tor.scm, gnu/packages/version-control.scm,
gnu/packages/video.scm, gnu/packages/vim.scm, gnu/packages/web.scm,
gnu/packages/wm.scm, gnu/packages/xdisorg.scm, gnu/packages/xfce.scm,
gnu/packages/xml.scm, gnu/packages/xorg.scm, gnu/services/certbot.scm,
gnu/services/desktop.scm, gnu/services/version-control.scm,
gnu/services/web.scm, guix/import/hackage.scm, guix/licenses.scm:
Correct name and email address for ng0.

Signed-off-by: Tobias Geerinckx-Rice <me@tobias.gr>
2019-03-18 15:05:08 +01:00
Ludovic Courtès b6fd086a61
describe: Warn about 'GUIX_PACKAGE_PATH' in json and recutils format.
Fixes <https://bugs.gnu.org/34884>.
Reported by Pierre Neidhardt <mail@ambrevar.xyz>.

* guix/scripts/describe.scm (display-package-search-path): Add catch-all
case for FMT.
2019-03-18 10:51:05 +01:00