Commit Graph

3265 Commits (39764ef893b7b65a8ce55e13746fed8fd0bad6e0)

Author SHA1 Message Date
Ludovic Courtès 6ddb59607b
guix system: Report wrong file system 'device' fields.
Previously, if you wrote (device "my-label") without (title 'label),
you'd get:

  guix system: error: stat: No such file or directory: "my-label"

Now you get a proper error and a hint.

Reported by Pierre-Antoine Rouby.

* guix/scripts/system.scm (check-file-system-availability)[literal]: New
variable.  Loop over LITERAL.
* gnu/system/file-systems.scm (%pseudo-file-system-types): New variable.
* guix/ui.scm (display-hint): Make public.
2018-04-27 18:45:02 +02:00
Ludovic Courtès 5e5d6613a3
download: Use ungrafted tools in 'url-fetch/tarbomb' and 'url-fetch/zipbomb'.
Fixes <https://bugs.gnu.org/31085>.
Reported by Diego Nicola Barbato <dnbarbato@posteo.de>.

* guix/download.scm (url-fetch/tarbomb): Pass #:graft? #f to
'gexp->derivation'.
(url-fetch/zipbomb): Likewise.
2018-04-23 15:25:56 +02:00
Maxim Cournoyer facc0a96a1
build-system: emacs: Add improved check phase.
* guix/build-system/emacs.scm (emacs-build): Add #:test-command keyword
argument. Remove #:configure-flags and #:test-target keyword arguments.
* guix/build/emacs-build-system.scm (check): New procedure.
(%standard-phases): Register check phase after the build phase.

Signed-off-by: Arun Isaac <arunisaac@systemreboot.net>
2018-04-20 00:49:53 +05:30
Maxim Cournoyer 8a8fa82e72
build-system: emacs: Replace system* with invoke.
* guix/build/emacs-utils.scm: Use (guix build utils) for invoke.
(emacs-batch-eval, emacs-batch-edit-file): Replace system* with invoke.
* guix/build/emacs-build-system.scm (make-autoloads): No need to return #t
explicitly since emacs-generate-autoloads now uses invoke.

Signed-off-by: Arun Isaac <arunisaac@systemreboot.net>
2018-04-20 00:49:53 +05:30
Maxim Cournoyer b5904fcc34
build-system: emacs: Search all inputs for Emacs Lisp directories.
* guix/build/emacs-build-system.scm (set-emacs-load-path): Include Emacs Lisp
directories from all inputs. Also, add the unpacked source directory to
EMACSLOADPATH.
(emacs-inputs, emacs-inputs-directories, emacs-input->el-directory,
emacs-inputs-el-directories): Remove.
(%standard-phases): Move set-emacs-load-path phase to after unpack phase.

Signed-off-by: Arun Isaac <arunisaac@systemreboot.net>
2018-04-20 00:49:47 +05:30
Ludovic Courtès eb72cdf087
self: Produce a spliced (guix config) to placate Guile 2.0.
Fixes 'guix pull' with Guile 2.0.
See <https://debbugs.gnu.org/cgi/bugreport.cgi?bug=27284#153>.

* guix/self.scm (make-config.scm): Remove 'begin' in 'scheme-file'
argument and pass #:splice? #t.
2018-04-11 01:03:47 +02:00
Ludovic Courtès 4fbd1a2b7f
gexp: 'scheme-file' can splice expressions.
* guix/gexp.scm (<scheme-file>)[splice?]: New field.
(scheme-file): Add #:splice? and pass it to '%scheme-file'.
(scheme-file-compiler): Pass SPLICE? to 'gexp->file'.
(gexp->file): Add #:splice? and honor it.
* tests/gexp.scm ("gexp->file + #:splice?"): New test.
("gexp->derivation & with-imported-module & computed module"): Use
 #:splice? #t.
2018-04-11 01:03:47 +02:00
Ludovic Courtès a1639ae9de
self: 'package-for-guile' really honors GUILE-VERSION.
* guix/self.scm (package-for-guile): Pass GUILE-VERSION to
'false-if-wrong-guile'.
2018-04-11 01:03:47 +02:00
Ludovic Courtès 63cab4182d
self: Remove 'eval-when' from in generated (guix config).
* guix/self.scm (make-config.scm): Remove unneeded 'eval-when'.
2018-04-11 01:03:47 +02:00
Ludovic Courtès 43176dd605
self: Don't use deprecated package names.
* guix/self.scm (compiled-guix)[guile-json, guile-ssh]: Don't refer t
"guile2.2-json" and "guile2.2-ssh", which are deprecated.
2018-04-10 17:44:27 +02:00
Ludovic Courtès 806ff35854
self: Export '%guix-register-program' in generated (guix config).
* guix/self.scm (make-config.scm): Export '%guix-register-program'.
2018-04-10 17:44:27 +02:00
Ludovic Courtès e69dd8443a
self: Fix package names for compilation with Guile 2.0.
Reported by Ricardo Wurmus.

* guix/self.scm (specification->package): Add guile2.0-{json,git,ssh}.
(guile-for-build): Use 'module-ref' for Guile 2.0.
2018-04-10 17:44:27 +02:00
Ludovic Courtès 69447b6393
self: Display a new line at the end of module compilation.
* guix/self.scm (compiled-modules)[build]: Add a 'newline' call at the
end.
2018-04-10 17:44:27 +02:00
Ludovic Courtès 14b392a8ad
self: Don't substitute the '-source' derivations.
With substitution enabled we would end up downloading 10+ MiB of source
that's already available locally on disk.

* guix/self.scm (imported-files): Pass #:options to 'computed-file'.
2018-04-10 17:44:27 +02:00
Ludovic Courtès 3c0128b035
discovery: Remove dependency on (guix ui).
This reduces the closure of (guix discovery) from 28 to 8 modules.

* guix/discovery.scm (scheme-files): Use 'format' instead of 'warning'.
(scheme-modules): Add #:warn parameter.  Use it instead of
'warn-about-load-error'.
(fold-modules): Add #:warn and pass it to 'scheme-modules'.
(all-modules): Likewise.
* gnu/bootloader.scm (bootloader-modules): Pass #:warn to 'all-modules'.
* gnu/packages.scm (fold-packages): Likewise.
* gnu/services.scm (all-service-modules): Likewise.
* guix/upstream.scm (importer-modules): Likewise.
2018-04-08 17:48:33 +02:00
Ludovic Courtès eaae07ec28
Add (guix self).
* guix/self.scm: New file.
* Makefile.am (MODULES): Add it.
* gnu/packages.scm (%distro-root-directory): Rewrite to try different
directories.
* guix/discovery.scm (guix): Export 'scheme-files'.
2018-04-08 17:41:08 +02:00
Ludovic Courtès b244ae25f9
gexp: 'directory-union' has a #:resolve-collision parameter.
* guix/gexp.scm (directory-union): Add #:resolve-collision and honor it.
2018-04-08 17:41:08 +02:00
Ludovic Courtès e40aa54e98
union: Allow callers to choose the collision resolution policy.
* guix/build/union.scm (warn-about-collision): New procedure.
(union-build): Add #:resolve-collision.
[resolve-collisions]: Call it.
* tests/union.scm ("union-build collision first & last"): New test.
2018-04-08 17:41:08 +02:00
Ludovic Courtès 1b92d65a40
modules: Report the search path in &missing-dependency-error.
* guix/modules.scm (&missing-dependency-error)[search-path]: New field.
(source-module-dependencies): Initialize the 'search-path' field.
2018-04-08 17:41:08 +02:00
Ludovic Courtès 9188198692
git: Increase modularity and expose 'update-cached-checkout'.
* guix/git.scm (repository->head-sha1, copy-to-store): Remove.
(switch-to-ref): Return the OID of OBJ.
(update-cached-checkout): New procedure, with code from
'latest-repository-commit'.
(latest-repository-commit): Use it.
2018-04-02 23:16:30 +02:00
Ludovic Courtès f8d1303864
union: Slightly improve messages for file collisions.
* guix/build/union.scm (union-build): Indent file names upon collision.
Remove "arbitrarily" from the message.
2018-03-31 23:30:50 +02:00
Ludovic Courtès fc95dc4c34
guix package: Add '--allow-collisions'.
Fixes <https://bugs.gnu.org/30830>.
Suggested by Ricardo Wurmus <rekado@elephly.net>.

* guix/scripts/package.scm (build-and-use-profile): Add
 #:allow-collisions? and pass it to 'profile-derivation'.
(show-help, %options): Add '--allow-collisions'.
(manifest-action, process-actions): Pass #:allow-collisions? to
'build-and-use-profile'.
* tests/guix-package.sh: Add collision test.
* doc/guix.texi (Invoking guix package): Document '--allow-collisions'.
2018-03-31 23:30:50 +02:00
Nikolai Merinov f342bb58fe
gnu: rust: Update rust to 1.24.1.
* gnu/packages/rust.scm (rust-bootstrap): Freeze bootstrap version to 1.22.1.
Reorganize bootstrap binaries to match new "rust" package structure with two
ouputs "out" with Rust compiler and "cargo" with Cargo package manager.
Replace all "system*" by "invoke".
(rust-1.23): Rename "rustc" to "rust".  Update sha256 for tarball.  Add cargo
related dependencies.  Install "cargo" as separate "rust" output.  Remove
substitutes for parts that were fixed in "rustc" source code.  Install
documentation to separate "doc" output.  Update configuration according to
changes in "rustc" source code.  Replace all "system*" by "invoke".
(rust): Create package for 1.24.1 rust release based on rust-1.23 release.
* guix/build-system/cargo.scm (default-rust): Replace "default-cargo" and
"default-rustc" functions with "default-rust" function.
(cargo-build-system): Take only one package as "rust" source.  Use "rustc" of
default output of "rust" package, use "cargo" as "cargo" output of "rust"
package.
2018-03-30 15:46:53 +02:00
Ludovic Courtès 183445a6ed
weather: Report continuous integration stats.
* guix/scripts/weather.scm (histogram, throughput, queued-subset): New
procedures.
(report-server-coverage): Report CI information.
* doc/guix.texi (Invoking guix weather): Document it.
2018-03-28 16:17:06 +02:00
Ludovic Courtès b3517f3f9f
Add (guix ci).
* guix/ci.scm: New file.
* Makefile.am (MODULES): Add it.
2018-03-28 16:17:06 +02:00
Konrad Hinsen 6fcb90eebd
guix environment: load manifest files like "guix package" does
* guix/scripts/environment.scm (options/resolve-packages): When loading
manifest files, use the same module environment as in "guix package".

Signed-off-by: Ludovic Courtès <ludovic.courtes@inria.fr>
2018-03-27 23:26:15 +02:00
Ludovic Courtès 8980eea5ab
guix gc: Add '--derivers'.
* guix/scripts/gc.scm (show-help, %options): Add '--derivers'.
(guix-gc): Handle 'list-derivers'.
* tests/guix-gc.sh: Add test.
* doc/guix.texi (Invoking guix gc): Document it.
2018-03-27 14:51:44 +02:00
Ludovic Courtès b06a70e05d
graph: Add "module" node type.
* guix/scripts/graph.scm (module-from-package)
(source-module-dependencies*): New procedures.
(%module-node-type): New variable.
(%node-types): Add it.
* guix/modules.scm (source-module-dependencies): Export.
* tests/graph.scm ("module graph"): New test.
* doc/guix.texi (Invoking guix graph): Document it.
2018-03-27 14:51:44 +02:00
Ludovic Courtès 7d85fcde23
guix build: 'guix build --log-file' gracefully reports certificate errors.
Previously 'guix build --log-file' would print a backtrace upon X.509
certificate verification errors.

* guix/scripts/build.scm (log-url): Catch 'tls-certificate-error' in
addition to 'getaddrinfo-error'.
2018-03-26 10:07:57 +02:00
Ludovic Courtès dfca24180c
git: 'latest-repository-commit' calls 'repository-close!'.
* guix/git.scm (latest-repository-commit): Call 'repository-close!'
when it exists.
2018-03-26 00:15:52 +02:00
Chris Marusich a335f6fcc9
system: Add "guix system docker-image" command.
* gnu/system/vm.scm (system-docker-image): New procedure.
* guix/scripts/system.scm (system-derivation-for-action): Add a case for
  docker-image, and in that case, call system-docker-image.
  (show-help): Document docker-image.
  (guix-system): Parse arguments for docker-image.
* doc/guix.texi (Invoking guix system): Document "guix system
  docker-image".
* gnu/system/examples/docker-image.tmpl: New file.
2018-03-24 03:04:11 +01:00
Chris Marusich 1c2ac6b482
guix: Rewrite build-docker-image to allow more paths.
* guix/docker.scm (build-docker-image): Rename "path" argument to
  "prefix" to reflect the fact that it is used as a prefix for the
  symlink targets.  Add the "paths" argument, and remove the "closure"
  argument, since it is now redundant.  Add a "transformations"
  argument.
* guix/scripts/pack.scm (docker-image): Read the profile's reference
  graph and provide its paths to build-docker-image via the new "paths"
  argument.
2018-03-24 03:04:10 +01:00
Chris Marusich 272c070962
tests: Add tests for "guix pack".
* guix/scripts/pack.scm (bootstrap-xz): New variable.
  (%options) <--bootstrap>: New option.
  (show-help): Document the new --bootstrap option.
  (guix-pack): When --bootstrap is specified, use the bootstrap Guile,
  tar, and xz to build the pack, and do not use any profile hooks or
  locales.
* doc/guix.texi (Invoking guix pull): Document the new --bootstrap
  option.
* tests/guix-pack.sh: New file.
* Makefile.am (SH_TESTS): Add guix-pack.sh.
* gnu/packages/package-management.scm (guix) <inputs>: Add util-linux.
2018-03-24 03:04:07 +01:00
Ludovic Courtès 427ec19e88
gexp: 'program-file' has a new #:module-path parameter.
* guix/gexp.scm (<program-file>): Add 'path' field.
(program-file): Add #:module-path parameter and honor it.
(program-file-compiler): Honor the 'path' field.
* tests/gexp.scm ("program-file #:module-path"): New test.
* doc/guix.texi (G-Expressions): Update.
2018-03-23 18:41:07 +01:00
Ludovic Courtès 1ae16033f3
gexp: 'gexp->script' and 'gexp->file' have a new #:module-path parameter.
* guix/gexp.scm (load-path-expression): Add 'path' optional parameter.
(gexp->script): Add #:module-path and honor it.
(gexp->file): Likewise.
* tests/gexp.scm ("gexp->script #:module-path"): New test.
* doc/guix.texi (G-Expressions): Update accordingly.
2018-03-23 18:41:07 +01:00
ng0 4a78fd4617
Correct name and Email for ng0.
* .mailmap: Correct name and Email for ng0.
* Makefile.am, 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/emacs.scm, gnu/packages/enlightenment.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.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-crypto.scm, gnu/packages/python-web.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: Likewise.

Signed-off-by: Tobias Geerinckx-Rice <me@tobias.gr>
2018-03-20 17:17:58 +01:00
Marius Bakke 061f204dcd
Revert "build-system/meson: Use 'target-arm32?' for armhf-linux case."
This requires adding (guix utils) to the build inputs, and causes too many
rebuilds for now.

This reverts commit 24a2e9172a.
2018-03-20 00:06:50 +01:00
Efraim Flashner 24a2e9172a
build-system/meson: Use 'target-arm32?' for armhf-linux case.
* guix/build-system/meson.scm (lower, meson-build): Replace armhf-linux
detection with 'target-arm32?' macro.
2018-03-19 22:07:37 +02:00
Marius Bakke 4eade64706
Merge branch 'master' into staging 2018-03-19 03:50:39 +01:00
Eric Bavier be95bcf088
git-download: Fix recursive checkouts.
* guix/git-download.scm (git-fetch)<build>: Fix match on INPUTS, which may
contain package outputs.
2018-03-18 20:00:44 -05:00
Ludovic Courtès 71e08fde28
glob: Add an extra glob pattern compilation stage.
* guix/glob.scm (compile-glob-pattern): Rename to...
(string->sglob): ... this.
(compile-sglob, string->compiled-sglob): New procedures.
(glob-match?): Replace '?, 'range, and 'set with a single clause.
* tests/glob.scm (test-compile-glob-pattern): Rename to...
(test-string->sglob): ... this.  Adjust accordingly.
(test-glob-match): Use 'string->compiled-sglob' instead of
'compile-glob-pattern'.
* gnu/build/linux-modules.scm (read-module-aliases): Use
'string->compiled-sglob' instead of 'compile-glob-pattern'.
2018-03-18 22:57:17 +01:00
Ludovic Courtès e914b398af
glob: Support square brackets in patterns.
* guix/glob.scm (wildcard-indices): Remove.
(parse-bracket): New procedure.
(compile-glob-pattern): Rewrite.  Support square brackets for sets and
ranges.
(glob-match?): Support sets and ranges.
* tests/glob.scm (test-compile-glob-pattern)
(test-glob-match): New macros.
Use them to rewrite the existing tests, and add new tests.
2018-03-18 22:35:36 +01:00
Ludovic Courtès 9bb1838c3f
import: elpa: Return 'license:gpl3+ for ELPA only.
Fixes <https://bugs.gnu.org/30836>.
Reported by Konrad Hinsen <konrad.hinsen@fastmail.net>.

* guix/import/elpa.scm (elpa-package->sexp): Add LICENSE parameter and
honor it.
(elpa->guix-package): Pass 'license:gpl3+ only when REPO is 'gnu.
2018-03-18 22:26:34 +01:00
Marius Bakke 7ace97395f
Merge branch 'master' into staging 2018-03-18 01:09:25 +01:00
Ludovic Courtès 95bd9f65a8
git: 'switch-to-ref' accepts short commit IDs.
Fixes <https://bugs.gnu.org/30716>.
Reported by Björn Höfling <bjoern.hoefling@bjoernhoefling.de>.

* guix/git.scm (switch-to-ref): When REF is a commit, check the length
of COMMIT and use 'object-lookup-prefix' if available.
2018-03-18 00:02:06 +01:00
Konrad Hinsen 07d2fed2f6
import: elpa: Fix typos in documentation strings
* guix/import/elpa.scm: Fix typos in docstrings.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2018-03-18 00:02:05 +01:00
Konrad Hinsen 44dd3d579d
import: elpa: use https in download URLs
* guix/import/elpa.scm (elpa-url): Use HTTPS.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2018-03-18 00:02:05 +01:00
Mark H Weaver e72077c535
download: Remove TU Wien mirror.
* guix/download.scm (%mirrors): Remove gd.tuwien.ac.at, which no longer
seems to exist.
2018-03-17 04:05:22 -04:00
Ludovic Courtès 61b1dbbdcd
guix system: Add '--skip-checks'.
Fixes <https://bugs.gnu.org/30760>.
Reported by Tomáš Čech <sleep_walker@gnu.org>.

* guix/scripts/system.scm (perform-action): Add #:skip-safety-checks?
and honor it.
(show-help, %options): Add --skip-checks.
(process-action): Pass #:skip-safety-checks? to 'perform-action'.
* doc/guix.texi (Invoking guix system): Document --skip-checks.
2018-03-15 10:28:22 +01:00
Marius Bakke d5b5a15a40
build-system/meson: Skip the 'fix-runpath' phase on armhf.
* guix/build-system/meson.scm (lower): Remove DEFAULT-PATCHELF from inputs
on armhf.
(meson-build): Ignore the 'fix-runpath' phase when building for arm systems.
2018-03-12 17:27:07 +01:00