Commit Graph

4550 Commits

Author SHA1 Message Date
Ludovic Courtès
c2b2c8e9e7
lint: archival: Gracefully handle network failures.
* guix/lint.scm (check-archival): Wrap re-throw in 'with-networking-fail-safe'.
2019-12-02 12:24:56 +01:00
Hartmut Goebel
b6d852ce6d
guix: Add the 'qt' build system.
* guix/build-system/qt.scm, guix/build/qt-build-system.scm: New files.
* Makefile.am (MODULES): Add them.
* doc/guix.texi (Buiild systems): Add the new build system.
2019-12-01 20:24:47 +01:00
Mathieu Othacehe
fcc4c6ae60
scripts: system: Add --target option.
* guix/scripts/system.scm (%options): Add target option,
(%default-options): ditto,
(process-action): Rename existing target variable to target-file and pass new
target variable to run-with-store procedure.
2019-12-01 16:51:40 +01:00
Ludovic Courtès
99c45877a9
gexp: 'local-file' properly resolves non-literal relative file names.
* guix/gexp.scm (local-file): Distinguish the case where FILE is a
literal string and when it's not.  Add a clause for when FILE is not a
literal string.
* tests/gexp.scm ("local-file, non-literal relative file name"): New test.
* doc/guix.texi (G-Expressions): Update accordingly.
2019-11-30 23:50:40 +01:00
Julien Lepiller
ba3ff730ca
guix: import: Fix importing dune project.
* guix/import/opam.scm: Detect dune projects from dependencies, then
filter dune from dependencies.
2019-11-30 15:50:51 +01:00
Julien Lepiller
c60d98d42d
guix: import: Fix opam importer.
* guix/import/opam.scm: Allow line breaks in strings.
2019-11-30 15:50:46 +01:00
Ludovic Courtès
3f8e890d91
ui: 'with-profile-lock' keeps going upon ENOLCK.
* guix/build/syscalls.scm (call-with-file-lock/no-wait): Really pass
ARGS to HANDLER.  Return #f when HANDLER is called.
* guix/ui.scm (profile-lock-handler): Emit a mere warning upon ENOLCK.
2019-11-29 15:54:20 +01:00
Ludovic Courtès
55e1dfa4dd
ui: Factorize 'with-profile-lock'.
* guix/ui.scm (profile-lock-handler, profile-lock-file): New
procedures.
(with-profile-lock): New macro.
* guix/scripts/package.scm (process-actions): Use 'with-profile-lock'
instead of 'with-file-lock/no-wait'.
* guix/scripts/pull.scm (guix-pull): Likewise.
2019-11-29 15:54:20 +01:00
Ludovic Courtès
2d6bd5edbc
pull, describe: Emit hyperlinks for commit identifiers.
* guix/scripts/pull.scm (%vcs-web-views): New variable.
(channel-commit-hyperlink): New procedure.
(display-news-entry): Add 'channel' parameter.  When
'supports-hyperlinks?' returns true, call 'channel-commit-hyperlink'.
(display-profile-content): Likewise, and define CHANNEL.
(display-channel-specific-news): Pass CHANNEL to 'display-news-entry'.
* guix/ui.scm (hyperlink): Make public.
2019-11-28 18:43:54 +01:00
Ludovic Courtès
055f052574
ui: 'display-generation' emits a hyperlink for the generation.
* guix/ui.scm (supports-hyperlinks?): Make 'port' optional.
(display-generation): Use 'file-hyperlink' for the heading when
'supports-hyperlinks?' returns true.
2019-11-28 13:30:53 +01:00
Ludovic Courtès
fa983b8257
ui: Add 'file-hyperlink'.
* guix/ui.scm (file-hyperlink): New procedure.
(location->hyperlink): Use it.
2019-11-28 13:30:53 +01:00
Ludovic Courtès
9e3f9ac3c0
substitute: 'http-multiple-get' no longer drops requests above 1,000.
Previously, in the unlikely case 'http-multiple-get' was passed more
than 1,000 requests, it could have dropped all those above 1,000.

* guix/scripts/substitute.scm (http-multiple-get): Define 'batch'.  Use
that for the 'write-request' loop.  Add 'processed' parameter to 'loop'
and use that to compute the remaining requests and call 'connect' in the
recursion base case.
2019-11-28 13:30:53 +01:00
Efraim Flashner
e8c6644af1
lint: Check for more packages which should be native.
* guix/lint.scm (check-inputs-should-be-native): Add yasm, nasm, fasm.
2019-11-28 12:30:42 +02:00
Ludovic Courtès
434138e2f2
substitute: Make '%allow-unauthenticated-substitutes?' public.
* guix/scripts/substitute.scm (warn-about-missing-authentication): New
procedure.
(%allow-unauthenticated-substitutes?): Turn into a public parameter and
use 'warn-about-missing-authentication'.
(valid-narinfo?): Adjust accordingly.
* tests/substitute.scm (call-with-narinfo): Likewise.
2019-11-27 00:03:03 +01:00
Ludovic Courtès
7f3bbfaf8e
ui: Adjust SRFI-34 exception handling to Guile 2.9.5.
* guix/ui.scm (report-load-error, warn-about-load-error)
(read/eval): Match (or 'srfi-34 '%exception) instead of just 'srfi-34 to
match what Guile 2.9.5 does.
2019-11-27 00:03:03 +01:00
Hartmut Goebel
d1e4e64cd7
guix: Fix wrap-qt-program.
Directory names added here need to match qtbase's native-search-path
specifications.

* guix/build/qt-utils.scm (wrap-qt-program): Change paths used for
  QML2_IMPORT_PATH and QT_PLUGIN_PATH.
2019-11-26 12:31:39 +01:00
Ludovic Courtès
2ce08a5d79
guix build: '--keep-failed' implies '--no-offload'.
* guix/scripts/build.scm (set-build-options-from-command-line): Pass
 #:offload? #f when 'keep-failed? is true.
* doc/guix.texi (Common Build Options): Document it.
2019-11-26 00:16:36 +01:00
Ludovic Courtès
7f44ab48f9
Use 'offload?' instead of 'build-hook?' internally.
* guix/scripts/archive.scm (%default-options): Replace 'build-hook?'
with 'offload?'.
* guix/scripts/build.scm (set-build-options-from-command-line): Pass
 #:offload? instead of #:use-build-hook?.
(%standard-build-options): Use the 'offload? key instead of 'build-hook?.
(%default-options): Replace 'build-hook?' with 'offload?'.
* guix/scripts/copy.scm (%default-options): Likewise.
* guix/scripts/deploy.scm (%default-options): Likewise.
* 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.
* guix/scripts/time-machine.scm (%default-options): Likewise.
* guix/store.scm (set-build-options): Have #:use-build-hook? default
to *unspecified*.  Add #:offload?.  Add call to 'warn-about-deprecation'
when #:use-build-hook? is specified.
2019-11-26 00:16:36 +01:00
Ludovic Courtès
dc209d5a5d
guix build, daemon: Rename "--no-build-hook" to "--no-offload".
This is a followup to bc69ea2d60.

* guix/scripts/build.scm (show-build-options-help): Rename
"--no-build-hook" to "--no-offload".
(%standard-build-options): Likewise, and warn when "--no-build-hook" is
passed.
* nix/nix-daemon/guix-daemon.cc (options): Add "--no-offload" and mark
"--no-build-hook" as hidden.
* guix/scripts/offload.scm: Adjust comment.
* doc/guix.texi (Invoking guix-daemon, Common Build Options): Replace
"--no-build-hook" with "--no-offload".
* etc/completion/fish/guix.fish, etc/completion/zsh/_guix: Adjust
accordingly.
2019-11-26 00:16:36 +01:00
Ludovic Courtès
fed3632812
compile: Adjust for Guile 2.9.5.
* guix/build/compile.scm (optimizations-for-level): New procedure.
Include '%lightweight-optimizations' and '%default-optimizations'.
(optimization-options): Use 'optimizations-for-level'.
2019-11-23 22:45:21 +01:00
Mathieu Othacehe
74f1718081
utils: Use target-aarch64? and target-arm? helpers.
* guix/utils.scm (target-aarch64?, target-arm?): New exported procedures.
2019-11-22 16:33:42 +01:00
Ludovic Courtès
ca541f9ce6
pack: Allow multiple '--manifest' options.
* guix/scripts/pack.scm (guix-pack): Collect 'manifest' options, and
concatenate the resulting manifests.
* tests/guix-pack.sh: Test it.
* doc/guix.texi (Invoking guix pack): Document it.
2019-11-22 15:07:59 +01:00
Ludovic Courtès
bf9206d8ed
package: Allow multiple '--manifest' options.
* guix/scripts/package.scm (manifest-action): Remove.
(%actions): Remove it.
(load-manifest): New procedure.
(process-actions): Handle 'manifest' options.  Define 'files' from
'manifest' options.  Define 'manifest' based on FILES.  Define 'trans'
to represent the final transaction.
* tests/guix-package.sh: Test it.
* doc/guix.texi (Invoking guix package): Mention
2019-11-22 15:07:58 +01:00
Ludovic Courtès
ce30a0eb7e
profiles: Add 'concatenate-manifests'.
* guix/profiles.scm (concatenate-manifests): New procedure.
* tests/profiles.scm ("concatenate-manifests"): New test.
2019-11-22 15:07:58 +01:00
Ludovic Courtès
c0e9d470e1
import: texlive: Handle multi-license packages.
This fixes "guix import texlive translator".

* guix/import/texlive.scm (sxml->package): Add clause for when 'license'
is a list of licences, as is the case with the "translator" package.
2019-11-22 15:00:59 +01:00
Ludovic Courtès
4f5234be03
substitute: Don't fetch /nix-cache-info.
This avoids one GET request every time 'fetch-narinfos' is called.
The file itself was essentially useless.

* guix/scripts/substitute.scm (<cache-info>, download-cache-info):
Remove.
(%unreachable-hosts): New variable.
(open-connection-for-uri/maybe): New procedure.
(fetch-narinfos)[handle-narinfo-response]: Check whether NARINFO has its
'path' under (%store-prefix) and ignore it otherwise.  Move
'update-progress!' call before 'if'.
[do-fetch]: Remove 'port' parameter.  Use
'open-connection-for-uri/maybe'.
Remove call to 'download-cache-info'.
2019-11-22 12:17:42 +01:00
Ludovic Courtès
a2e661e95f
pack: Add "--derivation".
* guix/scripts/pack.scm (%options, show-help): Add "--derivation".
(guix-pack): Honor it.
* tests/guix-pack.sh: Test it.
* doc/guix.texi (Invoking guix pack): Document it.
2019-11-21 11:48:30 +01:00
Timothy Sample
064a967ba0
gnu: Use GHC 8.6.5 as the main Haskell compiler.
* gnu/package/haskell.scm (ghc-8): Change to 'ghc-8.6'.
* guix/import/hackage.scm (ghc-standard-libraries): Add 'ghc-heap'
and 'libiserv'.
2019-11-20 20:47:48 -05:00
Ludovic Courtès
1bdb63e73b
deploy: Handle "--version".
* guix/scripts/deploy.scm (%options): Add "--version".
2019-11-19 10:51:53 +01:00
Ludovic Courtès
6fbd8fde2f
pull: Acquire a lock for the target profile.
This is a followup to b1fb663404.

* guix/scripts/pull.scm (guix-pull): Wrap 'run-with-store' call in
'with-file-lock/no-wait'.
2019-11-19 10:51:52 +01:00
Ludovic Courtès
0d78d0f09c
download: Load *.crt certificate bundles when *.pem files are missing.
Fixes <https://bugs.gnu.org/38254>.

* guix/build/download.scm (make-credendials-with-ca-trust-files): Look
for *.crt files under DIRECTORY when *.pem files cannot be found.
2019-11-18 12:17:32 +01:00
Maxim Cournoyer
e1d31e6457
build-system: emacs: Simplify the SET-EMACS-LOAD-PATH phase.
It is no longer necessary to search for the Elisp libraries manually, as Emacs
now include a search path specification serving that purpose.

* guix/build/emacs-build-system.scm (set-emacs-load-path): Replace by...
(add-source-to-load-path): ...this.
(%standard-phases): Adjust accordingly.
2019-11-18 14:34:40 +09:00
Alex Sassmannshausen
b997d43214
utils: Handle #f file-name.
* guix/utils.scm (current-source-directory): Change dispatch to handle #f
file-name.

Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
2019-11-18 13:18:41 +09:00
Ludovic Courtès
9c9982dc0c
guix build: Handle "guix build /….drv" correctly for non-existent derivations.
This lets the daemon substitute missing derivations, as in the example
at <https://bugs.gnu.org/38226>, instead of failing with ENOENT.

* guix/scripts/build.scm (options->things-to-build): In the
'derivation-path?' case, don't fail when 'read-derivation-from-file'
raises to ENOENT; return the empty list in that case.
(guix-build): Add non-existent '.drv' files to ITEMS.
Pass ITEMS in addition to DRV to 'build-derivations'.
* tests/guix-build.sh: Add test.
2019-11-17 23:14:54 +01:00
Ludovic Courtès
87e7faa2ae
time-machine: Honor the standard build options.
* guix/scripts/time-machine.scm (show-help): Call 'show-build-options-help'.
(%options): Add %STANDARD-BUILD-OPTIONS.
(%default-options): New variable.
(parse-args): Pass (list %default-options) to 'parse-command-line' and
remove #:build-options? parameter.
(guix-time-machine): Call 'set-build-options-from-command-line' and wrap
'cached-channel-instance' call in 'with-status-verbosity'.
* doc/guix.texi (Invoking guix time-machine): Mention common build options.
2019-11-15 23:29:06 +01:00
Ludovic Courtès
d17e012da7
time-machine: Handle 'git-error' exceptions.
* guix/scripts/pull.scm (with-git-error-handling): Export.
* guix/scripts/time-machine.scm (guix-time-machine): Wrap body in
'with-git-error-handling'.
2019-11-15 23:29:06 +01:00
Konrad Hinsen
1d5485690b
inferior: 'cached-channel-instance' takes an open store connection.
* guix/inferior.scm (cached-channel-instance): Take an explicit 'store'
argument.
(inferior-for-channels): Wrap call to 'cached-channel-instance' in
'with-store'.
* guix/time-machine.scm (guix-time-machine): Wrap call to
'cached-channel-instance' in 'with-store'.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2019-11-15 23:28:17 +01:00
Konrad Hinsen
f675f8dec7
Add 'guix time-machine'.
* guix/scripts/time-machine.scm: New file.
* Makefile.am: (MODULES): Add it.
* guix/scripts/pull.scm (channel-list): Export.
* guix/inferior.scm (cached-channel-instance): New procedure.
(inferior-for-channels): Use it.
* doc/guix.texi (Invoking guix time-machine): New section.
(Channels): Cross-reference it.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2019-11-15 23:28:17 +01:00
Ludovic Courtès
1edcfda81b
pull: Remove unused '--verbose' option.
This option had been ignored since commit
0d39a3b989 (August 2018).

* guix/scripts/pull.scm (show-help, %options): Remove "--verbose".
(build-and-install): Remove #:verbose?, which was unused.
(guix-pull): Adjust accordingly.
2019-11-15 23:28:17 +01:00
Efraim Flashner
cda79c7cc9
make-bootstrap: Adjust copied linux headers.
* guix/build/make-bootstrap.scm (copy-linux-headers): Remove header
file 'a.out.h' is no longer part of the linux kernel headers.
2019-11-15 13:00:23 +02:00
Julien Lepiller
277ba1d4f8
guix: svn: Allow dropping externals.
* guix/build/svn.scm (svn-fetch): Allow to ignore externals.
* guix/svn-download.scm (svn-reference, svn-multi-reference): Add
recursive? field.
2019-11-13 22:49:47 +01:00
Ludovic Courtès
edd25a8cac
ui: Emit hyperlinks for 'license' in package search results.
* guix/ui.scm (package->recutils): When HYPERLINKS is true, call
'hyperlink' for the 'license' field.
2019-11-09 00:36:10 +01:00
Ludovic Courtès
7f0f38b54c
ui: Produce hyperlinks for the 'location' field of search results.
This affects the output of 'guix show', 'guix search', and 'guix system
search'.

* guix/ui.scm (hyperlink, supports-hyperlinks?, location->hyperlink):
New procedures.
(package->recutils): Add #:hyperlinks? and honor it.
(display-search-results): Pass #:hyperlinks? to PRINT.
* guix/scripts/system/search.scm (service-type->recutils): Add
 #:hyperlinks? and honor it.
2019-11-09 00:36:10 +01:00
Julien Lepiller
b1fb663404
guix: package: lock profiles when processing them.
* guix/scripts/package.scm (process-actions): Get a per-profile lock to
prevent concurrent actions on profiles.
* tests/guix-package.sh: Add test.
2019-11-08 21:52:53 +01:00
Julien Lepiller
f49e913188
guix: Add file-locking with no wait.
* guix/build/syscalls.scm (with-file-lock/no-wait): New procedure.
(lock-file): Take a #:wait? key.
2019-11-08 21:52:30 +01:00
Ludovic Courtès
3e962e59d8
graph: Support package transformation options.
* guix/scripts/graph.scm (%options): Append %TRANSFORMATION-OPTIONS.
(show-help): Call 'show-transformation-options-help'.
(guix-graph): Call 'options->transformation' and use it.
* tests/guix-graph.sh: Add test.
* doc/guix.texi (Invoking guix graph): Document it.
2019-11-07 18:39:55 +01:00
Ludovic Courtès
6654677675
derivations: Use a regular hash table for the module cache.
The hit rate of the 'add-data-to-store' cache goes from 10% to 4% on:

  guix build -e '(@@ (gnu packages libreoffice) libreoffice)' -nd

* guix/derivations.scm (%module-cache): Turn into a regular hash table.
It didn't make sense to use a weak-value hash table given that values
are pairs.
2019-11-07 18:39:55 +01:00
Ludovic Courtès
6330db4d55
pull: Gracefully handle invalid Texinfo markup in news.
Reported by Oleg Pykhalov <go.wigust@gmail.com>.

* guix/scripts/pull.scm (display-news-entry-title)
(display-news-entry): Catch 'parser-error' around call to
'texi->plain-text', and return Texinfo as-is when an exception is
caught.
2019-11-01 12:23:45 +01:00
Ludovic Courtès
8c8d60752e
derivation: Remove memoization invalidation for 'derivation->bytevector'.
This is a followup to d727a9343d, which
broke 'hydra-jobs' from (gnu ci).

* guix/derivations.scm (invalidate-derivation-caches!): Remove call to
'invalidate-memoization!' for 'derivation->bytevector'.
2019-10-28 15:56:18 +01:00
Ludovic Courtès
49af34cfac
pull: Honor '/etc/guix/channels.scm'.
* guix/scripts/pull.scm (channel-list)[global-file]: New variable.
[channels]: Honor it.
* doc/guix.texi (Invoking guix pull): Document it.
2019-10-27 23:05:01 +01:00