Commit Graph

1895 Commits

Author SHA1 Message Date
Ludovic Courtès 333c376c45 graft: Graft files in parallel.
* guix/build/graft.scm (rewrite-directory): Use 'n-par-for-each' instead
  of 'for-each'.
2015-11-16 14:22:58 +01:00
Ludovic Courtès 9c88f655e6 graft: Graft files in a deterministic order.
* guix/build/graft.scm (rewrite-directory)[rewrite-leaf]: Change to take
  a single parameter.  Add call to 'lstat'.  Factorize result of
  'destination'.
  Use 'find-files' instead of 'file-system-fold'.
2015-11-16 14:22:58 +01:00
Ludovic Courtès bd7e1ffae6 lint: Have connections time out after 3 seconds.
* guix/scripts/lint.scm (probe-uri): Add #:timeout parameter.  Pass it
  to 'open-connection-for-uri' and 'ftp-open'.
  (validate-uri): Pass #:timeout 3 to 'probe-uri'.
2015-11-12 23:47:01 +01:00
Ludovic Courtès 1b9aefa394 download: Always use AI_ADDRCONFIG when resolving host names.
* guix/build/download.scm (open-socket-for-uri): Always pass
  AI_ADDRCONFIG to 'getaddrinfo' as recommended in the fine Guile
  manual.
* guix/ftp-client.scm (ftp-open): Ditto.
2015-11-12 23:47:01 +01:00
Ludovic Courtès 60fd51222f download: Add timeout parameter for connections.
* guix/build/download.scm (ensure-uri): New procedure.
(current-http-proxy): New variable.
(open-socket-for-uri): Copy from Guile commit aaea5b2, but add #:timeout
parameter and use 'connect*' instead of 'connect'.
(open-connection-for-uri): Add #:timeout parameter and pass it to
'open-socket-for-uri'.
2015-11-12 23:47:00 +01:00
Ludovic Courtès 4856700698 ftp-client: Add timeout parameter to 'ftp-open'.
* guix/ftp-client.scm (catch-EINPROGRESS): New macro.
(connect*): New procedure.
(ftp-open): Add #:timeout parameter.  Use 'connect*' instead of
'connect' and pass it TIMEOUT.
2015-11-12 23:47:00 +01:00
Ludovic Courtès 279ec1df20 ftp-client: Restrict to TCP connections.
* guix/ftp-client.scm (ftp-open): Force SOCK_STREAM as the socket type
  to avoid calling 'connect' on a datagram socket.
2015-11-12 23:47:00 +01:00
Ludovic Courtès 3a96d7c3dd guix gc: Error out when extra arguments are passed.
Fixes <http://bugs.gnu.org/21817>.
Reported by Petter Berntsen <petter@mykolab.ch>.

* guix/scripts/gc.scm (guix-gc)[assert-no-extra-arguments]: New
  procedure.
  Use it for actions 'collect-garbage', 'optimize', and 'verify'.
* tests/guix-gc.sh: Add tests.
2015-11-11 23:29:20 +01:00
Ludovic Courtès 6237b9fa39 edit: Honor $VISUAL.
Suggested by Andreas Enge <andreas@enge.fr>.

* guix/scripts/edit.scm (%editor): Honor 'VISUAL' before 'EDITOR'.
  (show-help): Adjust accordingly.
* doc/guix.texi (Invoking guix edit): Likewise.
2015-11-11 23:29:20 +01:00
Ludovic Courtès 14649b8cdb refresh: Avoid non-literal format string.
Reported by Mathieu Lirzin <mthl@gnu.org>.

* guix/scripts/refresh.scm (guix-refresh): Rewrite 'list-dependent?'
  report to avoid nested 'N_' calls.
2015-11-11 22:10:21 +01:00
Ludovic Courtès 2ab5fdc4b4 ui: 'guix help COMMAND' is like 'guix COMMAND --help'.
* guix/ui.scm (run-guix): Add ("help" COMMAND) case.
2015-11-11 00:37:51 +01:00
Ludovic Courtès fc2d233964 guix package: '--search-paths' can report combined search paths.
Partly fixes <http://bugs.gnu.org/20255>.

* guix/scripts/package.scm (search-path-environment-variables): Change
  'profile' to 'profiles'; expect it to be a list.
  (display-search-paths): Likewise.
  (%default-options): Remove 'profile' entry.
  (%options) <--profile>: Keep previous values associated with 'profile'
  in RESULT.
  (guix-package)[process-actions, process-query]: Handle the possible
  lack of 'profile' pair in OPTS.
2015-11-11 00:37:50 +01:00
Ludovic Courtès b68d2dbf08 refresh: Discard PyPI updater when Guile-JSON is missing.
Reported by Sleep_Walker and Mathieu Lirzin <mthl@gnu.org>.

* guix/scripts/refresh.scm (maybe-updater, list-updaters): New macros.
  (%updaters): Use 'list-updaters' instead of 'list'.  Make
  %PYPI-UPDATER conditional.
2015-11-08 22:21:19 +01:00
Ludovic Courtès 650f1615de edit: Improve error reporting when $EDITOR is not found.
Reported by Benno Evers <benno@bmevers.de>
at <https://lists.gnu.org/archive/html/guix-devel/2015-11/msg00125.html>.

* guix/scripts/edit.scm (guix-edit): Wrap 'execl' call in 'catch'.
  Provide more meaningful error message.
2015-11-05 12:04:26 +01:00
Ludovic Courtès 67c920fa5d edit: Lift helper procedure.
* guix/scripts/edit.scm (package->location-specification): New
  procedure, with code formerly...
  (guix-edit): ... here.  Use it.
2015-11-05 12:01:26 +01:00
Ludovic Courtès 5453de3dd8 import: hackage: Fix invalid use of 'leave'.
Reported by Paul van der Walt <paul@denknerd.org>
in <http://bugs.gnu.org/21829>.

* guix/scripts/import/hackage.scm (guix-import-hackage): Add missing
  argument in call to 'leave'.
2015-11-04 23:54:12 +01:00
Ludovic Courtès f856fcb558 build-system/python: 'package-with-python2' preserves source location.
* guix/build-system/python.scm (package-with-explicit-python): Add
  'location' field.
2015-11-04 00:12:20 +01:00
Ludovic Courtès 32728adb95 import: pypi: Make downloads silent.
* guix/import/pypi.scm (pypi-fetch): Wrap body in
  'call-with-output-file' and 'with-error-to-port'.
2015-11-04 00:12:19 +01:00
Ludovic Courtès d1cb7e9562 import: pypi: Add missing copyright line.
* guix/import/pypi.scm: Add missing copyright line for bab020d.
2015-11-04 00:12:19 +01:00
David Thompson d431b23240 scripts: container: Fix 'exec' command line parsing.
* guix/scripts/container/exec.scm (partition-args): Reimplement such
  that all args up to and including the PID are returned as the first of
  the two values.
2015-11-03 18:05:43 -05:00
Cyril Roelandt bab020d7ca import: pypi: add updater
* guix/import/pypi.scm (guix-package->pypi-name,
  latest-release): New procedures.
  (%pypi-updater): New variable.
* guix/scripts/refresh.scm (%updaters): Add %PYPI-UPDATER.
* doc/guix.texi (Invoking guix refresh): Mention PyPI
2015-11-03 23:41:25 +01:00
Cyril Roelandt d8bdd38201 import: pypi: Use "pypi-uri" instead of building the URL manually.
* guix/import/pypi.scm (make-pypi-sexp): Use "pypi-uri".
* tests/pypi.scm: Update the tests accordingly.
2015-11-03 21:38:13 +01:00
Cyril Roelandt 3009334e3b guix: Add a "pypi-uri" helper method.
* guix/download.scm (mirrors): New "pypi" mirror.
* guix/build-system/python.scm (pypi-uri): New method.
2015-11-03 21:38:13 +01:00
David Thompson 00bfa7ea25 scripts: environment: Display friendly container error messages.
* guix/scripts/environment.scm (assert-container-features): New
  procedure.
  (guix-environment): Use it.
2015-11-03 11:41:04 -05:00
Ludovic Courtès 3195e19de2 import: gnu: Update to the (guix upstream) API.
This is a followup to 0a7c5a0.

* guix/import/gnu.scm (preferred-archive-type): Use
  'upstream-source-archive-types' instead of 'gnu-release-archive-types'.
  (gnu-package->sexp): Use 'upstream-source-urls' et al.  Update call to
  'download-tarball'.
  (gnu->guix-package): Use <upstream-source> instead of <gnu-release>.
* guix/upstream.scm (upstream-source-archive-types): Export.
2015-11-03 00:59:28 +01:00
Ludovic Courtès a70436183a guix system: Always build grub.cfg for 'init' and 'reconfigure'.
Fixes <http://bugs.gnu.org/21068>.
Reported by Germano Gabbianelli <tyrion.mx@gmail.com>
and Mark H Weaver <mhw@netris.org>.

* guix/scripts/system.scm (perform-action): Always add GRUB.CFG to DRVS
  for 'init' and 'reconfigure'.

Co-authored-by: Mark H Weaver <mhw@netris.org>
2015-11-02 22:49:04 +01:00
Ludovic Courtès d62e201cfd services: Add 'system-service-type'.
* gnu/services.scm (system-derivation): New procedure.
  (system-service-type): New variable.
  (boot-script-entry): New procedure.
  (boot-service-type): Extend SYSTEM-SERVICE-TYPE.
  (etc-entry): New procedure.
  (etc-service-type): Extend SYSTEM-SERVICE-TYPE.
  (fold-services): Change default #:target-type to SYSTEM-SERVICE-TYPE.
* gnu/system.scm (operating-system-directory-base-entries): New procedure.
  (essential-services): Use it.  Add an instance of
  SYSTEM-SERVICE-TYPE.
  (operating-system-boot-script): Pass #:target-type to 'fold-services'.
  (operating-system-derivation): Rewrite in terms of 'fold-services'.
* gnu/system/linux-container.scm (system-container): Remove.
  (container-script): Use 'operating-system-derivation'.
* guix/scripts/system.scm (export-extension-graph): Replace
  BOOT-SERVICE-TYPE by SYSTEM-SERVICE-TYPE.
* doc/images/service-graph.dot: Add 'system' node and edges.
* doc/guix.texi (Service Composition): Mention SYSTEM-SERVICE-TYPE.
  (Service Reference): Document it.  Update 'fold-services'
  documentation.
2015-11-02 22:25:11 +01:00
David Thompson 7241c2fae6 scripts: environment: Ignore user shell when spawning container.
* guix/scripts/environment.scm (%default-options): Remove 'exec'
  association.
  (guix-environment): If the user didn't specify a command, use the
  default shell, or use /bin/sh when a container is requested.
2015-11-02 08:30:54 -05:00
Alex Kost 6407ce8ea1 emacs: Add completions for '--type' option of 'refresh' popup.
* guix/scripts/refresh.scm: Export '%updaters'.
* emacs/guix-main.scm (refresh-updater-names): New procedure.
* emacs/guix-base.el (guix-refresh-updater-names): New function.
* emacs/guix-read.el (guix-read-refresh-updater-names,
  guix-read-refresh-updater-names-string): New functions.
* emacs/guix-command.el (guix-command-improve-refresh-argument): Use
  'guix-read-refresh-updater-names-string'.
2015-11-02 15:51:40 +03:00
David Thompson 32efa254a8 scripts: Add 'container' subcommand.
* guix/scripts/container.scm: New file.
* guix/scripts/container/exec.scm: New file.
* po/guix/POTFILES.in: Add them.
* Makefile.am (MODULES): Add them.
* doc/guix.texi (Invoking guix container): New section.
2015-11-01 18:20:04 -05:00
Alex Kost fbd213a83f guix system: Fix typo in --help message.
* guix/scripts/system.scm (show-help): Align 'container' the same way as
  other actions.
2015-10-31 23:21:23 +03:00
David Thompson c9c282cea0 scripts: environment: Allow lists of packages in expressions.
* guix/scripts/environment.scm (options/resolve-packages): Match against
  lists of packages when evaluating expressions.
* tests/guix-environment.sh: Add test.
* doc/guix.texi ("invoking guix environment"): Add docs.
2015-10-30 21:02:51 -04:00
David Thompson 1c8a81b1af scripts: system: Add 'container' action.
* guix/scripts/system.scm (show-help): Display 'container' action.
  (system-derivation-for-action, guix-system): Add 'container' case.
  (perform-action): Skip GRUB config generation when building a container.
* doc/guix.texi (Invoking guix system): Document it.
2015-10-30 13:22:59 -04:00
David Thompson cc90fbbf39 scripts: environment: Allow mixing regular and ad-hoc packages.
This patch changes the --ad-hoc flag to be positional.  That is, the
packages that appear before --ad-hoc are interpreted as packages whose
inputs should be in the environment; the packages that appear after are
interpreted as packages to be directly added to the environment.

* guix/scripts/environment.scm (tag-package-arg, compact): New
  procedures.
  (%options): Tweak the handlers for --load and --expression options.
  (options/resolve-packages): Preserve package mode tag.
  (parse-args): Tweak argument handler to use package tagging procedure.
  (guix-environment): Apply ad-hoc behavior on a per package basis.
* tests/guix-environment.sh: Add test.
* doc/guix.texi ("invoking guix environment"): Document new behavior of
  --ad-hoc.
2015-10-29 16:24:12 -04:00
Alex Kost 7191adc5cf refresh: Support comma-separated updater types.
* guix/scripts/refresh.scm (%options): Handle comma-separated types for
  '--type' option.
  (guix-refresh): Adjust accordingly.
  (show-help): Likewise.
* doc/guix.texi (Invoking guix refresh): Document it.
2015-10-28 21:51:59 +03:00
Ludovic Courtès fd688c82bf ui: Add 'make-regexp*'.
Fixes <http://bugs.gnu.org/21773>.
Reported by Jan Synáček <jan.synacek@gmail.com>.

* guix/ui.scm (make-regexp*): New procedure.
* guix/scripts/package.scm (options->installable, guix-package): Use it
  when processing user-provided regexps.
2015-10-28 15:53:17 +01:00
Ludovic Courtès fb4bf72be3 store: Use the daemon's substitute URLs by default.
Partly fixes <http://bugs.gnu.org/20217>.

* guix/store.scm (set-build-options): Change #:substitute-urls to
  default to #f.  Send the 'substitute-urls' pair only if
  SUBSTITUTE-URLS is true.
* guix/scripts/build.scm (set-build-options-from-command-line): Do not
  default to %DEFAULT-SUBSTITUTE-URLS for #:substitute-urls.
* guix/scripts/size.scm (%default-options): Remove 'substitute-urls'.
2015-10-28 15:31:44 +01:00
David Thompson 34a1783fc1 scripts: build: Add --file option.
* guix/scripts/build.scm (show-help): Add help text for --file option.
  (%options): Add --file option.
  (options/resolve-packages): Handle 'file' options.
* tests/guix-build.sh: Add tests.
* doc/guix.texi ("invoking guix build"): Add doc.
2015-10-28 08:40:16 -04:00
Ludovic Courtès 55b2fc1877 substitute: Honor all the specified server URLs.
* guix/scripts/substitute.scm (lookup-narinfos/diverse): New procedure.
  (lookup-narinfo): Use it.
  (process-query): Change #:cache-url to #:cache-urls.
  [valid?]: Remove 'narinfo?' check, which is no longer necessary.
  Use 'lookup-narinfos/diverse' instead of 'lookup-narinfos'.
  (process-substitution): Change #:cache-url to #:cache-urls.
  (%cache-url): Rename to...
  (%cache-urls): ... this.  Turn into a list.
  (guix-substitute): Remove 'getaddrinfo' test with early exit.  Adjust
  calls to 'process-query' and 'process-substitution'.
* tests/substitute.scm: Change '%cache-url' to '%cache-urls'.
2015-10-28 12:04:03 +01:00
Ludovic Courtès a89dde1ed8 substitute: 'lookup-narinfos' returns exactly a list of narinfos.
* guix/scripts/substitute.scm (lookup-narinfos): Filter out #f values
  from CACHED, such that the end result is exactly a list of narinfos,
  not interspersed with #f.
* guix/scripts/challenge.scm (discrepancies): Assume REMOTE is a list of
  narinfos.
2015-10-28 12:04:03 +01:00
Ludovic Courtès f151298fa0 substitute: 'http-multiple-get' follows 'fold' style.
* guix/scripts/substitute.scm (http-multiple-get): Add 'seed'
  parameter.  Call PROC in 'fold' style.
  (fetch-narinfos)[handle-narinfo-response]: Adjust accordingly.
  Update 'http-multiple-get' call accordingly.
2015-10-28 12:04:03 +01:00
Alex Kost 6ffa706b6d refresh: Add '--list-updaters' option.
* guix/scripts/refresh.scm (list-updaters-and-exit): New procedure.
  (%options, show-help): Add '--list-updaters' option.
* doc/guix.texi (Invoking guix refresh): Document it.
2015-10-27 21:54:57 +03:00
Alex Kost 7e6b490d04 upstream: Add 'description' field to 'upstream-updater'.
Suggested by Ludovic Courtès <ludo@gnu.org>.

* guix/upstream.scm (<upstream-updater>): Use 'define-record-type*'.
  [description]: New field.
  (lookup-updater): Adjust accordingly.
* guix/gnu-maintenance.scm (%gnu-updater): Likewise.
* guix/import/cran.scm (%cran-updater): Likewise.
* guix/import/elpa.scm (%elpa-updater): Likewise.
* po/guix/POTFILES.in: Add guix/scripts/import/cran.scm and
  guix/gnu-maintenance.scm.
2015-10-27 21:54:57 +03:00
Ludovic Courtès 06d45f4566 profiles: Add generation manipulation procedures.
* guix/scripts/package.scm (delete-generations): Use
  'delete-generation*' instead of 'delete-generation'.
  (guix-package)[process-actions]: Use 'roll-back*' instead of
  'roll-back' and 'switch-to-generation*' instead of
  'switch-to-generation'.
  (link-to-empty-profile, switch-to-generation,
  switch-to-previous-generation, roll-back, delete-generation): Move
  to...
* guix/profiles.scm: ... here.  Adjust to not print messages and to
  return values that can be used by user interfaces.
* guix/ui.scm (display-generation-change, roll-back*,
  switch-to-generation*, delete-generation*): New procedures.
2015-10-27 00:01:20 +01:00
Ludovic Courtès 3bb168b099 utils: Add 'switch-symlinks', moved from (guix ui).
* guix/ui.scm (switch-symlinks): Move to...
* guix/utils.scm: ... here.  New procedure.
* guix/scripts/pull.scm: Use it.
2015-10-27 00:01:20 +01:00
Ludovic Courtès 65797bfffd guix system: Add the 'list-generations' command.
* guix/scripts/system.scm (display-system-generation, list-generations):
  New procedures.
  (process-action): Clarify docstring.
  (process-command): New procedure.
  (guix-system)[parse-sub-command]: Add 'list-generations'
  Call 'process-command' instead of 'process-action'.
* doc/guix.texi (Using the Configuration System): Mention generations,
  rollback, and 'list-generations'.
  (Invoking guix system): Document 'list-generations'.
2015-10-27 00:01:20 +01:00
Ludovic Courtès 5b516ef369 guix system: Factorize boot parameter parsing.
* guix/scripts/system.scm (<boot-parameters>): New record type.
  (read-boot-parameters): New procedure.
  (previous-grub-entries)[system->grub-entry]: Use it.
2015-10-27 00:01:20 +01:00
Ludovic Courtès ad18c7e64c ui: Add procedures to display a profile generation.
* guix/scripts/package.scm (guix-package)[process-query](list-generations):
  Move part of the body to 'delete-generation' and
  'display-profile-content'.
* guix/ui.scm (display-generation, display-profile-content): New
  procedures.
2015-10-27 00:01:20 +01:00
Ludovic Courtès d50cb56d9b utils: Add 'readlink*'.
* guix/scripts/package.scm (readlink*): Move to...
* guix/utils.scm (readlink*): ... here.  New procedure.
2015-10-27 00:01:20 +01:00
Ludovic Courtès deaab8e314 guix system: Extract action processing.
* guix/scripts/system.scm (process-action): New procedure.  Extracted
  from...
  (guix-system): ... here.  Use it.
2015-10-27 00:01:20 +01:00
Ludovic Courtès e49de93aa5 ui: Add 'matching-generations'.
* guix/scripts/package.scm (matching-generations): Move to...
* guix/ui.scm (matching-generations): ... here.
2015-10-27 00:01:20 +01:00
Paul van der Walt f862f38ade build-system/haskell: CONFIG_SHELL env variable.
For Cabal packages with "build-type: Configure", a configure shell
script is run to set up build parameters.  These scripts need the
CONFIG_SHELL environment variable to be set to function properly.

* guix/build/haskell-build-system.scm (configure): Set CONFIG_SHELL if
  necessary.
2015-10-26 10:15:14 +01:00
David Thompson f535dcbe19 scripts: environment: Add --container option.
* guix/scripts/system.scm (specification->file-system-mapping): Move from
  here...
* guix/ui.scm (specification->file-system-mapping): ... to here.
* guix/scripts/enviroment.scm (show-help): Show help for new options.
  (%options): Add --container --network, --expose, and --share options.
  (%network-configuration-files): New variable.
  (launch-environment, launch-environment/container, requisites*,
  inputs->requisites): New procedures.
  (guix-environment): Spawn new process in a container when requested.
* doc/guix.texi (Invoking guix environment): Document it.
* tests/guix-environment-container.sh: New file.
* Makefile.am (SH_TESTS): Add it.
2015-10-25 20:27:19 -04:00
Paul van der Walt 8e01e30077 import: hackage: Fix grammar.
Minor clarification regarding the test-dependencies command line option.

* guix/scripts/import/hackage.scm (show-help): Minor grammatical fix.
2015-10-23 09:10:52 +02:00
Paul van der Walt 759756a992 import: hackage: Update GHC libraries for 7.10.2.
Update ghc-standard-libraries to match the output of `ghc-pkg list` when
using GHC 7.10.2.

* guix/import/hackage.scm (ghc-standard-libraries): Sort and update list
  of core GHC libraries.
2015-10-23 09:10:52 +02:00
Ludovic Courtès 102eac2a0a import: cran: Add copyright notice.
Add notice for commit d882c23.
2015-10-21 14:51:30 +02:00
Ludovic Courtès 053cfdb3d6 import: cran: Avoid HTTP redirect.
* guix/import/cran.scm (cran-fetch): Add trailing slash in URL to avoid
  HTTP redirect.
2015-10-21 14:44:41 +02:00
Ludovic Courtès d882c235d9 import: cran: Add updater.
* guix/import/cran.scm (downloads->url, nodes->text): New procedures.
  (cran-sxml->sexp): Use them.  Remove equivalent local code.
  (latest-release, cran-package?): New procedures.
  (%cran-updater): New variable.
* guix/scripts/refresh.scm (%updaters): Add %CRAN-UPDATER.
* doc/guix.texi (Invoking guix refresh): Mention CRAN.
2015-10-21 14:44:41 +02:00
Ludovic Courtès 577e750580 refresh: Remove exception catch-all.
* guix/scripts/refresh.scm (update-package): Remove 'catch #t'.
2015-10-21 14:44:41 +02:00
Ludovic Courtès bcb571cba4 refresh: Add '--type' option.
* guix/scripts/refresh.scm (%options, show-help): Add --type.
  (lookup-updater): New procedure.
  (update-package): Add 'updaters' parameter and honor it.
  (guix-refresh)[options->updaters]: New procedure.
  Use it, and honor --type.
2015-10-21 14:44:41 +02:00
Ludovic Courtès a7aac93625 import: elpa: Add updater.
* guix/import/elpa.scm (latest-release, package-from-gnu.org?): New
  procedures.
  (%elpa-updater): New variable.
* guix/scripts/refresh.scm (%updaters): Add %ELPA-UPDATER.
2015-10-21 14:44:38 +02:00
Ludovic Courtès 218622a737 import: elpa: Use 'http-fetch/cached' to retrieve the archive.
* guix/import/elpa.scm (elpa-fetch-archive): Set %HTTP-CACHE-TTL to 6
  hours.
  (call-with-downloaded-file): Use 'http-fetch/cached' instead of
  'url-fetch'.
2015-10-21 14:43:34 +02:00
Ludovic Courtès 0a7c5a09fe gnu-maintenance: Generalize, leading to (guix upstream).
* guix/gnu-maintenance.scm (<gnu-release>): Remove.
  (coalesce-releases): Move to upstream.scm.  Rename to
  'coalesce-sources'; adjust callers.
  (releases, latest-release): Return <upstream-source> objects instead
  of <gnu-release> objects.
  (latest-release*, non-emacs-gnu-package?): New procedures.
  (gnu-release-archive-types): Remove.
  (%gnu-updater): New variable.
  (package-update-path, download-tarball, package-update,
  update-package-source): Move to...
* guix/upstream.scm: ... here.  New file.
* Makefile.am (MODULES): Add it.
* po/guix/POTFILES.in: Replace gnu-maintenance.scm with upstream.scm.
* guix/scripts/refresh.scm (%updaters): New variable.
  (update-package): Adjust to new 'package-update' interface.
  (guix-refresh): Adjust to new 'package-update-path'.  Remove
  'false-if-exception' around it.
2015-10-21 14:43:34 +02:00
Ludovic Courtès cbaf0f11dd http-client: '%http-cache-ttl' is really a parameter.
Fixes a typo in commit 739ab68 that made it a procedure returning a
parameter.

* guix/http-client.scm (%http-cache-ttl): Turn into a parameter.
2015-10-21 14:43:34 +02:00
Ludovic Courtès d23c20f1d0 Add 'guix challenge'.
* guix/scripts/challenge.scm, tests/challenge.scm: New files.
* Makefile.am (MODULES): Add the former.
  (SCM_TESTS): Add the latter.
* doc.am (SUBCOMMANDS): Add 'challenge'.
* doc/guix.texi (Substitutes): Add xref to 'guix challenge'.
  (Invoking guix challenge): New node.
* doc/contributing.texi (Submitting Patches): Add note about using 'guix
  challenge'.
* po/guix/POTFILES.in: Add guix/scripts/challenge.scm.
2015-10-20 00:57:36 +02:00
Ludovic Courtès ea0c6e0507 substitute: Expose narinfo access.
* guix/scripts/substitute.scm: Export <narinfo> accessors.
  (narinfo-hash->sha256): New procedure.
  (cache-narinfo!): Ignore EACCES exceptions.
2015-10-19 23:12:34 +02:00
Ludovic Courtès c6f8e9dd64 guix archive: Add '--extract'.
* guix/scripts/archive.scm (show-help, %options): Add --extract.
  (guix-archive): Honor it.
* tests/guix-archive.sh: Test it.
* doc/guix.texi (Invoking guix archive): Document it.
2015-10-19 10:10:47 +02:00
Ludovic Courtès 2134228a7d gnu-maintenance: Fix file descriptor leak.
* guix/gnu-maintenance.scm (official-gnu-packages): Close the port
  returned by FETCH.
2015-10-17 14:42:07 +02:00
Ludovic Courtès 9aec35d265 gnu-maintenance: Use 'http-fetch/cached' by default.
This speeds up operations like 'guix lint -c gnu-description'.

* guix/gnu-maintenance.scm (official-gnu-packages): Add 'fetch'
  parameter and honor it.  Default to 'http-fetch/cached'.
2015-10-17 14:42:07 +02:00
Ludovic Courtès 739ab68bac http-client: Add 'http-fetch/cached'.
* guix/utils.scm (cache-directory): New procedure.
* guix/http-client.scm (%http-cache-ttl): New variable.
  (http-fetch/cached): New procedure.
2015-10-17 14:42:01 +02:00
Ludovic Courtès 0e3cc3116d syscalls: Fix ABI mismatch for 'clone'.
Fixes <http://bugs.gnu.org/21694>.

* guix/build/syscalls.scm (clone): Change 'syscall' parameter types to
  LONG, UNSIGNED-LONG, or '*; make sure it has 6 parameters.  Adjust
  caller accordingly.
2015-10-17 11:53:25 +02:00
Ludovic Courtès 6f305ea5fd guix system: Add 'dmd-graph' command.
* guix/scripts/system.scm (dmd-service-node-label,
  dmd-service-node-type, export-dmd-graph): New procedures.
  (show-help): Add 'dmd-graph'.
  (guix-system)[parse-sub-command]: Likewise.
  Honor it.
* doc/guix.texi (Invoking guix system): Document it.
  (dmd Services): Add an illustration and explanation.
* doc/images/dmd-graph.dot: New file.
* doc.am (DOT_FILES): Add it.
2015-10-14 21:39:06 +02:00
Ludovic Courtès d6c3267a32 guix system: Add 'extension-graph' command.
* guix/scripts/system.scm (service-node-label, service-node-type,
  export-extension-graph): New procedures.
  (guix-system)[parse-sub-command]: Add 'extension-graph'.
  Honor it.
  (show-help): Add 'extension-graph'.
* doc/guix.texi (Invoking guix system): Document it.
  (Service Composition): Add cross-reference.
2015-10-14 21:39:05 +02:00
Ludovic Courtès a64cd7b65f graph: 'export-graph' takes a #:reverse-edges? parameter.
* guix/scripts/graph.scm (export-graph): Add #:reverse-edges? parameter
  and honor it.
2015-10-14 21:39:05 +02:00
Ludovic Courtès 87cd0dba2f build-system/gnu: dist-package: Use 'autoconf-wrapper'.
* guix/build-system/gnu.scm (dist-package): Use AUTOCONF-WRAPPER instead
  of AUTOCONF.
2015-10-14 21:39:05 +02:00
Ludovic Courtès b3e2a5af9f build-system/python: Memoize the results of 'package-with-python2'.
Fixes <http://bugs.gnu.org/21675>.
Reported by Cyril Roelandt <tipecaml@gmail.com>.

Before this change, the command:

  guix build python2-oslo.utils -n --no-substitutes

would take 17.5s.  After, it is down to 2.9s.
Likewise, the command:

  guix graph python2-bandit | grep python2-setuptools.*Helve| wc -l

would return 412 nodes before, all functionally equivalent, and returns
a single one now.

* guix/build-system/python.scm (package-with-explicit-python): Remove
  'p' parameter.  Change to return a one-argument memoizing procedure.
  (package-with-python2): Adjust accordingly.
2015-10-13 00:06:11 +02:00
Ludovic Courtès adc90e0eac Merge branch 'core-updates' 2015-10-12 21:42:06 +02:00
Alex Kost ad8b83bda0 emacs: Add 'guix-devel-build-package-source'.
Suggested by Ludovic Courtès <ludo@gnu.org>.

* guix/scripts.scm (build-package-source): New procedure.
* emacs/guix-devel.el (guix-devel-build-package-source): New command.
  (guix-devel-keys-map): Add key binding for it.
* doc/emacs.texi (Emacs Development): Document it.
2015-10-12 10:59:31 +03:00
Ludovic Courtès f3f427c2e9 guix system: Add '--derivation'.
* guix/scripts/system.scm (perform-action): Add #:derivations-only?
  parameter and honor it.
  (show-help, %options): Add '--derivation'.
  (guix-system): Pass #:derivations-only? to 'perform-action'.
* tests/guix-system.sh: Test it.
* doc/guix.texi (Invoking guix system): Document it.
2015-10-10 22:46:15 +02:00
Ludovic Courtès e1c153e0ab gexp: Add 'scheme-file'.
* guix/gexp.scm (<scheme-file>): New record type.
  (scheme-file, scheme-file-compiler): New procedures.
* tests/gexp.scm ("scheme-file"): New test.
* doc/guix.texi (G-Expressions): Document 'scheme-file'.
2015-10-10 22:46:15 +02:00
Ludovic Courtès b751cde36b gexp: Add 'mixed-text-file'.
* guix/gexp.scm (mixed-text-file): New procedure.
* tests/gexp.scm ("mixed-text-file"): New test.
* doc/guix.texi (G-Expressions): Document it.
2015-10-10 22:46:14 +02:00
Ludovic Courtès 15a01c7220 gexp: Add 'program-file'.
* guix/gexp.scm (<program-file>): New record type.
  (program-file, program-file-compiler): New procedures.
* tests/gexp.scm ("program-file"): New test.
* doc/guix.texi (G-Expressions): Document it.
2015-10-10 22:46:14 +02:00
Ludovic Courtès 919370291f gexp: Add 'computed-file'.
* guix/gexp.scm (<computed-file>): New record type.
  (computed-file, computed-file-compiler): New procedures.
* tests/gexp.scm ("lower-object, computed-file"): New test.
* doc/guix.texi (G-Expressions): Document 'computed-file'.
2015-10-10 22:46:14 +02:00
David Thompson 1de2fe95e0 scripts: environment: Use system* instead of system.
This allows for direct program invokation without needing a shell to act
as a command interpreter.

* guix/scripts/environment.scm (%default-shell): New variable.
  (show-help): Adjust description.  Remove '--exec' reference.
  (%default-options): Use '%default-shell'.
  (%options): Adjust '--exec' to run command via the default shell.
  (parse-args): New procedure.
  (guix-environment): Use 'parse-args'.  Use 'system*' instead of
  'system'.
* tests/guix-environment.sh: Add test for '--' command invokation.
* doc/guix.texi ("Invoking guix environment"): Use new syntax.  Remove
  '--exec' documentation.
2015-10-09 12:17:01 -04:00
David Thompson bbd00d2012 utils: Add split procedure.
* guix/utils.scm (split): New procedure.
* tests/utils.scm: Add tests.
2015-10-09 12:17:01 -04:00
Alex Kost e04741f160 lint: Export 'run-checkers'.
* guix/scripts/lint.scm (run-checkers): Export.  Make 'checkers'
  argument optional.
2015-10-09 16:17:45 +03:00
Mark H Weaver 319fe79dd0 Merge branch 'master' into core-updates 2015-10-07 23:55:17 -04:00
Ludovic Courtès cf4e7083ed publish: Fix file descriptor leak.
A client closing the connection while reading from a /nar URL would
leave an open file descriptor in the server.  This patch fixes it.

* guix/scripts/publish.scm (swallow-EPIPE): New macro.
  (http-write): Use it around 'write-file' call.
2015-10-06 23:51:04 +02:00
Ludovic Courtès 72c62716be import: snix: Adjust names of license attributes.
* guix/import/snix.scm (license-variable): Adjust names to current
  Nixpkgs.
2015-10-06 23:51:04 +02:00
Ludovic Courtès f073e52382 utils: Remove Nixpkgs helpers.
* guix/config.scm.in (%nixpkgs): Remove.
* guix/utils.scm (%nixpkgs-directory, nixpkgs-derivation,
  nixpkgs-derivation*): Remove.
* test-env.in: Export 'NIXPKGS'.
* tests/derivations.scm (%coreutils): Remove use of
  'nixpkgs-derivation'.
* tests/snix.scm (%nixpkgs-directory): New variable.
  Adjust users accordingly.
2015-10-06 23:51:04 +02:00
Ludovic Courtès e3302fec18 import: pypi: Remove unused procedure.
* guix/import/pypi.scm (join): Remove.
2015-10-05 23:10:14 +02:00
Ludovic Courtès 85b81cf8c1 packages: Use locales from the /X.Y sub-directory of the locale package.
This is a followup to commit f2d7bbb.

* guix/packages.scm (patch-and-repack)[build]: Append "/X.Y" to
  LOCPATH.
2015-10-04 10:19:42 +02:00
Ludovic Courtès afd3d9316c Use "normalized codesets" everywhere.
In other words, change "xx_YY.UTF-8" to "xx_YY.utf8".

* guix/profiles.scm (ca-certificate-bundle): Use "en_US.utf8" instead of
  "en_US.UTF-8".
* guix/packages.scm (patch-and-repack): Likewise.
* guix/build/gnu-build-system.scm (install-locale): Likewise.
* guix/build-system/gnu.scm (gnu-build, gnu-cross-build): Likewise.
* gnu/packages/python.scm (python-ipython): Likewise.
* gnu/packages/gawk.scm (gawk): Likewise.
* build-aux/hydra/demo-os.scm: Likewise.
* gnu/packages/guile.scm (guile-ncurses)[arguments]: Remove
  'change-locale' phase.
2015-10-04 00:10:03 +02:00
Ludovic Courtès f2d7bbb537 gnu: glibc: Look for locale data in versioned sub-directories.
* gnu/packages/base.scm (glibc)[native-search-paths]: Add
  'lib/locale/VERSION' for 'GUIX_LOCPATH'.
  (glibc-locales, glibc-utf8-locales): Write to a VERSION
  sub-directory.
* guix/profiles.scm (ca-certificate-bundle): Adjust LOCPATH value
  accordingly.
2015-10-03 20:17:09 +02:00
Ludovic Courtès 57aff6476e utils: Add 'every*'.
* guix/build/gnu-build-system.scm (every*): Move to...
* guix/build/utils.scm (every*): ... here.  New procedure.
2015-10-03 14:36:12 +02:00
Ludovic Courtès fde1783087 download: Check whether HORIZONTAL ELLIPSIS can be encoded.
* guix/build/download.scm (ellipsis): New procedure.
  (store-path-abbreviation): Use it.
2015-10-01 11:28:58 +02:00
Ludovic Courtès 30d9aa5422 guix gc: Add '--list-failures' and '--clear-failures'.
Suggested by Mark H Weaver <mhw@netris.org>.

* guix/scripts/gc.scm (show-help, %options): Add --list-failures and
  --clear-failures.
  (guix-gc): Honor them.
* doc/guix.texi (Invoking guix gc): Document them.
  (Invoking guix-daemon): Mention them.
2015-09-28 22:54:04 +02:00
Ludovic Courtès 16748d8015 store: Add 'query-failed-paths' and 'clear-failed-paths' RPCs.
Suggested by Mark H Weaver <mhw@netris.org>.

* guix/store.scm (query-failed-paths, clear-failed-paths): New
  procedures.
* tests/guix-daemon.sh: Add test with daemon started with
  --cache-failures.
2015-09-28 22:54:04 +02:00
Ludovic Courtès df0a3b7f9e tests: 'open-connection-for-tests' takes an optional parameter.
* guix/tests.scm (open-connection-for-tests): Add optional FILE
  parameter; pass it to 'open-connection'.
2015-09-28 22:53:59 +02:00
Mathieu Lirzin cd8b7cfb3f lint: Fix 'check-texinfo-markup'.
Fixes a regression introduced in 5d8d8f3.

* guix/scripts/lint.scm (check-description-style): When no exception is
  thrown in 'check-texinfo-markup', return the rendered description.
2015-09-28 00:23:12 +02:00
Ludovic Courtès e1556533d3 Merge branch 'core-updates' 2015-09-26 15:14:53 +02:00
Mathieu Lirzin 5d8d8f3b0a lint: Improve 'check-texinfo-markup'.
* guix/scripts/lint.scm (check-description-style): Set 'field' parameter
  when emitting a warning in 'check-texinfo-markup'.  Catch any error
  that may occur in during the 'texi->plain-text' conversion.  This is a
  followup to commit 2748ee3.
2015-09-26 15:10:13 +02:00
Ludovic Courtès 15d5ca1356 http-client: Backport Guile fix for 'read-chunk-header'.
Fixes the wrong-type-arg exception initially reported
at <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=19976#5>
by Ricardo Wurmus <rekado@elephly.net>.

* guix/http-client.scm (read-chunk-header): Backport Guile commit 53b8d5f.
2015-09-26 11:13:50 +02:00
Ludovic Courtès 5ef9d7deea offload: Use gzip instead of xz for compression on the master.
* guix/scripts/offload.scm (send-files): Use gzip --fast instead of xz.
2015-09-25 22:35:35 +02:00
Ludovic Courtès 62d2b57157 utils: Add #:options parameter for compression output ports.
* guix/utils.scm (compressed-output-port,
  call-with-compressed-output-port): Add #:options parameter and honor
  it.
2015-09-25 22:35:35 +02:00
Mathieu Lirzin 23464bfd99 lint: Accept '`' character.
* guix/scripts/lint.scm (properly-starts-sentence?): Match Texinfo
  highlighting commands as a sentence start.
2015-09-24 22:55:59 +02:00
Mathieu Lirzin 2748ee3bcf lint: Check non-translated package descriptions.
* guix/ui.scm (texi->plain-text): Export.
* guix/scripts/lint.scm (check-description-style): Use it instead of
  'package-description-string'.
2015-09-24 22:46:20 +02:00
Ludovic Courtès 1007b6bf0b Merge branch 'master' into core-updates 2015-09-24 22:18:07 +02:00
Ludovic Courtès a7a4fd9a7c profiles: Make profile-specific derivations non-substitutable.
This avoids gratuitous queries of the substituter.

* guix/profiles.scm (ghc-package-cache-file): Pass #:substitutable? #f
  to 'gexp->derivation'.
  (ca-certificate-bundle): Likewise.
  (gtk-icon-themes): Likewise.
  (profile-derivation): Likewise.
  (info-dir-file): Likewise, plus #:local-build? #t.
2015-09-24 22:16:10 +02:00
Ludovic Courtès 08d7e3592f ui: Gracefully handle Unicode description strings.
Fixes <http://bugs.gnu.org/21536>.
Reported by Alex Kost <alezost@gmail.com>.

* guix/ui.scm (texi->plain-text): Wrap body in 'with-fluids'.
* tests/ui.scm ("package-description-string vs. Unicode"): New test.
2015-09-24 22:04:51 +02:00
Ludovic Courtès 75726135ce download: Don't abbreviate things that are not store items.
Fixes a regression introduced in a8be7b9a.

* guix/build/download.scm (store-path-abbreviation): Return STORE-PATH
  if it's not an actual store path.  Fixes an out-of-range exception
  when running tests/substitute.scm and tests/store.scm.
2015-09-24 21:54:37 +02:00
Steve Sprang 9462882889 download: Fix some minor progress-logging regressions.
* guix/build/download.scm
  (string-pad-middle): Allow resulting padded string to overflow.
  (store-url-abbreviation): Remove unnecessary procedure.
  (progress-proc): Use BASENAME as default for parameter 'abbreviation'.
  (url-fetch): Display extra newlines for readability.
2015-09-23 22:04:46 -04:00
Mark H Weaver a05c06720a emacs-build-system: Fix 'package-name-version->elpa-name-version'.
Fixes a regression introduced in b7c7c03eb5.

* guix/build/emacs-build-system.scm (package-name-version->elpa-name-version):
  Remove unused 'name' binding.  Do not abuse 'strip-store-file-name' to
  remove the "emacs-" prefix, which worked before b7c7c03eb5 but not after.
2015-09-23 17:38:47 -04:00
Mark H Weaver bd90127ad4 Merge branch 'master' into core-updates 2015-09-22 16:38:48 -04:00
Alex Kost 430505eba3 scripts: Add 'build-package'.
* guix/scripts/system.scm (maybe-build): Move to ...
* guix/scripts.scm: ...here.
  (build-package): New procedure.

Co-authored-by: Ludovic Courtès <ludo@gnu.org>
2015-09-22 22:05:10 +03:00
Ricardo Wurmus 4a4dac2083 licenses: Add Zope Public License.
* guix/licenses.scm (zpl2.1): New variable.
2015-09-22 14:57:00 +02:00
Ricardo Wurmus c009bb5a40 Update CRAN mirrors.
* guix/download.scm (%mirrors): Update mirror list for CRAN.
2015-09-21 10:48:26 +02:00
Ricardo Wurmus a52b625152 import: cran-sxml->sexp: Use cran-uri in package expression.
* guix/import/cran.scm (cran-sxml->sexp): Use the cran-uri procedure in
  the generated package expression.
2015-09-21 10:48:26 +02:00
Ricardo Wurmus 5546114e73 build: Add cran-uri procedure.
* guix/build-system/r.scm (cran-uri): New procedure.
2015-09-21 10:48:26 +02:00
Ludovic Courtès e0566f12f8 lint: Report lonely parentheses.
* guix/scripts/lint.scm (%hanging-paren-rx): New variable.
  (report-lone-parentheses): New procedure.
  (%formatting-reporters): Use it.
* tests/lint.scm ("formatting: lonely parentheses"): New test.
2015-09-18 21:54:04 +02:00
Alex Kost 4f740b677a store: Add 'set-build-options*'.
Suggested by: Ludovic Courtès <ludo@gnu.org>.

* guix/store.scm (set-build-options*): New procedure.
2015-09-18 21:42:07 +03:00
Alex Kost fa394eb99c ui: Add 'show-derivation-outputs'.
* guix/scripts/build.scm (guix-build): Extract code from here and move to...
* guix/ui.scm (show-derivation-outputs): ... here.  New procedure.
2015-09-18 21:42:06 +03:00
Alex Kost 88981dd3e2 Add (guix scripts).
* guix/ui.scm: Add missing copyright lines.
  (args-fold*, environment-build-options, %default-argument-handler,
  parse-command-line): Move to ...
* guix/scripts.scm: ...here.  New file.
* guix/scripts/archive.scm: Use it.
* guix/scripts/build.scm: Likewise.
* guix/scripts/download.scm: Likewise.
* guix/scripts/edit.scm: Likewise.
* guix/scripts/environment.scm: Likewise.
* guix/scripts/gc.scm: Likewise.
* guix/scripts/graph.scm: Likewise.
* guix/scripts/hash.scm: Likewise.
* guix/scripts/import/cpan.scm: Likewise.
* guix/scripts/import/cran.scm: Likewise.
* guix/scripts/import/elpa.scm: Likewise.
* guix/scripts/import/gem.scm: Likewise.
* guix/scripts/import/gnu.scm: Likewise.
* guix/scripts/import/hackage.scm: Likewise.
* guix/scripts/import/nix.scm: Likewise.
* guix/scripts/import/pypi.scm: Likewise.
* guix/scripts/lint.scm: Likewise.
* guix/scripts/package.scm: Likewise.
* guix/scripts/publish.scm: Likewise.
* guix/scripts/pull.scm: Likewise.
* guix/scripts/refresh.scm: Likewise.
* guix/scripts/size.scm: Likewise.
* guix/scripts/system.scm: Likewise.
* tests/ui.scm (with-environment-variable, "parse-command-line",
  "parse-command-line and --no options"): Move to ...
* tests/scripts.scm: ...here.  New file.
* Makefile.am (MODULES): Add guix/scripts.scm.
  (SCM_TESTS): Add tests/scripts.scm.
* po/guix/POTFILES.in: Add guix/scripts.scm.
2015-09-18 21:42:06 +03:00
Steve Sprang 47770296d2 download: Only show hours in the elapsed time if necessary.
* guix/build/download.scm
  (seconds->string): Conditionally include hours in timestamp.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2015-09-17 14:40:46 +02:00
Steve Sprang a8be7b9a7a substitute: Improve readability of download progress report.
* guix/build/download.scm
  (string-pad-middle, store-url-abbreviation, store-path-abbreviation):
  New procedures.
  (progress-proc): Add #:abbreviation parameter and use it.  Generate a
  better indeterminate progress string.
* guix/scripts/substitute.scm (assert-valid-narinfo): Add newlines to output.
  (process-substitution): Use byte-count->string and store-path-abbreviation.

Co-authored-by: Ludovic Courtès <ludo@gnu.org>
2015-09-16 23:50:12 +02:00
Mathieu Lirzin 3500e659f1 lint: Add 'check-texinfo-markup' checker.
* guix/script/lint.scm (check-description-style): Check for invalid
  Texinfo markup.
* tests/lint.scm: Test it.
2015-09-15 19:01:23 +02:00
Eric Bavier 50f5c46d06 guix: lint: Check for meaningful origin file names.
* guix/scripts/lint.scm (check-source-file-name): New procedure.
  (%checkers): Add 'source-file-name' checker.
* tests/lint.scm ("source-file-name", "source-file-name: v prefix")
  ("source-file-name: valid", "source-file-name: bad checkout")
  ("source-file-name: good checkout"): New tests.
* doc/guix.texi (Invoking guix lint): Mention file name check.
2015-09-14 18:03:33 -05:00
Eric Bavier 3b4d01035f guix: packages: Add origin-actual-file-name.
* guix/scripts/graph.scm (uri->file-name, node-full-name): Move origin file
  name logic to...
* guix/packages.scm (origin-actual-file-name): ...here.
* tests/packages.scm ("origin-actual-file-name")
  ("origin-actual-file-name, file-name"): New tests.
2015-09-14 18:02:37 -05:00
Steve Sprang eb95ace9f1 download: Avoid type errors when formatting download progress output.
* guix/build/download.scm (nearest-exact-integer): New procedure.
  (seconds->string, byte-count->string): Use it.
2015-09-14 23:36:26 -04:00
Ludovic Courtès d89e0990f5 guix system: Gracefully handle incomplete commands.
Fixes <http://bugs.gnu.org/21451>.
Reported by Steve Sprang <steve.sprang@gmail.com>.

* guix/scripts/system.scm (guix-system)[option-arguments]: Error out
  when ACTION is #f.
2015-09-15 00:04:27 +02:00
David Thompson 5dc876231b build: ruby: Add support for tarball and directory sources.
Previously, the Ruby build system only knew how to work with gem archives,
which made it difficult to build unreleased gems from a Git repository or
released gems in tarball form.

* gnu/build/ruby-build-system.scm (gnu:unpack, gem-archive?): New procedures.
  (unpack): Use GNU build system unpack phase for non-gem sources.
  (build): Rebuild the gemspec iff the source is a gem archive.
* guix.texi ("ruby-build-system"): Mention that tarballs and directories are
  acceptable.
2015-09-14 08:29:07 -04:00
Ludovic Courtès 75710da667 Merge branch 'master' into core-updates 2015-09-13 21:28:01 +02:00
宋文武 f47fbeb23a build-system/glib-or-gtk: Don't generate 'icon-theme.cache'.
* guix/build-system/glib-or-gtk.scm (default-gtk+): Remove.
  (lower): Adjust accordingly.
* guix/build/glib-or-gtk-build-system.scm (generate-icon-cache): Remove.
  (%standard-phases): Remove 'glib-or-gtk-icon-cache' phase.
2015-09-11 20:24:30 +08:00
Ludovic Courtès 3f208ad758 guix build: '--log-file' can return URLs.
* guix/scripts/build.scm (%default-log-urls): New variable.
  (log-url): New procedure.
  (guix-build): Use it.
* doc/guix.texi (Invoking guix build): Document it.
2015-09-10 23:14:16 +02:00
Ludovic Courtès 6b02a448d2 http-client: Backport delimited input port fix from Guile.
* guix/http-client.scm (make-delimited-input-port): Backport Guile
  commit 5a10e41.
  Monkey-patch 'make-delimited-input-port' for any Guile <= 2.0.11.
2015-09-10 23:14:16 +02:00
Ludovic Courtès 1c01a30d66 http-client: Remove redundant import clause.
* guix/http-client.scm: Remove redundant #:use-module (guix utils).
2015-09-10 23:14:16 +02:00
Eric Bavier a6d0b306c2 guix: packages: Add transitive-input-references.
* guix/packages.scm (transitive-input-references): New procedure.
* gnu/packages/version-control.scm (package-transitive-propagated-labels*)
  (package-propagated-input-refs): Delete.
  (git)[arguments]: Adjust to transitive-input-references.
2015-09-10 03:21:55 -05:00
Ludovic Courtès ef30b974c9 pull: Update to the new cgit snapshot URL.
* guix/scripts/pull.scm (%snapshot-url): Update to the new URL.
2015-09-10 08:49:36 +02:00
Steve Sprang 0c0a1f22ce build: Improve information density and appearance of download progress output.
* guix/build/download.scm (seconds->string): New function.
  (byte-count->string): New function.
  (progress-bar): New function.
  (throughput->string): Remove function.
  (progress-proc): Display base file name, elapsed time, and progress bar.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2015-09-08 21:47:30 +02:00
Mathieu Lirzin 1cd4027cfd ui: Add package-description-string.
Provide support for Texinfo's markup in package description.

* guix/ui.scm (%text-width): New parameter.
  (texi->plain-text): New variable.
  (package->recutils): Use them.
  (package-description-string): New variable.
* emacs/guix-main.scm (%package-param-alist): Use it.
* gnu/packages/perl.scm (perl-devel-globaldestruction)
  (perl-devel-lexalias, perl-exporter-lite): Adapt to Texinfo's markup.
* gnu/packages/python.scm (python2-empy): Likewise.
2015-09-08 07:44:53 +02:00
David Thompson ee78d02452 build: container: Use the same clone flags as fork(3).
The intent is to make 'clone' behave a lot more like 'primitive-fork', which
calls clone(2) with SIGCHLD, CLONE_CHILD_CLEARTID, and CLONE_CHILD_SETTID
flags.  Notably, running 'clone' at the REPL without these flags would break
the REPL beyond repair.

* guix/build/syscalls.scm (CLONE_CHILD_CLEARTID, CLONE_CHILD_SETTID): New
  variables.
* gnu/build/linux-container.scm (namespaces->bit-mask): Add
  CLONE_CHILD_CLEARTID and CLONE_CHILD_SETTID to bit mask.
2015-09-07 13:09:58 -04:00
David Thompson b500e7182d build: ruby: Avoid long build directory names.
Having the hash of the source gem in the source directory file name proved to
be problematic when running the test suite for the 'pg' gem that creates
UNIX-domain sockets in the source directory and exceeded the 108 character
limit on GNU/Linux systems.

* guix/build/ruby-build-system.scm (unpack): Rename unpacked gem directory to
  "gem".
2015-09-07 08:27:10 -04:00
Mark H Weaver 140b4bc6cd packages: Build tarballs in sorted order even if tar doesn't support it.
This is a followup to commit 92226a470d.

* guix/packages.scm (patch-and-repack)[build]: Determine if tar supports the
  "--sort=name" option using a run-time test.  If not supported, generate the
  sorted file list with 'find-files' and pass it to tar using "--files-from".
2015-09-06 17:25:51 -04:00
Mark H Weaver f4ae827e26 utils: find-files: Add DIRECTORIES? and FAIL-ON-ERROR? arguments.
* guix/build/utils.scm (find-files): Add DIRECTORIES? and FAIL-ON-ERROR?
  keyword arguments.
2015-09-06 17:25:50 -04:00
Ludovic Courtès a5c0d8bc55 ui: Change 'P_' to return the empty string when passed the empty string.
Reported by Mathieu Lirzin <mathieu.lirzin@etu.u-bordeaux.fr>
at <https://lists.gnu.org/archive/html/guix-devel/2015-09/msg00111.html>.

* guix/ui.scm (P_): Check whether MSGID is empty, and return it if it is.
2015-09-06 15:52:04 +02:00
Ludovic Courtès 12abc6e395 licenses: Add CC-BY-SA and CC-BY.
* guix/licenses.scm (cc-by-sa4.0, cc-by3.0): New variables.
2015-09-06 12:36:15 +02:00
Ludovic Courtès 52b9efe337 lint: Add 'license' checker.
* guix/scripts/lint.scm (check-license): New procedure.
  (%checkers): Add 'license' checker.
* tests/lint.scm ("license: invalid license"): New test.
2015-09-06 12:36:15 +02:00
Alex Kost 6480fcae24 emacs-build-system: Fix a file name of info directory.
* guix/build/emacs-build-system.scm (move-doc): Adjust to use
  "/share/info" instead of its sub-directory.
2015-09-06 12:15:51 +03:00
Ludovic Courtès 6b44a09747 download: Disable offloading for downloads.
* guix/download.scm (url-fetch): Use #:local-build? #t.
* guix/git-download.scm (git-fetch): Likewise.
2015-09-05 22:11:03 +02:00
David Thompson cf897cbacc build: syscalls: Properly handle clone errors.
* guix/build/syscalls.scm (clone): Catch -1 return value and throw error.
2015-09-05 13:42:02 -04:00