Commit graph

4760 commits

Author SHA1 Message Date
Mathieu Othacehe
a6bf7a9745
gexp: Default to current target.
* guix/gexp.scm (lower-object): Set target argument to 'current by default and
look for the current target system at bind time if needed,
(gexp->file): ditto,
(gexp->script): ditto,
(lower-gexp): make sure lowered extensions are not cross-compiled.

* tests/gexp.scm: Add cross-compilation test-cases for gexp->script and
gexp->file with a target passed explicitely and with a default target.
2020-03-06 10:16:51 +01:00
Mathieu Othacehe
fdae0fa50a
store: Add set-current-target procedure.
* guix/store.scm (set-current-target): New exported procedure.
2020-03-06 10:16:31 +01:00
Marius Bakke
ebb7cf9e21
Merge branch 'master' into core-updates 2020-03-04 23:16:17 +01:00
Lars-Dominik Braun
c8abbe1468
import: pypi: Add more licenses
* guix/import/pypi.scm (string->license): Add the BSD 2-clause and MPL 2.0
licenses, and add more strings for BSD 3-clause and Expat license.

Signed-off-by: Leo Famulari <leo@famulari.name>
2020-03-04 14:56:38 -05:00
Maxim Cournoyer
99e676db43
file-systems: Add a 'file-system-device->string' procedure.
* gnu/system/file-systems.scm (file-system-device->string): New procedure.
* gnu/system.scm (bootable-kernel-arguments): Use it.
* gnu/system/vm.scm (operating-system-uuid): Likewise.
* guix/scripts/system.scm (display-system-generation): Likewise.
2020-03-02 23:24:47 -05:00
Leo Prikler
a3b1f878df
build-system: copy-build-system: Keep symlinks symbolic.
guix/build/copy-build-system.scm (install)[install-file]:
Read symlinks as is done in install-simple through copy-recursively.

Signed-off-by: Pierre Neidhardt <mail@ambrevar.xyz>
2020-02-28 09:39:31 +01:00
Ludovic Courtès
c2f9ea2b50
Revert "ui: Only display link in capable terminals."
This reverts commit d7545a6b53.

The commit led to a test failure in 'tests/guix-package-net.sh'.  It
also led to disagreements discussed here:

  https://lists.gnu.org/archive/html/guix-devel/2020-02/msg00353.html

Reverting until these are addressed.
2020-02-28 00:03:34 +01:00
Ludovic Courtès
71c3c3df92
scripts: Adjust disk-space warning functionality.
This is a followup to fb7eec3a84.

* guix/scripts.scm (warn-about-disk-space): Do not multiply
ABSOLUTE-THRESHOLD-IN-BYTES by 2^30.  Compare AVAILABLE to the max of
RELATIVE-THRESHOLD-IN-BYTES and ABSOLUTE-THRESHOLD-IN-BYTES, not the
min.  Display AVAILABLE divided by 2^30.
2020-02-27 23:56:14 +01:00
Ludovic Courtès
6b0653e7ec
guix package: Don't error out when failing to create ~/.guix-profile.
This is a followup to 7842ddcbc1, which
broke tests when 'HOME' is unset.

* guix/scripts/package.scm (ensure-default-profile): Silently ignore
'symlink' exceptions.
2020-02-27 23:29:30 +01:00
Maxim Cournoyer
9659459f06
emacs-build-system: Byte compile the autoload files.
* guix/build/emacs-build-system.scm (enable-autoloads-compilation)
(validate-compiled-autoloads): Add procedures.
(%standard-phases): Register the new procedures.
* gnu/packages/aux-files/emacs/guix-emacs.el (guix-emacs-find-autoloads):
Remove duplicates in the list of autoload files found.
* guix/build/emacs-utils.scm (expr->string): Add procedure.
(emacs-batch-eval, emacs-batch-edit-file): Use it.
2020-02-27 16:59:07 -05:00
Pierre Neidhardt
fb7eec3a84
scripts: Emit GC hint if free space is lower than absolute and relative threshold.
* guix/scripts.scm (%disk-space-warning-absolute): New variable.
(warn-about-disk-space): Test against %disk-space-warning-absolute.
Fix error in display-hint due to extraneous 'profile' argument.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2020-02-26 22:05:56 +01:00
Danny Milosavljevic
12f0aefd14
build-system/linux-module: Disable depmod.
* guix/build/linux-module-build-system.scm (install): Disable depmod.
2020-02-25 10:22:19 +01:00
Julien Lepiller
c23b42dd55
guix: node-build-system: Do not symlink /bin.
* guix/build/node-build-system.scm (install): Do not add a symlink for
/bin.
2020-02-25 00:27:09 +01:00
Pierre Neidhardt
9ea458c57a
build-system: Fix copy-build-system default install plan.
* guix/build-system/copy.scm (copy-build): Set install-plan default value
  to copy everything from source to the output.
2020-02-24 11:22:02 +01:00
Pierre Neidhardt
9b7f9e6f9b
ui: Don't truncate search output when inside Emacs.
* guix/ui.scm (display-search-results): Loop over all results when
  INSIDE_EMACS is set.
2020-02-24 11:01:52 +01:00
Pierre Neidhardt
672d3d4a87
ui: Don't disable colors when INSIDE_EMACS is set.
* guix/colors.scm (color-output?): Remove INSIDE_EMACS condition.
2020-02-24 11:01:52 +01:00
zimoun
d7545a6b53
ui: Only display link in capable terminals.
* guix/ui.scm (display-generation): Display generation path on new line.
* guix/scripts/describe.scm (channel-commit-hyperlink): Add TRANSFORMER argument.
(display-profile-content): Use TRANSFORMER argument to display URL explicitly
when terminal does not support hyperlinks.
2020-02-24 11:01:52 +01:00
Ludovic Courtès
fa99c4bbc7
ui: (size->number "1.M") is correctly parsed.
Reported by Pierre Neidhardt <mail@ambrevar.xyz>.

* guix/ui.scm (size->number)[unit-pos]: Add #\. to CHAR-SET:DIGIT.
* tests/ui.scm ("size->number, 1.M"): New test.
2020-02-23 12:47:13 +01:00
Jakub Kądziołka
6a3911b88f
swh: Handle absolute URLs being returned by the API.
* guix/swh.scm (swh-url): Don't prepend (%swh-base-url) if a domain is
  already present.

This fixes the "guix lint: warning: while connecting to Software Heritage:
host lookup failure: Name or service not known" error message.
2020-02-23 12:30:18 +01:00
Matt Wette
3d1e42321f
import: github: Use HTTP "Authorization" header for access tokens.
Fixes <https://bugs.gnu.org/39511>.

The "access_token" query parameter is now deprecated:

  https://developer.github.com/changes/2019-11-05-deprecated-passwords-and-authorizations-api/#authenticating-using-query-parameters

* guix/import/github.scm (fetch-releases-or-tags)[headers]: Add
"Authorization" header when (%github-token) is true.
[decorate]: Remove, and remove callers.
2020-02-22 12:17:35 +01:00
Ludovic Courtès
4cb63a564d
deduplication: Use nix-base32 encoding for link names.
Fixes <https://bugs.gnu.org/39725>.

* guix/store/deduplication.scm (deduplicate): Use
'bytevector->nix-base32-string' instead of 'bytevector->base16-string'.
2020-02-22 00:46:06 +01:00
Pierre Neidhardt
e90e64049c
build-system: Add copy-build-system.
* guix/build-system/copy.scm: New file.
* guix/build/copy-build-system.scm: New file.
* Makefile.am (MODULES): Add them.
* doc/guix.texi (Build Systems): Document 'copy-build-system'.
2020-02-21 10:53:11 +01:00
Lars-Dominik Braun
35f3511167
ssh: Add Kerberos-support to ssh:// daemon URLs
* guix/ssh.scm (open-ssh-session): Fall back to GSSAPI if public key
authentication does not work

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2020-02-20 11:14:44 +01:00
Maxim Cournoyer
adbdf188c2
scripts: system: Do not validate network file systems.
Fixes <https://bugs.gnu.org/39551>.

* guix/scripts/system.scm (check-file-system-availability): Ignore file
systems of the NFS type.
2020-02-18 12:20:17 -05:00
Timothy Sample
9c9407f746
Add (guix build gnu-bootstrap).
* guix/build/gnu-bootstrap.scm: New file.
* Makefile.am (MODULES): Add it.
2020-02-17 23:21:04 +01:00
Danny Milosavljevic
88f8549449
utils: Change 'patch-shebang' to not try to patch Rust source files.
* guix/build/utils.scm (patch-shebang): Match only absolute paths.
2020-02-17 16:52:55 +01:00
Efraim Flashner
1b2b7765a0
build: gnu-build-system: Adjust NOCONFIGURE variable.
This ia a follow-up to 481a0f1a7c.

* guix/build/gnu-build-system.scm (bootstrap): Set NOCONFIGURE for all
bootstrap scripts. Clean up variable after use.
2020-02-16 18:45:37 +02:00
Brendan Tildesley
a21bd6d5c2
build-system/gnu: Don't try executing directories in bootstrap phase.
* guix/build/gnu-build-system.scm: (bootstrap): Change the file-exists?
procedure to one that excludes directories, so that we do not mistake it for a
script. For example if the source includes a bootstrap/ directory.

Signed-off-by: Marius Bakke <mbakke@fastmail.com>
2020-02-16 15:48:37 +01:00
Efraim Flashner
481a0f1a7c
build: gnu-build-system: Don't run configure during bootstrap.
* guix/build/gnu-build-system.scm (bootstrap): Add NOCONFIGURE
environment variable before running bootstrap scripts.
2020-02-16 09:05:32 +02:00
Marius Bakke
7edafc884c
Merge branch 'master' into core-updates 2020-02-14 19:05:45 +01:00
Marius Bakke
11415d3506
guix build: Add '--manifest' option.
* guix/scripts/build.scm (show-help): Document --manifest argument.
(options->things-to-build): When given a manifest, evaluate all the entries.
* tests/guix-build.sh: Add test for --manifest.
* doc/guix.texi (Additional Build Options): Mention --manifest.
* etc/completion/bash/guix: Complete file name if 'guix build' argument is
-m.
2020-02-14 17:49:26 +01:00
Ludovic Courtès
89da127035
gnu: cross-base: Switch back to 'CROSS_C_INCLUDE_PATH' & co.
This is a followup to 2073b55e6b.

* gnu/build/cross-toolchain.scm (%gcc-include-paths): Switch back to
'C_INCLUDE_PATH' & co.
* gnu/packages/cross-base.scm (%gcc-include-paths): Likewise.
(cross-gcc-arguments): Remove 'treat-glibc-as-system-header' phase.
(cross-gcc)[native-inputs]: Reorder so that libc comes last.
[search-paths]: Add "include/c++" for 'CROSS_CPLUS_INCLUDE_PATH'.
* guix/build-system/gnu.scm (standard-cross-packages): Have "cross-gcc"
appear both for 'host and 'target.
2020-02-12 20:35:43 +01:00
Jack Hill
46c5c917ba
build: go-build-system: Disable Go module support.
This allows for upgrading the Go compiler without overhauling
go-build-system first.

* guix/build/go-build-system.scm (setup-go-environment): Set GO111MODULE to
off.

Signed-off-by: Alex Griffin <a@ajgrf.com>
2020-02-11 16:52:17 -06:00
Ludovic Courtès
a65ffbea50
ui: Fix typo in comment.
Reported by Vincent Legoll <vincent.legoll@gmail.com>.

* guix/ui.scm (call-with-error-handling): Remove "come" in comment.
2020-02-11 17:42:10 +01:00
Ludovic Courtès
1d88470e10
describe: Remove dependency on (guix scripts pull).
Until now, 'guix describe' would perform ~3K stat calls and ~1K openat
calls because it was pulling (guix scripts pull), which in turn pulls in
many (gnu packages …) modules.

* guix/scripts/pull.scm (display-profile-content, %vcs-web-views)
(channel-commit-hyperlink): Move to...
* guix/scripts/describe.scm: ... here.  Remove import of (guix scripts
pull).
2020-02-11 12:33:35 +01:00
Ludovic Courtès
3d2f29382d
swh: Remove 'id' field from <origin>.
The "id" field has been removed upstream:

  https://sympa.inria.fr/sympa/arc/swh-devel/2020-02/msg00005.html

* guix/swh.scm (<origin>)[id]: Remove.
2020-02-11 12:33:35 +01:00
Ludovic Courtès
a063bac618
git: Add missing exports for <git-checkout>.
* guix/git.scm (<git-checkout>): Export 'git-checkout-commit' and
'git-checkout-recursive?'.
2020-02-10 23:31:58 +01:00
Marius Bakke
2cbccf7f65
Merge branch 'staging' 2020-02-10 20:11:26 +01:00
Tobias Geerinckx-Rice
e813444287
Update e-mail address for Jakob L. Kreuze.
As requested here:
<https://lists.gnu.org/archive/html/guix-devel/2020-02/msg00128.html>.

* .mailmap: Add an entry for Jakob.
* gnu/machine.scm, gnu/machine/digital-ocean.scm, gnu/machine/ssh.scm,
gnu/packages/admin.scm, gnu/packages/i2p.scm, gnu/packages/music.scm,
gnu/packages/web.scm, gnu/tests/reconfigure.scm, guix/scripts/deploy.scm,
guix/scripts/system/reconfigure.scm: Update their e-mail address.
2020-02-09 23:16:45 +01:00
Ludovic Courtès
2073b55e6b
gnu: gcc: Switch back to using 'C_INCLUDE_PATH' instead of 'CPATH'.
Fixes <https://bugs.gnu.org/30756>.
Initially reported by Julien Lepiller <julien@lepiller.eu>.

* gnu/packages/base.scm (make-gcc-libc): Remove
'treat-glibc-as-system-header' phase from 'arguments'.
* gnu/packages/commencement.scm (gcc-final): Likewise.
* gnu/packages/gcc.scm (gcc-4.7)[arguments]: Add "include/c++" to
'CPLUS_INCLUDE_PATH'.
(gcc-6)[native-search-paths]: Remove.
* gnu/packages/make-bootstrap.scm (gcc-for-bootstrap): Remove
'native-search-paths' and 'arguments'.
* gnu/packages/patches/python-2.7-search-paths.patch,
gnu/packages/patches/python-3-search-paths.patch: Replace "CPATH" with
"C_INCLUDE_PATH".
* guix/build-system/cmake.scm (lower): When not cross-compiling, move
INPUTS from the 'host-inputs' field to the 'build-inputs' field of the
bag, right after NATIVE-INPUTS.
* guix/build-system/glib-or-gtk.scm (lower): Likewise.
* guix/build-system/gnu.scm (lower): Likewise.
* guix/build-system/meson.scm (lower): Likewise.
2020-02-06 18:47:15 +01:00
Mathieu Othacehe
e3e1a7ba08
git: Remove leftover pk call.
* guix/git.scm (update-cached-checkout): Remove leftover pk call.
2020-02-06 17:14:39 +01:00
Mathieu Othacehe
c357474994
git: Add ssh authentication support.
If Guile-Git revision is >= 0.3.0, use SSH agent authentication method for
both clone and fetch calls.

* guix/git.scm (auth-supported?): New variable,
(clone*): set auth-method to ssh-agent if the variable above is true,
(update-cached-checkout): ditto.
2020-02-06 16:10:31 +01:00
Marius Bakke
f10921c5ad
Merge branch 'master' into staging 2020-02-05 22:08:06 +01:00
Jakub Kądziołka
9d0dfd9a9a
import: pypi: Support exporting packages with .zip source.
* guix/import/pypi.scm (make-pypi-sexp): Rename test-inputs to
  native-inputs. Restructure the way pypi-uri parameters are generated.
  Use pypi-uri's extension parameter when required. Add "unzip" to
  native inputs when the package source is a zip file.

Signed-off-by: Marius Bakke <mbakke@fastmail.com>
2020-02-05 22:03:35 +01:00
Ludovic Courtès
c24fe4a520
import: gem: Deal with unavailable licensing info.
Fixes <https://bugs.gnu.org/39404>.
Reported by Seth <lee.seth@tuta.io>.

* guix/import/gem.scm (<gem>)[licenses]: Adjust for non-vector
licenses.
* tests/gem.scm (test-bar-json): Change "licenses" to 'null'.
("gem-recursive-import"): Adjust accordingly.
2020-02-05 16:18:58 +01:00
Ludovic Courtès
23db833335
import: gem: Rewrite to use a JSON mapping to records.
* guix/import/gem.scm (<gem>, <gem-dependencies>, <gem-dependency>): New
record types with JSON mapping.
(json->gem-dependencies): New procedures.
(rubygems-fetch): Use it.
(hex-string->bytevector): Remove.
(make-gem-sexp): Expect HASH to be a bytevector.
(gem->guix-package): Adjust to use the new <gem> data type instead of an
alist.
(latest-release): Likewise.
2020-02-05 16:18:58 +01:00
Efraim Flashner
d54ed69c19
Merge remote-tracking branch 'origin/master' into core-updates 2020-02-04 14:16:23 +02:00
Leo Prikler
cb9cb2e89a
licenses: Add Unicode license.
* guix/licenses.scm (unicode): New variable.

Signed-off-by: Ricardo Wurmus <rekado@elephly.net>
2020-02-03 16:32:39 +01:00
Marius Bakke
52665d2b6b
Merge branch 'staging' into core-updates 2020-02-03 15:45:44 +01:00
Pierre Neidhardt
5db7df2eab
guix: Fix missing export for make-desktop-entry-file.
* guix/build/utils.scm: Export make-desktop-entry-file.
2020-01-30 16:53:44 +01:00