Commit Graph

693 Commits (8fade76f5d35fac321a5a2c4c6e142f03a69fcfa)

Author SHA1 Message Date
Ludovic Courtès 56b943de6e utils: Add 'string-replace-substring'.
* guix/utils.scm (string-replace-substring): New procedure.  Based on
  code by Mark H. Weaver.
* tests/utils.scm ("string-replace-substring"): New test.
2013-11-13 00:29:05 +01:00
Ludovic Courtès bf4211523b guix build: Add '--log-file'.
* guix/scripts/build.scm (show-help): Add '--log-file'.
  (%options): Likewise.
  (guix-build): Set %FILE-PORT-NAME-CANONICALIZATION.  Honor '--log-file'.
* tests/guix-build.sh: Add '--log-file' tests.
* doc/guix.texi (Invoking guix build): Document '--log-file'.
2013-11-12 01:06:45 +01:00
Ludovic Courtès eddd4077a5 store: Add 'log-file' procedure.
* guix/store.scm (log-file): New procedure.
* tests/store.scm ("log-file, derivation", "log-file, output file
  name"): New tests.
2013-11-12 01:06:45 +01:00
Ludovic Courtès 50dc48922c substitute-binary: Increase lookup concurrency to reduce latency.
* guix/scripts/substitute-binary.scm (%lookup-threads): New variable.
  (guix-substitute-binary): Use 'n-par-map' instead of 'par-map' for
  batch 'lookup-narinfo' calls.
2013-11-08 22:47:02 +01:00
Ludovic Courtès 7db9608d52 Merge branch 'master' into core-updates
Conflicts:
	guix/packages.scm
2013-11-08 21:58:09 +01:00
Ludovic Courtès f9cc897105 packages: Add a 'snippet' field to <origin>.
* guix/packages.scm (<origin>): Add 'snippet', 'modules', and
  'imported-modules' fields.
  (patch-and-repack): Make 'inputs' a keyword parameter.  Add 'snippet',
  'modules', and 'imported-modules' parameters.  Accept SOURCE as a raw
  file name.  Insert SNIPPET in BUILDER.  Pass IMPORTED-MODULES to
  'build-expression->derivation'.
  (package-source-derivation): Pass the extra arguments to
  'patch-and-repack'.
* tests/packages.scm ("package-source-derivation, snippet"): New test.
* doc/guix.texi (Defining Packages): Mention the 'patches' and 'snippet'
  fields.
  (Invoking guix build): Tell that --source has patches and snippets
  applied.
  (Software Freedom): Mention packages that contain non-free code.
2013-11-07 22:57:30 +01:00
Ludovic Courtès 64a967cc9c ui: Make '--version' output GCS-compliant.
* guix/ui.scm (show-version-and-exit): Display copyright year, license,
  and LACK OF WARRANTY.
2013-11-03 23:09:30 +01:00
Ludovic Courtès 45b418d634 guix package: Show the output name of what's being removed.
* guix/scripts/package.scm (show-what-to-remove/install): Show the
  output name of packages being removed.
2013-11-01 23:59:25 +01:00
Ludovic Courtès 1b5ba6b1e9 guix package: Fix indentation of "will be removed" messages.
* guix/scripts/package.scm (show-what-to-remove/install): Remove extra
  indentation from the removal sentences.
2013-11-01 23:21:01 +01:00
Ludovic Courtès a20787706c guix package: Allow removal of a specific package output.
Fixes <http://bugs.gnu.org/15756>.

* guix/profiles.scm (<manifest-pattern>): New record type.
  (remove-manifest-entry): Remove.
  (entry-predicate, manifest-matching-entries): New procedures.
  (manifest-remove): Accept a list of <manifest-pattern>.
  (manifest-installed?): Replace 'name' parameter by 'pattern', a
  <manifest-pattern>.
* guix/scripts/package.scm (options->removable): Return a list of
  <manifest-pattern>.
  (guix-package)[process-action]: Use 'manifest-matching-entries' to
  compute the list of packages to remove.
* tests/profiles.scm: New file.
* Makefile.am (SCM_TESTS): Add it.
2013-11-01 23:21:01 +01:00
Ludovic Courtès 537630c5a7 guix package: Separate '--remove' option processing.
* guix/scripts/package.scm (options->removable): New procedure.
  (guix-package)[process-actions]: Use it.  Rename 'remove*' to 'remove'
  and 'install*' to 'install'.
2013-11-01 23:21:00 +01:00
Ludovic Courtès 2876b98925 ui: Factorize package specification parsing.
* guix/ui.scm (package-specification->name+version+output): New
  procedure.
* guix/scripts/package.scm (specification->package+output): Use it.
* tests/ui.scm ("package-specification->name+version+output"): New test.
2013-11-01 23:21:00 +01:00
Ludovic Courtès cc4ecc2d88 Add (guix profiles).
* guix/scripts/package.scm (show-what-to-remove/install): New procedure,
  moved from...
  (guix-package): ... here.
  (<manifest>, make-manifest, <manifest-entry>,
  profile-manifest, manifest->sexp, sexp->manifest, read-manifest,
  write-manifest, remove-manifest-entry, manifest-remove,
  manifest-installed?, manifest=?, profile-regexp, generation-numbers,
  previous-generation-number, profile-derivation, generation-number,
  generation-file-name, generation-time, lower-input): Move to...
* guix/profiles.scm: ... here.  New file.
* Makefile.am (MODULES): Add it.
2013-11-01 23:21:00 +01:00
Ludovic Courtès ff8061b591 Merge branch 'master' into core-updates 2013-11-01 12:59:31 +01:00
Ludovic Courtès cdbca518ca union: Do not warn when identical files collide.
* guix/build/union.scm (file=?): New procedure.
  (union-build)[resolve-collision]: Do not warn when identical files
  collide.
2013-10-31 23:38:58 +01:00
Ludovic Courtès 477d30d0d8 guix package: Factorize generation file name computation.
* guix/scripts/package.scm (generation-file-name): New procedure.
  Change all occurrences of (format #f "~a-~a-link" profile number) to
  use it.
2013-10-30 22:09:33 +01:00
Ludovic Courtès 1fcc3ba309 guix package: Specify inputs for each manifest entry.
* guix/scripts/package.scm (<manifest-entry>): Add 'inputs' field.
  (manifest=?, lower-input): New procedure.
  (profile-derivation)[builder]: Add #:log-port argument to
  'union-build'.
  [ensure-valid-input]: Remove.
  Add each entry's inputs to the input list.
  (options->installable): Return just the list of entries.
  [package->manifest-entry]: Set 'inputs' field.
  [canonicalize-deps]: Rename to...
  [deduplicate]: ... this.  Remove input fiddling.
  (guix-package)[process-actions]: Use 'manifest=?' to compare the new
  and old manifests.  Pass directly PROF-DRV to 'show-what-to-build'.
  Pass #:print-build-trace #f to 'set-build-options'.
2013-10-30 22:09:33 +01:00
Ludovic Courtès c065c443a0 union: Make the log port a parameter.
* guix/build/union.scm (union-build): Add 'log-port' keyword parameter;
  use it.
2013-10-30 22:09:32 +01:00
Ludovic Courtès d0dc4907d6 derivations: 'derivation-path->output-path' honors the 'output' parameter.
* guix/derivations.scm (derivation-path->output-path): Pass OUTPUT.
* tests/derivations.scm ("multiple-output derivation,
  derivation-path->output-path"): New test.
2013-10-30 22:09:32 +01:00
Ludovic Courtès d595e456c1 guix package: Always use the term "profile", not "user environment".
* guix/scripts/package.scm (%user-environment-directory): Rename to...
  (%user-profile-directory): ... this.  Update users accordingly.
  (profile-derivation): Use the term "profile" instead of "user
  environment", and use "profile" as the derivation name.
2013-10-30 22:09:32 +01:00
Ludovic Courtès f067fc3e77 guix package: Introduce <manifest> and <manifest-entry> types.
* guix/scripts/package.scm (<manifest>, <manifest-entry>): New record
  types.
  (make-manifest, read-manifest, manifest->sexp, sexp->manifest,
  read-manifest, write-manifest, remove-manifest-entry, manifest-remove,
  manifest-installed?): New procedures.
  (profile-derivation): Take a manifest as the second parameter.  Use
  'manifest->sexp'.  Expect <manifest-entry> objects instead of
  "tuples".  Adjust callers accordingly.
  (search-path-environment-variables): Changes 'packages' parameter to
  'entries'.  Rename 'package-in-manifest->package' to
  'manifest-entry->package'; expect <manifest-entry> objects.
  (display-search-paths): Rename 'packages' to 'entries'.
  (options->installable): Change 'installed' to 'manifest'.  Have
  'canonicalize-deps' return name/path tuples instead of raw packages.
  Rename 'package->tuple' to 'package->manifest-entry'.  Use
  <manifest-entry> objects instead of tuples.
  (guix-package)[process-actions]: Likewise.  Rename 'packages' to
  'entries'.
  [process-query]: Use 'manifest-entries' instead of
  'manifest-packages'.
2013-10-30 22:09:32 +01:00
Ludovic Courtès edac884624 guix package: Better separate option processing.
* guix/scripts/package.scm (find-package): Rename to...
  (specification->package+output): ... this.  Rename 'name' parmameter
  to 'spec'.  Return a package and output name instead of a tuple.
  (options->installable): New procedure
  (guix-package)[process-actions]: Use it, and remove corresponding
  code.
2013-10-30 22:09:32 +01:00
Ludovic Courtès d46d8794a1 guix package: Declutter the entry point.
* guix/scripts/package.scm (newest-available-packages,
  find-best-packages-by-name, find-package, upgradeable?): New
  procedures, moved from...
  (guix-package): ... here.
2013-10-29 22:03:02 +01:00
Ludovic Courtès 7587041028 build-system/{cmake,perl}: Don't use (guix build gnu-build-system).
Previously references to '%standard-phases' in builder-side code would
refer to the wrong one.

* guix/build-system/cmake.scm (cmake-build): Remove (guix build
  gnu-build-system) from the default MODULES value.
* guix/build-system/perl.scm (perl-build): Likewise.
2013-10-29 00:08:44 +01:00
Ludovic Courtès f1352766fa utils: 'find-files' always returns a proper list.
Reported at <http://bugs.gnu.org/15608>.

* guix/build/utils.scm (find-files): Change the 'error' procedure to
  return RESULT.  Before we would end up with an improper list.
2013-10-16 15:53:59 +02:00
Ludovic Courtès 59fbeb8cae records: define-record-type*: Field bindings are bound with 'let*'.
* guix/records.scm (define-record-type*): Wrap field bindings in a
  'let*', not in a 'letrec*', which turned out to be pointlessly
  inconvenient.
* tests/records.scm: Adjust test names accordingly.
2013-10-15 23:31:22 +02:00
Ludovic Courtès b2ba65c897 guix package: '--search' matches against package names.
* guix/scripts/package.scm (find-packages-by-description): Return
  packages whose name matches RX.
2013-10-15 22:59:50 +02:00
Ludovic Courtès 178f77b2d2 pull: Compile modules correctly regardless of the compilation order.
* guix/scripts/pull.scm (unpack)[builder]: Work around
  <http://bugs.gnu.org/15602>.
2013-10-13 22:50:11 +02:00
Andreas Enge e78fd4ca63 guix: Make cmake build system aware of usual paths.
*  guix/build/cmake-build-system.scm (configure): Set CMAKE_LIBRARY_PATH to
     LIBRARY_PATH and CMAKE_INCLUDE_PATH to CPATH.
2013-10-13 18:02:49 +02:00
Ludovic Courtès 52af657aee pull: Simplify the builder.
* guix/scripts/pull.scm (unpack)[builder]: Use 'copy-recursively' and
  'copy-file' instead of 'file-system-fold'.
2013-10-13 01:14:21 +02:00
Ludovic Courtès b421cebd6a build-system/perl: Lazily resolve (gnu packages perl).
* guix/build-system/perl.scm (default-perl): New procedure.
  (perl-build): Use it.
2013-10-12 22:29:32 +02:00
Ludovic Courtès 0ad7da1e90 pull: Add '--url' option.
* guix/scripts/pull.scm (%default-options): Add 'tarball-url' pair.
  (%options, show-help): Add '--url'.
  (guix-pull): Honor it.
2013-10-12 22:29:32 +02:00
Ludovic Courtès d8907ac43f download: Support 'file://' URLs.
* guix/download.scm (download-to-store): When URL has a 'file' scheme or
  no scheme, use 'add-to-store' directly.
2013-10-12 22:29:31 +02:00
Ludovic Courtès 39e9f95d05 guix: Add missing call to 'bindtextdomain'.
* scripts/guix.in (config-lookup): Add "localedir" entry.
  (run-guix-main): Add call to 'bindtextdomain'.
* guix/ui.scm (initialize-guix): Use %GETTEXT-DOMAIN instead of a
  literal.
2013-10-12 22:29:31 +02:00
Ludovic Courtès 1a75f8d939 gnu-maintenance: Adjust URL of package description file.
* guix/gnu-maintenance.scm (%package-description-url): Adjust to the
  new URL.
2013-10-11 22:18:47 +02:00
Ludovic Courtès 7e2b10a53f build-system/{gnu,cmake}: Remove #:patches and #:patch-flags parameters.
* guix/build/gnu-build-system.scm (patch): Remove.
  (%standard-phases): Remove 'patch'.
* guix/build-system/gnu.scm (gnu-build, gnu-cross-build): Remove
  #:patches and #:patch-flags parameters.
* guix/build-system/cmake.scm (cmake-build): Likewise.
* guix/build-system/python.scm (package-with-explicit-python): Update
  comment.
2013-10-10 23:15:57 +02:00
Ludovic Courtès 1d9bc45925 packages: The 'patch-guile' field of <origin> is now a package.
* guix/packages.scm (default-guile): Return a package instead of a
  derivation.
  (package-source-derivation): Adjust accordingly.
2013-10-10 23:00:47 +02:00
Ludovic Courtès 4e45e35266 snix: Prefer descriptions from the Womb rather than from Nixpkgs.
* guix/snix.scm (snix-derivation->guix-package): Use
  'gnu-package-doc-description' as the description for GNU packages.
2013-10-09 16:18:23 +02:00
Ludovic Courtès 129f9e1173 gnu-maintenance: Get descriptions from 'gnumaint/pkgdescr.txt'.
* guix/gnu-maintenance.scm (%gnumaint-base-url): New variable.
  (%package-list-url): Use it.
  (%gsrc-package-list-url): Remove.
  (%package-description-url): New variable.
  (official-gnu-packages): Change to use %PACKAGE-DESCRIPTION-URL
  instead of %GSRC-PACKAGE-LIST-URL.  Adjust recutils field names
  accordingly.
2013-10-09 13:00:00 +02:00
Ludovic Courtès ac10e0e17e packages: Add 'patches' and related fields to <origin>.
See <https://lists.gnu.org/archive/html/guix-devel/2013-09/msg00137.html>
for the rationale.

* guix/packages.scm (<origin>)[patches, patch-flags, patch-inputs,
  patch-guile]: New fields.
  (%standard-patch-inputs, default-guile, patch-and-repack): New
  procedures.
  (package-source-derivation): When 'patches' is non-empty, call
  'patch-and-repack'.
* guix/utils.scm (file-sans-extension): New procedure.
2013-10-09 00:11:34 +02:00
Ludovic Courtès e0029b745a download: Add Debian mirrors.
* guix/download.scm (%mirrors)[debian]: New set of mirrors.
2013-10-05 16:45:39 +02:00
Ludovic Courtès aeb7ec5c9a monads: Allow resolution of a monad's bind/return at expansion time.
* guix/monads.scm (<monad>): Turn in a raw SRFI-9 record type.
  (define-monad): New macro.
  (with-monad): Add a case for when MONAD is a macro.
  (identity-return, identity-bind, store-return, store-bind): Inline.
  (%identity-monad, %store-monad): Use 'define-monad'.
* tests/monads.scm ("monad?"): New test.
2013-10-03 23:12:20 +02:00
Ludovic Courtès b860f38244 Add (guix monads).
* guix/monads.scm: New file.
* tests/monads.scm: New file.
* Makefile.am (MODULES): Add guix/monads.scm.
  (SCM_TESTS): Add tests/monads.scm.
* doc/guix.texi (The Store Monad): New node.
  (The Store): Reference it.
2013-10-03 23:12:20 +02:00
Ludovic Courtès 2442257f2d Merge branch 'core-updates' 2013-09-27 01:30:57 +02:00
Ludovic Courtès d7ddb257c9 guix package: '--delete-generations' deletes generations older than specified.
* guix/scripts/package.scm (matching-generations): Add
  'duration-relation' keyword parameter.
  (guix-package)[process-action](delete-generations): Pass
  #:duration-relation >.
* tests/guix-package.sh: Add test.
* doc/guix.texi (Invoking guix package): Clarify the meaning of
  durations for '--list-durations' and '--delete-durations'.
2013-09-27 01:23:59 +02:00
Ludovic Courtès 03761a4465 build-system/trivial: Take the 'source' field into account.
* guix/build-system/trivial.scm (trivial-build): When SOURCE is true,
  add it to INPUTS.
  (trivial-cross-build): Likewise.
* tests/packages.scm ("trivial with source"): New test.
2013-09-27 00:46:17 +02:00
Nikita Karetnikov b7884ca3ca guix package: Add '--delete-generations'.
* guix/scripts/package.scm (switch-to-previous-generation): New function.
  (roll-back): Use the new function instead of 'switch-link'.
  (show-help): Add '--delete-generations'.
  (%options): Likewise.
  (guix-package)[process-actions]: Add 'current-generation-number',
  'display-and-delete', and 'delete-generation'.  Add support for
  '--delete-generations', and reindent the code.
* tests/guix-package.sh: Test '--delete-generations'.
* doc/guix.texi (Invoking guix-package): Document '--delete-generations'.
2013-09-26 15:41:43 +00:00
Nikita Karetnikov 64d2e973fb guix package: Add 'link-to-empty-profile'.
* guix/scripts/package.scm (link-to-empty-profile): New function.
  (roll-back): Use it.
2013-09-26 15:41:43 +00:00
Nikita Karetnikov 4658b2c47b guix package: Exit with 0 when there is nothing to list.
* guix/scripts/package.scm (guix-package)[process-query]: Exit with 0
  when there are no generations containing packages or no profiles.
2013-09-26 15:41:43 +00:00
Ludovic Courtès 7facbf2b58 Merge branch 'master' into core-updates 2013-09-26 00:20:11 +02:00
Ludovic Courtès de8bcdaeb5 packages: Make the 'output' parameter of 'package-output' optional.
* guix/packages.scm (package-output): Make the 'output' parameter
  optional.
2013-09-25 23:26:42 +02:00
Nikita Karetnikov 9ac9360d6e guix package: Show which generation is the current one.
* guix/scripts/package.scm (guix-package)[process-query]: Show that a
  generation is the current one if the profile points to it.
* tests/guix-package.sh: Test it.
2013-09-25 16:10:40 +00:00
Nikita Karetnikov 4b2bc804d8 guix package: Do not list the zeroth generation.
* guix/scripts/package.scm (guix-package)[process-query]: Change
  'list-generation' to not list the zeroth generation.
* tests/guix-package.sh: Test it.
* doc/guix.texi (Invoking guix package): Document it, and use the
  right term when talking about generations.
2013-09-25 16:08:39 +00:00
Nikita Karetnikov 0ab212b946 guix package: Exit with 1 when a generation cannot be listed.
* guix/scripts/package.scm (guix-package)[process-query]: Exit with 1
  when a generation does not exist or the profile points to the zeroth
  generation.
* tests/guix-package.sh: Test the former case.
2013-09-25 16:07:50 +00:00
Ludovic Courtès 5608847c6f Merge branch 'master' into core-updates 2013-09-23 00:35:17 +02:00
Ludovic Courtès 48e488eb2c nar: Fix file descriptor leak when writing a Nar.
* guix/nar.scm (write-contents)[call-with-binary-input-file]: Always
  close PORT.
2013-09-23 00:33:50 +02:00
Ludovic Courtès bd9bde1cba guix package: Show most recently installed packages last.
Suggested by Andreas Enge <andreas@enge.fr>.

* guix/scripts/package.scm (guix-package)[list-generations,
  list-installed]: Reverse the result of 'manifest-packages'.
* doc/guix.texi (Invoking guix package): Document the order of packages
  for '--list-generations' and '--list-installed'.
2013-09-23 00:33:50 +02:00
Ludovic Courtès 99882c613c guix package: Sort the list of generation numbers in '--list-generations'.
* guix/scripts/package.scm (generation-numbers): Sort the result.
2013-09-21 22:35:14 +02:00
Ludovic Courtès 4d497632ce guix package: Internationalize "Generation" string.
* guix/scripts/package.scm (guix-package): Internationalize generation
  listing.
2013-09-21 22:32:20 +02:00
Ludovic Courtès 3b627eac48 pull: Adjust to 'derivation' API change.
Fixes <http://bugs.gnu.org/15428>.
Reported by Cyrill Schenkel <cyrill.schenkel@gmail.com>.

* guix/scripts/pull.scm (guix-pull): 'unpack' returns a single value.
2013-09-21 22:16:26 +02:00
Nikita Karetnikov 2cd09108c9 guix package: Add '--list-generations'.
* guix/scripts/package.scm: Import (srfi srfi-19).
  (generation-time, matching-generations): New functions.
  (show-help): Add '--list-generations'.
  (%options): Likewise.
  (guix-package)[process-query]: Add support for '--list-generations'.
* guix/ui.scm: Import (srfi srfi-19) and (ice-9 regex).
  (string->generations, string->duration): New functions.
* tests/guix-package.sh: Test '--list-generations'.
* tests/ui.scm: Import (srfi srfi-19).
  Test 'string->generations' and 'string->duration'.
* doc/guix.texi (Invoking guix-package): Document '--list-generations'.
2013-09-19 11:22:31 +00:00
Ludovic Courtès 59688fc4b5 derivations: 'derivation' and related procedures return a single value.
* guix/derivations.scm (derivation->output-path,
  derivation->output-paths): New procedures.
  (derivation-path->output-path): Use 'derivation->output-path'.
  (derivation-path->output-paths): Use 'derivation->output-paths'.
  (derivation): Accept 'derivation?' objects as inputs.  Return a single
  value.
  (build-derivations): New procedure.
  (compiled-modules): Use 'derivation->output-paths'.
  (build-expression->derivation)[source-path]: Add case for when the
  input matches 'derivation?'.
  [prologue]: Accept 'derivation?' objects in INPUTS.
  [mod-dir, go-dir]: Use 'derivation->output-path'.
* guix/download.scm (url-fetch): Adjust to the single-value return.
* guix/packages.scm (package-output): Use 'derivation->output-path'.
* guix/scripts/build.scm (guix-build): When the argument is
  'derivation-path?', pass it through 'read-derivation'.
  Use 'derivation-file-name' to print out the .drv file names, and to
  register them.  Use 'derivation->output-path' instead of
  'derivation-path->output-path'.
* guix/scripts/package.scm (roll-back): Adjust to the single-value
  return.
  (guix-package): Use 'derivation->output-path'.
* guix/ui.scm (show-what-to-build): Adjust to deal with 'derivation?'
  objects instead of .drv file names.
* gnu/system/grub.scm (grub-configuration-file): Use
  'derivation->output-path' instead of 'derivation-path->output-path'.
* gnu/system/vm.scm (qemu-image, system-qemu-image): Likewise.
* tests/builders.scm, tests/derivations.scm, tests/packages.scm,
  tests/store.scm, tests/union.scm: Adjust to the new calling
  convention.
* doc/guix.texi (Defining Packages, The Store, Derivations): Adjust
  accordingly.
2013-09-18 18:49:53 +02:00
Ludovic Courtès 07c86312ca derivations: Add a nicer printer.
* guix/derivations.scm (<derivation>): Add a printer.
2013-09-18 11:10:02 +02:00
Ludovic Courtès 6a446d5680 derivations: Keep the .drv file name in <derivation> objects.
* guix/derivations.scm (<derivation>): Add 'file-name' field.
  (%read-derivation): Use (port-filename DRV-PORT) as the file name for
  the result.
  (derivation): Set the 'file-name' field in the result.
* tests/derivations.scm ("build derivation with 1 source"): Assert that
  'derivation-file-name' returns the right thing.
2013-09-17 23:02:13 +02:00
Ludovic Courtès 66018f1c33 utils: 'find-files' returns a sorted list.
* guix/build/utils.scm (find-files): Sort the result lexicographically.
* guix/scripts/pull.scm (unpack): Don't sort the result of 'find-files'.
2013-09-15 23:21:30 +02:00
Andreas Enge aae4ead814 Merge branch 'python' 2013-09-14 10:45:01 +02:00
Ludovic Courtès 29479de565 substitute-binary: Add '--help'.
Reported by Nikita Karetnikov <nikita@karetnikov.org>.

* guix/scripts/substitute-binary.scm (show-help): New procedure.
  (guix-substitute-binary): Add '--help'.
2013-09-13 23:42:36 +02:00
Nikita Karetnikov 1b0a8212d1 guix package: Rename generation-related procedures.
* guix/scripts/package.scm (profile-numbers): Rename to 'generation-numbers'.
  (previous-profile-number): Rename to 'previous-generation-number'.
  (profile-number): Rename to 'generation-number'.
  (roll-back): Rename 'previous-profile' to 'previous-generation'.
2013-09-13 07:07:01 +00:00
Andreas Enge 824af8cadc guix: python: Create module installation path and add it to PYTHONPATH during
the installation phase.

* guix/build/python-build-system.scm (get-python-version): New procedure.
* guix/build/python-build-system.scm (install): Create and add path.
* gnu/packages/python.scm (python-setuptools): Drop path creation code.
2013-09-11 15:47:34 +02:00
Ludovic Courtès 37c825eb79 linux-initrd: Create /dev/klog and /dev/kmsg.
* guix/build/linux-initrd.scm (make-essential-device-nodes): Make
  /dev/klog and /dev/kmsg.
2013-09-11 01:07:50 +02:00
Ludovic Courtès cfbf916045 store: The 'references' parameter of 'add-text-to-store' is now optional.
* guix/store.scm (add-text-to-store): Make 'references' optional.
* tests/store.scm ("dead-paths", "references"): Use 'add-text-to-store'
  with no optional argument.
* doc/guix.texi (The Store): Adjust accordingly.
2013-09-11 01:07:49 +02:00
Andreas Enge e1a264f6fa guix: python: Do not import %standard-phases from gnu-build-system.
* guix/build-system/python.scm (python-build): Drop module gnu-build-system.
    Thanks to Ludovic Courtès <ludo@gnu.org>.
2013-09-10 20:32:50 +02:00
Andreas Enge 1d1f939798 guix: python: Add parameter #:phases to build system.
* guix/build-system/python.scm (python-build): Use parameter #:phases.
2013-09-10 11:58:02 +02:00
Andreas Enge 11bb85a10d guix: python: Add package-with-python2, a procedure rewriting a package
to compile with Python 2 instead of the default Python 3.

* guix/build-system/python.scm (default-python2, package-with-explicit-python,
    package-with-python2): New procedures.
* guix/build-system/python.scm (python2-pytz, python2-babel): Use
    package-with-python2.
2013-09-08 16:57:37 +02:00
Andreas Enge b191f88ee3 guix: python: Add build phase and factor out calls to setup.py.
* guix/build/python-build-system.scm (call-setuppy): New procedure.
* guix/build/python-build-system.scm (build): New procedure.
* guix/build/python-build-system.scm (check, install): Use call-setuppy.
* guix/build/python-build-system.scm (%standard-phases): Add call to build.
2013-09-05 20:25:08 +02:00
Andreas Enge 7b96bf82da gnu: python: Honour #:tests? and #:test-target in build system.
* guix/build/python-build-system.scm (check): Use named parameters tests?
    and test-target (default now: "test" instead of "check").
2013-09-05 18:43:18 +02:00
Ludovic Courtès 29804e6eb2 gnu: linux-initrd: Fix creation of /dev/tty nodes.
* guix/build/linux-initrd.scm (make-essential-device-nodes): Make
  /dev/tty.  Change from 'block-special' to 'char-special' for /dev/tty*
  nodes.
2013-09-05 00:46:09 +02:00
Andreas Enge 3df47231e6 guix: python: Switch to python-wrapper as the default version for the python
build system (switches to Python 3) and compute python-version instead of
  passing it as a parameter.

* guix/build-system/python.scm (default-python): Switch to python-wrapper.
* guix/build-system/python.scm (python-build): Drop parameter #:python-version.
* guix/build/python-build-system.scm (wrap): Compute python version from input.
2013-09-04 18:07:55 +02:00
Ludovic Courtès bda44eed93 pull: Compile files in the lexicographic order.
* guix/scripts/pull.scm (unpack): Print the name of the file being
  compiled.  Sort the names of files to compile.
2013-09-03 10:48:52 +02:00
Ludovic Courtès 8badfc5558 build-system/cmake: Fix typo.
* guix/build-system/cmake.scm (default-cmake): Add missing quote.
2013-09-03 10:20:59 +02:00
Ludovic Courtès 0a2873e515 build-system/gnu: Delay resolution of (@ (gnu packages cmake) cmake).
* guix/build-system/cmake.scm (default-cmake): New procedure.
  (cmake-build): Use it.
2013-09-03 10:18:38 +02:00
Ludovic Courtès 00554b2a0f substitute-binary: Show the Nar size, when available.
* guix/scripts/substitute-binary.scm (guix-substitute-binary)["--substitute"]:
  Show the Nar size, when available.
* guix/ui.scm (show-what-to-build): Add 'TODO'.
2013-09-02 23:33:13 +02:00
Ludovic Courtès 43dd92024a union: Don't traverse sub-directories only found in one element of the union.
This significantly reduces I/O when building profiles, especially with
lots of package-specific sub-directories (such as 'share/emacs/24.3',
'texmf', etc.)

* guix/build/union.scm (union-build)[file-tree](others-have-it?): New
  procedure.  Use it in the 'enter?' parameter of 'file-system-fold';
  change 'skip' parameter accordingly.
* tests/union.scm ("union-build"): Ensure that 'include' is a symlink
  and 'bin' is a directory.
2013-09-02 23:04:25 +02:00
Ludovic Courtès bf8e7fc502 store: Add a printer for <nix-server>.
* guix/store.scm (<nix-server>): Set a printer.
2013-09-02 00:20:14 +02:00
Ludovic Courtès d91712ee89 gnu: linux-initrd: Factorize device node creation.
* guix/build/linux-initrd.scm (make-essential-device-nodes): New
  procedure.
* gnu/packages/linux-initrd.scm (qemu-initrd): Use it.
2013-09-02 00:20:14 +02:00
Ludovic Courtès 89bf140b10 gnu: linux-initrd: Make Guile modules accessible in the chroot.
* gnu/packages/linux-initrd.scm (qemu-initrd): Add (guix build utils) to
  #:modules, and use it.  Copy .scm and .go files to /root.
* guix/build/linux-initrd.scm (bind-mount): New procedure.
2013-08-31 23:02:18 +02:00
Ludovic Courtès 88840f0246 gnu: linux-initrd: Add (guix build linux-initrd) and use it.
* gnu/packages/linux-initrd.scm (qemu-initrd): Add #:modules argument.
  Factorize and move some of the code to...
* guix/build/linux-initrd.scm: ... here.  New file.
* Makefile.am (MODULES): Add it.
2013-08-29 00:05:03 +02:00
Ludovic Courtès f989fa392f gnu: linux-initrd: Allow Guile modules to be embedded in the initrd.
* gnu/packages/linux-initrd.scm (raw-build-system): New macro.
  (module-package, compiled-module-package): New procedures.
  (expression->initrd): Add `modules' keyword parameter.
  Add "modules" and "modules/compiled" inputs; copy them onto the
  initrd.
* guix/derivations.scm (imported-modules, compiled-modules): Publicize.
2013-08-29 00:05:03 +02:00
Ludovic Courtès 858e92823f derivations: Rename #:dependency-graphs to #:references-graphs.
* guix/derivations.scm (derivation, build-expression->derivation):
  Rename #:dependency-graphs to #:references-graphs, for consistency in
  the terminology.
* tests/derivations.scm: Adjust accordingly.
2013-08-28 00:55:40 +02:00
Ludovic Courtès 9c629a27a4 derivations: Add #:dependency-graphs to `build-expression->derivation'.
* guix/derivations.scm (build-expression->derivation): Add
  #:dependency-graphs keyword argument.  Pass it to `derivation'.
* tests/derivations.scm ("build-expression->derivation with
  #:dependency-graphs"): New test.
* doc/guix.texi (Derivations): Update `build-expression->derivation'
  description.
2013-08-26 22:20:58 +02:00
Ludovic Courtès 5b0c9d1635 derivations: Add #:dependency-graphs `derivation' parameter.
* guix/derivations.scm (derivation): Add `dependency-graphs' keyword
  parameter; honor it.
* tests/derivations.scm (bootstrap-binary): New procedure.
  (%bash): Use it.
  (%mkdir): New variable.
  (directory-contents): Add `slurp' optional parameter.
  ("derivation with #:dependency-graphs"): New test.
* doc/guix.texi (Derivations): Update accordingly.
2013-08-26 22:20:53 +02:00
Ludovic Courtès a987d2c025 derivations: Move 3 positional parameters into keyword parameters.
* guix/derivations.scm (derivation): Turn `system', `env-vars', and
  `inputs' into keyword parameters.
  (build-expression->derivation): Adjust accordingly.
* gnu/packages/bootstrap.scm (%bootstrap-guile): Likewise.
* tests/derivations.scm, tests/store.scm: Likewise.
* doc/guix.texi (Derivations): Likewise.
2013-08-26 22:20:27 +02:00
Ludovic Courtès 5d9cd70721 download: Add kernel.org mirrors.
Fixes <http://bugs.gnu.org/15182>.
Reported by Mark H Weaver <mhw@netris.org>.

* guix/download.scm (%mirrors)[kernel.org]: Add ftp.be.debian.org and
  mirror.linux.org.au.
2013-08-25 20:49:03 +02:00
Ludovic Courtès fe12c3458c build-system/gnu: Add `dist-package'.
* guix/build/gnu-dist.scm: New file.
* Makefile.am (MODULES): Add it.
* guix/build-system/gnu.scm (%default-modules): New variable.
  (gnu-build): Use it.
  (dist-package): New procedure.
2013-08-24 17:30:31 +02:00
Ludovic Courtès 7357138bba packages: Allow file names as package sources.
* guix/packages.scm (package-source-derivation): Add cases for SOURCE as
  a store path or user file.
* tests/packages.scm ("package-source-derivation, file",
  "package-source-derivation, store path"): New tests.
2013-08-24 17:30:31 +02:00
Ludovic Courtès 7db3ff4a29 utils: Add `guile-version>?', and use it.
This fixes Guile version comparisons when (version) has a
vendor-specific suffix.

Reported by Andreas Enge <andreas@enge.fr>.

* guix/utils.scm (guile-version>?): New procedure.
* tests/utils.scm ("guile-version>? 1.8", "guile-version>? 10.5"): New
  tests.
* guix/scripts/substitute-binary.scm (fetch, progress-report-port): Use
  `guile-version>?' instead of `version>?'.
* guix/http-client.scm (when-guile<=2.0.5, http-fetch): Likewise.
2013-08-23 15:51:36 +02:00
Ludovic Courtès b6952cad8d substitute-binary: Try hard to avoid port buffering.
* guix/scripts/substitute-binary.scm (fetch): In the `file' case, open
  with the `b' flag, so that the coding cookie reading thing doesn't
  lead to buffering some of the data (on 2.0.5).
* tests/utils.scm ("filtered-port, file"): Open with `r0b'.  Fixes a
  test failure with Guile 2.0.5 whereby the first byte of FILE would be
  missing from DECOMPRESSED.
2013-08-22 17:14:20 +02:00
Ludovic Courtès db90b40dfd substitute-binary: Don't pretend to report download progress on Guile 2.0.5.
* guix/scripts/substitute-binary.scm (progress-report-port): On Guile
  2.0.5, return PORT directly and emit a warning.
2013-08-21 02:19:36 +02:00
Cyril Roelandt e12b3eb93e Make "guix -h" work as "guix --help".
* guix/ui.scm (guix-main): have the same behaviour for the "-h" and "--help"
  options.
2013-08-15 21:03:32 +02:00
Ludovic Courtès 079d127391 guix package: Allow separate install of several outputs of the same package.
* guix/scripts/package.scm (guix-package)[process-actions](same-package?):
  New procedure.  Use it instead of `alist-delete' when filtering out
  duplicate packages from the profile.
2013-07-15 23:51:28 +02:00
Ludovic Courtès 3b8258c569 Rename (guix web) to (guix http-client).
* guix/web.scm: Rename to...
* guix/http-client.scm: ... this.
* guix/gnu-maintenance.scm, guix/scripts/substitute-binary.scm,
  Makefile.am, po/POTFILES.in: Update accordingly.
2013-07-14 16:44:15 +02:00
Ludovic Courtès 2096b516e0 guix package: Fix handling of `-e'.
This fixes a bug whereby a command like

  guix package -e '(@@ (gnu packages base) gnu-make-boot0)'

would only succeed when the outputs of that package are available, and
otherwise fail with "/nix/store/... is not valid".

* guix/scripts/package.scm (guix-package)[process-action](package->tuple):
  Leave P as is in the result.  Move `package->tuple' call from INSTALL*
  to INSTALL.
2013-07-12 23:27:35 +02:00
Ludovic Courtès e14c39291b ui: Ignore SIGPIPE and catch `system-error' exceptions.
* guix/ui.scm (initialize-guix): Call `sigaction'.
  (call-with-error-handling): Wrap `thunk' in a (catch 'system-error ...).
2013-07-12 23:01:18 +02:00
Ludovic Courtès e3ccdf9e96 guix package: Reuse FTP connections for subsequent `latest-release' calls.
* guix/gnu-maintenance.scm (latest-release): Add `ftp-close' and
  `ftp-open' keyword parameters.
* guix/scripts/package.scm (ftp-open*): New variable.
  (check-package-freshness): Call `latest-release' with `ftp-open*' and
  a no-op procedure.
2013-07-12 22:59:33 +02:00
Ludovic Courtès 1f495e04c1 gnu-maintenance: `latest-release' closes its connection.
* guix/gnu-maintenance.scm (latest-release): Close CONN before
  returning.
2013-07-12 22:26:24 +02:00
Ludovic Courtès ce689ccf18 substitute-binary: Directly replace the global `regexp-exec'.
* guix/scripts/substitute-binary.scm (%regexp-exec-mutex, string->uri):
  Remove.
  (regexp-exec): Replace this global binding by a thread-safety wrapper.
  (fields->alist): Remove `with-mutex', and directly alias `recutils->alist'.
2013-07-11 22:42:41 +02:00
Ludovic Courtès 8b79e2e641 substitute-binary: Increase the default timeout.
* guix/scripts/substitute-binary.scm (%fetch-timeout): Set to 5 seconds.
2013-07-11 22:22:22 +02:00
Ludovic Courtès 560d4787f4 guix refresh: Keep only the newest versions of packages as upgrade candidates.
* guix/scripts/refresh.scm (guix-refresh)[keep-newest]: New procedure.
  Use it to keep only once copy of each package.
2013-07-11 19:56:30 +02:00
Ludovic Courtès c4ca9411f9 gnu-maintenance: Add `doc-description' field to <gnu-package-descriptor>.
* guix/gnu-maintenance.scm (%gsrc-package-list-url): New variable.
  (<gnu-package-descriptor>): Add `doc-description' field.
  (official-gnu-packages)[group-package-fields]: Rename to...
  [read-records]: ... this.  Reverse the result.
  [gsrc-description]: New procedure.
  Add the "description" field to the alist passed to `alist->record'.
2013-07-10 22:34:03 +02:00
Ludovic Courtès 836d10f154 records: `recutils->alist' recognizes lines starting with a `+'.
* guix/records.scm (%recutils-plus-rx): New variable.
  (recutils->alist): Use it to read + lines.
* tests/records.scm ("recutils->alist with + lines"): New test.
2013-07-10 21:53:29 +02:00
Ludovic Courtès b0efe83a8f gnu-maintenance: Use `recutils->alist'.
* guix/gnu-maintenance.scm (official-gnu-packages)[group-package-fields]:
  Rewrite in terms of `recutils->alist'.  Remove `state' parameter.
  Specify "doc-url" and "language" as multiple-value keys in the
  `alist->record' call.
2013-07-10 21:52:55 +02:00
Ludovic Courtès c8772a7a21 records: `alist->record' supports multiple-field occurrences.
* guix/records.scm (alist->record): Add `multiple-value-keys'
  parameter.  Update docstring, and honor it.
* tests/records.scm ("alist->record"): New record.
2013-07-10 21:52:51 +02:00
Ludovic Courtès b7b8828801 records: `recutils->alist' recognizes comments.
* guix/records.scm (%recutils-comment-rx): New variable.
  (recutils->alist): Match comments.
* tests/records.scm ("recutils->alist"): Add comments.
2013-07-10 18:01:12 +02:00
Ludovic Courtès fdc1bf659d records: Add `recutils->alist' for public consumption.
* guix/records.scm (%recutils-field-rx): New variable.
  (recutils->alist): New procedure, formerly known as `fields->alist'.
* guix/scripts/substitute-binary.scm (fields->alist): Use it.
* tests/records.scm ("recutils->alist"): New test.
2013-07-10 17:01:08 +02:00
Ludovic Courtès c769406010 Merge branch 'core-updates' 2013-07-09 22:17:18 +02:00
Ludovic Courtès 8c95b27ce6 store: Deal with unsupported `setsockopt' operation on GNU/Hurd.
* guix/store.scm (open-connection): Silently ignore ENOPROTOOPT on
  `setsockopt' calls, for the sake of GNU/Hurd.
  Reported by Matthew Lien <bluet@bluet.org> at
  <http://lists.gnu.org/archive/html/bug-guix/2013-07/msg00020.html>.
2013-07-04 22:49:00 +02:00
Ludovic Courtès 82f9b17687 build-system/gnu: Remove the "debug" output when `strip-binaries?' is #f.
* guix/build-system/gnu.scm (gnu-build, gnu-cross-build): Delete "debug"
  from OUTPUTS when STRIP-BINARIES? is false.
* gnu/packages/cross-base.scm (cross-libc): Leave `outputs' unchanged.
  This reverts commit a4627d4.
2013-07-04 13:26:35 +02:00
Ludovic Courtès be58d01a7e build-system/gnu: Write debug files to the "debug" sub-derivation, if any.
* guix/build/gnu-build-system.scm (strip): Add `objcopy-command' keyword
  parameter.
  [debug-output, debug-file-extension]: New variables.
  [debug-file, make-debug-file, add-debug-link]: New procedures.
  [strip-dir]: Use them.
2013-07-03 23:53:31 +02:00
Ludovic Courtès d475b25953 utils: Re-export `alist-cons' and `alist-delete'.
* guix/build/utils.scm: Re-export `alist-cons' and `alist-delete'.
2013-07-03 23:08:41 +02:00
Ludovic Courtès b0fad8a2d4 Use `port-sha256' and `open-sha256-port'.
* guix/derivations.scm (derivation-hash): Add comment as to why we keep
  the plain `sha256' call.
* guix/scripts/download.scm (guix-download): Use `port-sha256' instead
  of (compose sha256 get-bytevector-all).
* guix/scripts/refresh.scm (update-package): Likewise.
2013-07-03 01:18:24 +02:00
Ludovic Courtès 69927e78de hash: Add `open-sha256-port'.
* guix/hash.scm (GCRY_MD_SHA256): New macro.
  (sha256): Use it.
  (open-sha256-md, md-write, md-read, md-close, open-sha256-port,
  port-sha256): New procedures.
* tests/hash.scm: New file.
* Makefile.am (SCM_TESTS): Add it.
2013-07-02 22:38:03 +02:00
Ludovic Courtès 72626a71a9 Move `sha256' to (guix hash).
* guix/utils.scm (sha256): Move to...
* guix/hash.scm: ... here.  New file.
* Makefile.am (MODULES): Add it.
* guix/derivations.scm, guix/scripts/download.scm,
  guix/scripts/hash.scm, guix/scripts/refresh.scm, tests/base32.scm,
  tests/derivations.scm, tests/store.scm: Use (guix hash).
2013-07-01 23:28:21 +02:00
Ludovic Courtès 1a8b783470 ui: Don't make substituter-related RPCs at all when substitutes are disabled.
Reported by Nikita Karetnikov and Cyril Roelandt.

* guix/ui.scm (show-what-to-build): Call `substitutable-path-info'
  only when USE-SUBSTITUTES? is true.
2013-07-01 00:30:44 +02:00
Ludovic Courtès bb7dcaea57 substitute-binary: Avoid dangling connections to the server.
* guix/web.scm (open-socket-for-uri): New procedure.
  (http-fetch): Add `port' keyword parameter; use it.
* guix/scripts/substitute-binary.scm (%random-state): New variable.
  (with-timeout): Wait a little before retrying.
  (fetch): Use `open-socket-for-uri', and keep a copy of the socket in
  variable `port'.  Close PORT upon timeout.
2013-06-29 22:20:25 +02:00
Ludovic Courtès 3bba7b0a8f download: Add Savannah's master site.
* guix/download.scm (%mirrors): Add the "-noredirect" version of
  Savannah.
2013-06-27 22:36:23 +02:00
Ludovic Courtès a3cff41dd1 build-system/gnu: `package-with-explicit-inputs' skips non-GBS packages.
* guix/build-system/gnu.scm (package-with-explicit-inputs)[rewritten-input]:
  Leave P unchanged if its build system is not GNU-BUILD-SYSTEM.
2013-06-25 23:04:32 +02:00
Ludovic Courtès 7e873a6708 build-system/gnu: Augment `package-with-explicit-inputs' for cross builds.
* guix/build-system/gnu.scm (package-with-explicit-inputs): Add
  `native-inputs' keyword parameter.  Allow INPUTS and NATIVE-INPUTS to
  be thunks.
2013-06-25 20:54:56 +02:00
Ludovic Courtès ac5c1cec86 build-system/trivial: Don't bind `%target' in the builder.
* guix/build-system/trivial.scm (trivial-cross-build): Don't bind
  `%target' here since this causes problem when BUILDER
  contains (use-modules ...) clauses, and can be achieved differently
  anyway.
2013-06-25 00:06:31 +02:00
Ludovic Courtès f7c3429073 build-system/gnu: Disable test suite when cross building.
* guix/build-system/gnu.scm (gnu-cross-build): Change #:tests? to
  default to #f.
2013-06-24 23:26:50 +02:00
Ludovic Courtès b15669f37d utils: `set-path-environment-variable' calls `unsetenv' for empty values.
* guix/build/utils.scm (set-path-environment-variable): When VALUE is
  the empty string, call `unsetenv' instead of `setenv'.
* gnu/packages/guile.scm (guile-2.0)[arguments]: Remove `unsetenv'
  trick.
2013-06-22 16:42:46 +02:00
Ludovic Courtès 2f41f51c40 build-system/gnu: Set #:tests? to #f when cross-compiling.
* guix/build/gnu-build-system.scm (check): Add `target' formal
  parameter.  Change `tests?' to default to (not target).
2013-06-22 16:15:23 +02:00
Ludovic Courtès 91a7fde456 download: Don't fail when abbreviating `file://' URIs.
* guix/build/download.scm (uri-abbreviation)[elide-path]: Handle the
  case where URI has no `host' part.
2013-06-22 16:10:25 +02:00
Ludovic Courtès 4ca968eb95 build-system/gnu: Save `environment-variables' after each phase.
* guix/build/gnu-build-system.scm (set-paths): Move `system' call to...
  (gnu-build): ... here.
2013-06-21 00:32:07 +02:00
Ludovic Courtès 56c092ce94 build-system/gnu: Unify with (guix build-system gnu-cross-build).
* guix/build/gnu-build-system.scm (set-paths): Add `native-inputs' and
  `native-search-paths' keyword parameters.  Honor them.
  (configure): Add `target' and `native-inputs' keyword parameters.
  Look for Bash in NATIVE-INPUTS or INPUTS.  Pass `--host' when TARGET
  is true.
  (strip): Add `strip-command' keyword parameter.  Use it.
* guix/build/gnu-cross-build.scm: Remove.
* Makefile.am (MODULES): Adjust accordingly.
* gnu/packages/acl.scm, gnu/packages/attr.scm, gnu/packages/base.scm,
  gnu/packages/bash.scm, gnu/packages/gawk.scm,
  gnu/packages/gettext.scm, gnu/packages/guile.scm,
  gnu/packages/libffi.scm, gnu/packages/libsigsegv.scm,
  gnu/packages/linux.scm, gnu/packages/ncurses.scm,
  gnu/packages/readline.scm, guix/build-system/gnu.scm: Replace
  `%standard-cross-phases' by `%standard-phases'.  Remove references
  to (guix build gnu-cross-build).
2013-06-21 00:25:54 +02:00
Ludovic Courtès fe1818e26a package: Fix i18n of the number of packages message.
* guix/scripts/package.scm (guix-package)[process-actions]: Use `N_' for
  i18n of the number of packages message.
2013-06-20 23:41:31 +02:00
Ludovic Courtès a85060efec substitute-binary: Report progress while downloading.
* guix/scripts/substitute-binary.scm (decompressed-port): Improve docstring.
  (progress-report-port): New procedure.
  (guix-substitute-binary)["--substitute"]: Use it to report progress.
* guix/build/download.scm: Export `progress-proc' and `uri-abbreviation'.
2013-06-20 23:41:28 +02:00
Ludovic Courtès 9af05aa29d package: Display the number of installed packages upon completion.
* guix/scripts/package.scm (guix-package)[process-actions]: Display the
  number of packages in the profile upon completion.
2013-06-19 22:42:03 +02:00
Ludovic Courtès 7fa37abca0 gnu: Add ImageMagick.
* gnu/packages/imagemagick.scm: New file.
* Makefile.am (MODULES): Add it.
* guix/download.scm (%mirrors): Add `imagemagick' entry.
2013-06-19 19:27:23 +02:00
Ludovic Courtès 2207f73156 substitute-binary: Provide feedback when the server is unresponsive.
* guix/scripts/substitute-binary.scm (%fetch-timeout): New variable.
  (with-timeout): New macro.
  (fetch): Add `timeout?' keyword parameter.  Enclose `http-fetch' call
  in `with-timeout'.
  (guix-substitute-binary): Call `fetch' with #:timeout? #f.
2013-06-18 00:12:22 +02:00
Ludovic Courtès 9c71a2aec4 build-system/trivial: Fix introduction of `%target' when cross-building.
* guix/build-system/trivial.scm (trivial-cross-build): Wrap BUILDER in a
  `let' rather than in `begin'.
2013-06-15 23:39:32 +02:00
Ludovic Courtès 0bd31a2188 derivations: Micro-optimize `derivation-hash'.
* guix/derivations.scm (derivation-hash): Use a UTF-8-encoded string
  output port.  This makes things deterministic, and slightly faster.
2013-06-14 15:48:29 +02:00
Ludovic Courtès 8e59fdd53b guix gc: Add `--requisites'.
* guix/scripts/gc.scm (show-help, %options): Add `--requisites'.
  (guix-gc): Handle it.
* doc/guix.texi (Invoking guix gc): Document `--requisites'.
* NEWS: Update.
2013-06-13 22:15:41 +02:00
Ludovic Courtès 3f1e69395c store: Add `requisites'.
* guix/store.scm (fold-path, requisites): New procedures.
* tests/store.scm ("requisites"): New test.
2013-06-13 22:03:42 +02:00
Cyril Roelandt 16df248e4b Fix Guile version checking in the "web" code.
* guix/web.scm (http-fetch): fix Guile version checking. The previous version
would use features from Guile 2.0.9+ when using Guile 2.0.7.
2013-06-10 10:43:23 +02:00
Nikita Karetnikov 392b5d8cab guix refresh: Add '--key-download'.
* guix/gnu-maintenance.scm (download-tarball): Add a 'key-download'
  keyword argument and pass it to 'gnupg-verify*'.  Make
  'archive-type' a keyword argument.
  (package-update): Add a 'key-download' keyword argument.  Pass
  'archive-type' and 'key-download' keyword arguments to
  'download-tarball'.

* guix/gnupg.scm: Import (ice-9 i18n) and (guix ui).
  (gnupg-verify*): Add a 'key-download' keyword argument and adjust
  'gnupg-verify*' to use it.  Make 'server' a keyword argument.

* guix/scripts/refresh.scm (show-help, %options): Add and document
  '--key-download'.
  (update-package): Add a 'key-download' keyword argument and pass it
  to 'package-update'.
  (guix-refresh): Pass 'key-download' to 'update-package'.  Limit
  lines to a maximum of 79 characters.
2013-06-10 08:15:17 +00:00
Ludovic Courtès 9d97a1b3d6 packages: Make the `propagated-inputs' field thunked.
* guix/packages.scm (<package>): Make `propagated-inputs' thunked.
2013-06-06 00:04:11 +02:00
Ludovic Courtès a3e69bb892 gnu: Fix `static-package' arguments overriding.
* guix/build-system/gnu.scm (static-package): Call `package-arguments'
  from within the `arguments' field, so it see the
  right (%current-target-system).
2013-06-05 16:39:58 +02:00
Ludovic Courtès ae3b6bb0f4 substitute-binary: Don't cache .narinfo lookups when lacking networking.
* guix/scripts/substitute-binary.scm (lookup-narinfo): Don't cache
  NARINFO when CACHE is #f.
2013-06-04 09:43:38 +02:00
Nikita Karetnikov ef7cf2917a licenses: Add 'agpl3' and 'agpl3+'.
* guix/licenses.scm (agpl3, agpl3+): New variables.
2013-06-03 11:39:38 +00:00
Ludovic Courtès 89d02b98f9 ui: define-diagnostic: Don't mark `_' and `N_' as literals.
* guix/ui.scm (define-diagnostic): Use `free-identifier=?' to compare
  the user's input with `_' and `N-".  This should fix builds with Guile 2.1.
  Reported by Cojocaru Alexandru <xojoc@gmx.com>.
2013-05-30 00:49:34 +02:00