Commit Graph

1817 Commits (0eef7551303e3fc855809d84eed8421d2a075cfa)

Author SHA1 Message Date
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