Commit Graph

104 Commits

Author SHA1 Message Date
Ludovic Courtès c423ae8918
packages: Add 'package-patched-vulnerabilities'.
* guix/packages.scm (patch-file-name): New procedure.
(%vulnerability-regexp): New variable.
(package-patched-vulnerabilities): New procedure.
* guix/scripts/lint.scm (patch-file-name): Remove.
(check-vulnerabilities): Adjust to use
'package-patched-vulnerabilities'.
* tests/packages.scm ("package-patched-vulnerabilities"): New test.
2018-06-09 12:02:28 +02:00
Mark H Weaver 1e868858fd
tests: Use invoke and return #t from all builders.
* tests/packages.scm ("package-source-derivation, snippet", "trivial")
("trivial with local file as input", "trivial with source")
("trivial with system-dependent input", "trivial with #:allowed-references")
("--search-paths with pattern", "--search-paths with single-item search path")
("replacement also grafted"): In the builders, raise an exception on errors
and otherwise return #t.  Use invoke.
2018-03-27 21:35:43 -04:00
Ludovic Courtès f8ec8d96d6
tests: Do not assume the bootstrap guile tarball is available locally.
Fixes <https://bugs.gnu.org/30824>.
Reported by Chris Marusich <cmmarusich@gmail.com>.

* tests/packages.scm ("package-source-derivation, snippet"): Use
'bootstrap-guile-origin' instead of assuming the bootstrap guile tarball
is available locally.
2018-03-15 10:25:10 +01:00
Ludovic Courtès 297602513b
build-system/trivial: Add support for #:allowed-references.
* guix/build-system/trivial.scm (lower): Add #:allowed-references and
keep it in the 'arguments' field.
(trivial-build): Add #:allowed-references.  Add
'canonicalize-reference'.  Pass #:allowed-references to
'build-expression->derivation'.
(trivial-cross-build): Likewise.
* tests/packages.scm ("trivial with #:allowed-references"): New test.
2018-02-28 22:47:42 +01:00
Ludovic Courtès f37f2b83fa
packages: Add 'package-mapping' and base 'package-input-rewriting' on it.
* guix/packages.scm (package-mapping): New procedure.
(package-input-rewriting): Rewrite in terms of 'package-mapping'.
* tests/packages.scm ("package-mapping"): New test.
* doc/guix.texi (Defining Packages): Document it.
2017-04-05 22:45:41 +02:00
Ludovic Courtès 76c486196f
packages: Catch invalid input errors for structs.
Reported by Thomas Sigurdsen <thomas.sigurdsen@gmail.com>
at <https://lists.gnu.org/archive/html/help-guix/2017-04/msg00007.html>.

* guix/packages.scm (expand-input): Add 'guard' form around call to
'package-source-derivation'.
* tests/packages.scm (dummy): New test.
2017-04-04 00:10:00 +02:00
Efraim Flashner 3b88f3767d
gnu: Add bootstrap-binaries for 'aarch64-linux'.
These bootstrap-binaries were built against commit
8f8f250bdc.

* gnu/packages/bootstrap/aarch64-linux/bash,
gnu/packages/bootstrap/aarch64-linux/mkdir,
gnu/packages/bootstrap/aarch64-linux/xz,
gnu/packages/bootstrap/aarch64-linux/tar: New files.

* gnu/local.mk (bootstrap_aarch64_linuxdir)
(dist_bootstrap_aarch64_linux_DATA)
(nodist_bootstrap_aarch64_linux_DATA): New variables.
(DISTCLEANFILES): Add $(nodist_bootstrap_aarch64_linux_DATA).
(gnu/packages/bootstrap/aarch64-linux/guile-2.0.14.tar.xz): New target.
* build-aux/download.scm (filename->uri): Add aarch64-linux entry.
* gnu/packages/bootstrap.scm (raw-build): Use guile-2.0.14.tar.xz on
aarch64-linux.
(glibc-dynamic-linker, %bootstrap-coreutils&co, %boostrap-binutils)
(%bootstrap-glibc, %bootstrap-gcc): Add aarch64-linux cases.
* m4/guix.m4 (GUIX_SYSTEM_TYPE): Add aarch64 case.
(GUIX_ASSERT_SUPPORTED_SYSTEM): Add aarch64-linux to supported list.
* doc/guix.texi (GNU Distribution): Add aarch64-linux to the list of
supported systems.
* tests/packages.scm (package-search-derivation, snippet): Add aarch64
case.
2017-02-20 12:58:07 +02:00
Ludovic Courtès fcd75bdbfa
search-paths: Allow specs with #f as their separator.
This adds support for single-entry search paths.
Fixes <http://bugs.gnu.org/25422>.
Reported by Leo Famulari <leo@famulari.name>.

* guix/search-paths.scm (<search-path-specification>)[separator]:
Document as string or #f.
(evaluate-search-paths): Add case for SEPARATOR as #f.
(environment-variable-definition): Handle SEPARATOR being #f.
* guix/build/utils.scm (list->search-path-as-string): Add case for
SEPARATOR as #f.
(search-path-as-string->list): Likewise.
* guix/build/profiles.scm (abstract-profile): Likewise.
* tests/search-paths.scm: New file.
* Makefile.am (SCM_TESTS): Add it.
* tests/packages.scm ("--search-paths with single-item search path"):
New test.
* gnu/packages/version-control.scm (git)[native-search-paths](separator):
New field.
2017-01-23 22:23:41 +01:00
Ludovic Courtès a6562c7e20
profiles: Remove dependency on 'glibc-utf8-locales' for tests.
Commit 1af0860e8b added a mandatory
dependency on 'glibc-utf8-locales', which entails long rebuilds for
tests.

* guix/profiles.scm (profile-derivation): Add #:locales? parameter.
Add 'set-utf8-locale' variable.  Use it when LOCALES? is true.
(link-to-empty-profile): Pass #:locales? #f.
* guix/scripts/environment.scm (inputs->profile-derivation): Pass
  #:locales?.
* guix/scripts/package.scm (build-and-use-profile): Likewise.
* tests/packages.scm ("--search-paths with pattern"): Pass #:locales? #f.
* tests/profiles.scm ("profile-derivation")
("profile-derivation, inputs", "profile-manifest, search-paths")
("etc/profile", "etc/profile when etc/ already exists"):
("etc/profile when etc/ is a symlink"): Likewise.
2016-12-17 14:46:42 +01:00
Ludovic Courtès b66d6d52cc
tests: Fix 'fold-packages' for hidden packages.
* tests/packages.scm ("fold-packages, hidden package"): Expect
GUILE-2.0, not GUILE-2.0/FIXED.  This is a followup to
c62a31ca80.
2016-11-08 23:32:41 +01:00
Ludovic Courtès d0025d0144
packages: 'package-grafts' applies grafts on replacement.
Partly fixes <http://bugs.gnu.org/24418>.

* guix/packages.scm (input-graft): Compute 'new' with #:graft? #t.
(input-cross-graft): Likewise.
* tests/packages.scm ("package-grafts, indirect grafts, cross"): Comment
out.
("replacement also grafted"): New test.
2016-10-14 23:05:41 +02:00
Ludovic Courtès 01afdab89c
packages: Add 'package-superseded' and associated support.
This provides a way to mark a package as superseded by another one.
Upgrades replace superseded packages with their replacement.

* guix/packages.scm (package-superseded, deprecated-package): New
procedures.
* gnu/packages.scm (%find-package): Check for 'package-superseded'.
* guix/scripts/package.scm (transaction-upgrade-entry)[supersede]: New
procedure.  Call it when 'package-superseded' is true.
* tests/guix-build.sh: Add test for a superseded package.
* tests/packages.scm ("package-superseded")
("transaction-upgrade-entry, superseded package"): New tests.
2016-09-06 23:22:10 +02:00
Ludovic Courtès 5239f3d908
guix package: Build up the transaction incrementally.
* guix/scripts/package.scm (upgraded-manifest-entry): Rename to...
(transaction-upgrade-entry): ... this.  Add 'transaction' parameter and
return a transaction.
(options->installable): Likewise.
[to-upgrade]: Rename to...
[upgraded]: ... this, and change to be a transaction.  Return a
transaction.
(options->removable): Likewise.
(process-actions): Adjust accordingly.
* tests/packages.scm ("transaction-upgrade-entry, zero upgrades")
("transaction-upgrade-entry, one upgrade"): New tests.
2016-09-06 23:22:10 +02:00
Ludovic Courtès 2a75b0b63d
packages: Add 'package-input-rewriting'.
* guix/packages.scm (package-input-rewriting): New procedure.
* tests/packages.scm ("package-input-rewriting"): New test.
* doc/guix.texi (Defining Packages): Document it.
(Package Transformation Options): Add cross-reference.
2016-09-01 23:07:54 +02:00
Ludovic Courtès 386b71d1b9
gnu: commencement: 'guile-final' is now "hidden".
This way, we no longer have this annoying warning:

  $ guix build guile -n
  guix build: warning: ambiguous package specification `guile'
  guix build: warning: choosing guile-2.0.11 from gnu/packages/guile.scm:128:2

* gnu/packages/commencement.scm (guile-final): Use 'hidden-package'.
* tests/packages.scm ("fold-packages, hidden package"): New test.
2016-07-28 18:53:13 +02:00
Ludovic Courtès 6980511b73
packages: Add 'hidden-package'.
* guix/packages.scm (hidden-package, hidden-package?): New procedures.
* gnu/packages.scm (fold-packages): Filter out 'hidden-package?'.
* tests/packages.scm ("hidden-package"): New test.
2016-07-28 18:50:43 +02:00
Ludovic Courtès c1629416d8
gnu: Remove unneeded 'imported-modules' fields for 'origin'.
* gnu/packages/engineering.scm (fastcap)[source](modules,
imported-modules): Remove.
* gnu/packages/wm.scm (awesome)[source](imported-modules): Remove.
* tests/packages.scm ("package-source-derivation, snippet"): Remove
'imported-modules' field.
2016-07-12 22:47:08 +02:00
Ludovic Courtès 77559f23b0
tests: Strengthen regexp in 'packages.scm'.
* tests/packages.scm ("--search-paths with pattern"): Call
'regexp-quote' on the result of 'derivation->output-path'.
2016-06-20 00:52:53 +02:00
Ludovic Courtès da675305dd
packages: The 'source' can be any lowerable object.
* guix/packages.scm (expand-input): Use 'struct?' instead of 'origin?'
when matching SOURCE.
(package-source-derivation): Use 'lower-object' instead of
'origin->derivation'.
* tests/packages.scm ("package-source-derivation, local-file"): New
test.
* doc/guix.texi (package Reference): Update 'source' documentation
accordingly.
2016-06-15 15:26:30 +02:00
Mathieu Lirzin a9edb211e7 build: Add a Guile custom test driver using SRFI-64.
Before that '.log' files for scheme tests were fragmented and not
included in test-suite.log.  This unifies the semantics of SRFI-64 API
with Automake test suite.

* build-aux/test-driver.scm: New file.
* Makefile.am (SCM_LOG_DRIVER, AM_SCM_LOG_DRIVER_FLAGS): New variables.
(SCM_LOG_COMPILER, AM_SCM_LOG_FLAGS): Delete variables.
(AM_TESTS_ENVIRONMENT): Set GUILE_AUTO_COMPILE to 0.
* test-env.in: Silence guix-daemon.
* doc/guix.texi (Running the Test Suite): Describe how to display the
detailed results.  Bug reports require only 'test-suite.log' file.
* tests/base32.scm, tests/build-utils.scm, tests/builders.scm,
tests/challenge.scm, tests/cpan.scm, tests/cpio.scm, tests/cran.scm,
tests/cve.scm, tests/derivations.scm, tests/elpa.scm,
tests/file-systems.scm, tests/gem.scm, tests/gexp.scm,
tests/gnu-maintenance.scm, tests/grafts.scm, tests/graph.scm,
tests/gremlin.scm, tests/hackage.scm, tests/hash.scm,
tests/import-utils.scm, tests/lint.scm, tests/monads.scm, tests/nar.scm,
tests/packages.scm, tests/pk-crypto.scm, tests/pki.scm,
tests/profiles.scm, tests/publish.scm, tests/pypi.scm,
tests/records.scm, tests/scripts-build.scm, tests/scripts.scm,
tests/services.scm, tests/sets.scm, tests/size.scm, tests/snix.scm,
tests/store.scm, tests/substitute.scm, tests/syscalls.scm,
tests/system.scm, tests/ui.scm, tests/union.scm, tests/upstream.scm,
tests/utils.scm: Don't exit at the end of test groups.
* tests/containers.scm: Likewise.  Use 'test-skip' instead of exiting
with error code 77.
2016-04-03 14:19:09 +02:00
Ludovic Courtès efb107e0cd packages: Gracefully report packages not found.
Fixes a thinko introduced in 1b846da8c3
that would lead to a backtrace when looking for an unknown package.

* gnu/packages.scm (%find-package): Correct logic when checking for
FALLBACK?.
2016-03-08 11:48:21 +01:00
Ludovic Courtès b4c42a4b07 tests: Disable tests that would rebuild the world due to grafting.
The Perl replacement added in d8173f2 leads some tests to involve
grafting, which in turn triggers derivation builds that rebuild the
world.  Work around that.

* tests/packages.scm: Add call to '%graft?'.
("package-derivation, direct graft")
("package-cross-derivation, direct graft"): Comment out.
2016-03-05 00:19:10 +01:00
Ludovic Courtès fcadd9ff9d packages: The result of 'bag-grafts' does not contain duplicates.
* guix/packages.scm (bag-grafts): Add call to 'delete-duplicates'.
2016-03-05 00:19:10 +01:00
Ludovic Courtès c22a1324e6 grafts: Graft recursively.
Fixes <http://bugs.gnu.org/22139>.

* guix/grafts.scm (graft-derivation): Rename to...
(graft-derivation/shallow): ... this.
(graft-origin-file-name, item->deriver, non-self-references)
(cumulative-grafts, graft-derivation): New procedures
* tests/grafts.scm ("graft-derivation, grafted item is a direct
dependency"): Clarify title.  Use 'grafted' instead of 'graft' to refer
to the grafted derivation.
("graft-derivation, grafted item is an indirect dependency")
("graft-derivation, no dependencies on grafted output"): New tests.
* guix/packages.scm (input-graft): Change to take a package instead of
an input.
(input-cross-graft): Likewise.
(fold-bag-dependencies): New procedure.
(bag-grafts): Rewrite in terms of 'fold-bag-dependencies'.
* tests/packages.scm ("package-derivation, indirect grafts"): Comment out.
* doc/guix.texi (Security Updates): Mention run-time dependencies and
recursive grafting.
2016-03-01 16:00:46 +01:00
Ludovic Courtès b0fef4d660 grafts: 'name' parameter of 'graft-derivation' is now optional.
* guix/grafts.scm (graft-derivation): Name 'name' a keyword parameter.
* guix/packages.scm (package-derivation, package-cross-derivation):
Adjust accordingly.
* tests/grafts.scm ("graft-derivation"): Likewise.
* tests/packages.scm ("package-derivation, indirect grafts"): Likewise.
2016-02-22 22:11:37 +01:00
Ludovic Courtès 7adf9b8469 derivations: Move grafts to (guix grafts).
* guix/derivations.scm (<graft>, graft-derivation, %graft?)
(set-grafting): Move to...
* guix/grafts.scm: ... here.  New file.
* guix/gexp.scm, guix/packages.scm, tests/packages.scm,
guix/scripts/build.scm: Use it.
* Makefile.am (MODULES): Add it.
(SCM_TESTS): Add tests/grafts.scm.
* tests/derivations.scm ("graft-derivation"): Move to...
* tests/grafts.scm: ... here.  New file.
2016-02-22 22:11:37 +01:00
Mathieu Lirzin 74e667d149 packages: Use '@' in package record printers.
* guix/packages.scm <package>: Use '@' in record printer.
* guix/import/cabal.scm <cabal-package>: Likewise
* guix/import/elpa.scm <elpa-package>: Likewise.
* tests/packages.scm: Adapt to it.
2016-01-28 16:31:38 +01:00
Ludovic Courtès aa8e051532 packages: Add 'package-transitive-native-search-paths'.
* guix/packages.scm (package-transitive-native-search-paths): New
procedure.
* tests/packages.scm ("package-transitive-native-search-paths"): New
test.
2015-12-20 22:34:22 +01:00
Ludovic Courtès d6445dff14 tests: Adjust snippet test to '.file_list' hack.
This is a followup to commit 140b4bc.

* tests/packages.scm ("package-source-derivation, snippet")[source]: Add
  'chmod' call for "..".
2015-09-24 10:36:24 +02: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
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 161094c8e2 packages: Rewrite 'transitive-inputs' to be linear and remove duplicates.
There were two issues:

  1. Use of 'delete-duplicates', which is quadratic, was a serious problem for
     closures with lots of propagated inputs, such as that of the 'hydra'
     package (several minutes for 'guix build hydra -n'!).

  2. The 'delete-duplicates' call essentially had no effect since duplicate
     inputs typically had a different label and were thus kept.  For
     instance, (bag-transitive-inputs (package->bag inkscape)) would return
     216 items whereas (delete-duplicates (map cdr THAT)) contains only 67
     items.

     The new implementation returns 67 items in this case.  For 'hydra', we're
     down from 42211 items to 361, and roughly 13s for 'guix build hydra'.

* guix/packages.scm (transitive-inputs): Rewrite as a breadth-first
  traversal.  Remove duplicate propagated inputs.
* tests/packages.scm ("package-transitive-inputs", "package->bag, propagated
  inputs"): Adjust to use simple labels for propagated inputs, without "/".
  ("package-transitive-inputs, no duplicates"): New test.
2015-07-12 01:27:00 +02:00
Eric Bavier f77bcbc374 guix: packages: Add package-direct-sources and package-transitive-sources.
* guix/tests.scm (dummy-origin): New syntax.
* guix/packages.scm (package-direct-sources)
  (package-transitive-sources): New procedures.
* tests/packages.scm ("package-direct-sources, no source")
  ("package-direct-sources, #f source")
  ("package-direct-sources, not input source", "package-direct-sources")
  ("package-transitive-sources"): Test them.
2015-05-02 23:15:40 -05:00
Mark H Weaver 5cfc17cb7f tests: Select appropriate bootstrap guile version for current system.
* tests/packages.scm ("package-source-derivation, snippet"): Select appropriate
  guile-2.0.x.tar.xz tarball based on the value of (%current-system).
2015-04-22 17:25:28 -04:00
Ludovic Courtès bbceb0ef8a packages: Add 'supported-package?'.
* guix/packages.scm (supported-package?): New procedure.
* tests/packages.scm ("supported-package?"): New test.
* build-aux/hydra/gnu-system.scm (package->job): Use it instead of
  'package-transitive-supported-systems'.
2015-04-19 23:34:53 +02:00
Mark H Weaver 933204e5b1 Merge branch 'master' into core-updates
Conflicts:
	gnu-system.am
	gnu/packages/gstreamer.scm
2015-04-17 09:54:11 -04:00
Ludovic Courtès aa46a028c4 profiles: Generalize "hooks" for 'profile-derivation'.
* guix/profiles.scm (info-dir-file): Remove (null? (manifest-entries
  manifest)) test.
  (ca-certificate-bundle): Likewise.
  (ghc-package-cache-file): Turn 'if' into 'and', and remove second
  arm.
  (%default-profile-hooks): New variable.
  (profile-derivation): Remove #:info-dir?, #:ghc-package-cache?, and
  #:ca-certificate-bundle?.  Add #:hooks.  Iterate over HOOKS.  Adjust
  'inputs' accordingly.
* guix/scripts/package.scm (guix-package): Adjust 'profile-derivation'
  call accordingly.
* tests/packages.scm ("--search-paths with pattern"): Likewise.
* tests/profiles.scm ("profile-derivation",
  "profile-derivation, inputs"): Likewise.
2015-04-15 22:44:51 +02:00
Ludovic Courtès 9bf3ced06c packages: 'package-transitive-supported-systems' accounts for implicit inputs.
Reported by Federico Beffa.

* guix/packages.scm (package-transitive-supported-systems): Use
  bag-direct-inputs + package->bag rather than package-direct-inputs.
* tests/packages.scm ("package-transitive-supported-systems"): Add
  explicit 'build-system' field to each 'dummy-package' form.
  ("package-transitive-supported-systems, implicit inputs"): New test.
2015-04-11 13:06:23 +02:00
Ludovic Courtès ee5408576d Merge branch 'master' into core-updates 2015-04-09 21:10:46 +02:00
Federico Beffa 042bc828fc profiles: Generate GHC's package database cache.
* guix/profiles.scm (ghc-package-cache-file): New procedure.
  (profile-derivation): Add 'ghc-package-cache?' keyword argument.  If true
  (the default), add the result of 'ghc-package-cache-file' to 'inputs'.
* guix/scripts/package.scm (guix-package)[process-actions]: Pass
  #:ghc-package-cache? to 'profile-generation'.
* tests/packages.scm ("--search-paths with pattern"): Likewise.
* tests/profiles.scm ("profile-derivation"): Likewise.
2015-04-08 17:31:12 +02:00
Ludovic Courtès cf87cc894d packages: Rewrite 'patch-and-repack' using gexps.
* guix/packages.scm (patch-and-repack): Remove 'store' parameter and
  change default value of #:inputs to (%standard-patch-inputs).
  [lookup-input, instantiate-patch]: New procedures.
  [patch-inputs]: Remove.
  [builder]: Rename to...
  [build]: ... this.  Use gexps instead of sexps.
  (patch-and-repack*): Remove.
  (origin->derivation): Use 'patch-and-repack' instead of
  'patch-and-repack*'.
* tests/packages.scm ("package-source-derivation,
  snippet")[source](snippet): Remove references to '%build-inputs' and
  '%outputs'.
2015-03-18 19:07:36 +01:00
Ludovic Courtès 6d0b9d03ce tests: Remove dependency on 'glibc-utf8-locales' for profile tests.
This fixes a regression introduced in commit 536c3ee.

* guix/profiles.scm (ca-certificate-bundle): When MANIFEST is empty,
  make a trivial derivation.
* guix/scripts/package.scm (guix-package)[process-actions]: Pass
  #:ca-certificate-bundle? to 'profile-generation'.
* tests/packages.scm ("--search-paths with pattern"): Likewise.
* tests/profiles.scm ("profile-derivation"): Likewise.
2015-03-04 17:23:27 +01:00
Ludovic Courtès b69c5c2ced tests: Skip tests that would fail due to the shebang length.
Reported by Daniel Kochmański <dkochmanski@hellsgate.pl>.
Fixes <http://bugs.gnu.org/19888>.

* guix/tests.scm (shebang-too-long?): New procedure.
* tests/builders.scm ("gnu-build"): Conditionalize on
  not (shebang-too-long?).
* tests/packages.scm ("GNU Make, bootstrap"): Likewise.
* tests/guix-package.sh (shebang_not_too_long): New function.
  Use it to determine whether to build 'gnu-make-boot0'.
2015-02-24 00:01:34 +01:00
Ludovic Courtès 12d720fd1a tests: Factorize the network reachability test.
* guix/tests.scm (network-reachable?): New procedure.
* tests/builders.scm (network-reachable?): Remove.
  Replace references to it with calls to the new 'network-reachable?'
  procedure.
* tests/derivations.scm (%coreutils): Use 'network-reachable?' instead
  of 'getaddrinfo'.
* tests/packages.scm: Likewise.
* tests/union.scm: Likewise.
2015-02-24 00:01:34 +01:00
Ludovic Courtès 862abf8fcd tests: Disable grafts when comparing derivations.
Fixes a regression introduced with the grafting of Patch in 3f11f01.

* tests/packages.scm ("reference to non-existent output"): Wrap in
  'parameterize'.
2015-02-06 18:04:19 +01:00
Ludovic Courtès f304c9c237 derivations: Raise an error for references to non-existent outputs.
Fixes <http://bugs.gnu.org/19630>.
Reported by Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de>.

* guix/derivations.scm (&derivation-error,
  &derivation-missing-output-error): New error conditions.
  (derivation->output-path): Raise a '&derivation-missing-output-error'
  if OUTPUT is not an output of DRV.
* guix/ui.scm (call-with-error-handling): Add case for
  'derivation-missing-output-error?'.
  (show-what-to-build): Check whether (derivation-outputs drv) is
  empty.
* tests/packages.scm ("reference to non-existent output"): Add test.
2015-01-24 22:57:49 +01:00
Ludovic Courtès dbab5150f8 gnu: 'search-patch' raises an error when a patch is not found.
* gnu/packages.scm (search-patch): Raise an error condition when
  'search-path' returns #f.
* tests/packages.scm ("patch not found yields a run-time error"): New
  test.
2015-01-20 10:17:24 +01:00
Ludovic Courtès 57b7e1a62d Merge branch 'core-updates'
Conflicts:
	gnu/packages/bootstrap.scm
2015-01-16 13:27:03 +01:00
Ludovic Courtès f220a83848 packages: Convert source derivations to monadic style.
* guix/packages.scm (origin->derivation): Take body from
  'package-source-derivation', and change it to monadic style.  Expect
  METHOD to a monadic procedure.
  (package-source-derivation): Define in terms of 'origin->derivation'.
* guix/download.scm (url-fetch): Remove 'store' argument.  Remove
  'guile-for-build' variable.  Turn into a monadic procedure.
* guix/git-download.scm (git-fetch): Likewise.
* guix/svn-download.scm (svn-fetch): Likewise.
* tests/builders.scm (url-fetch*): New procedure.
  Change tests to call 'url-fetch*' instead of 'url-fetch'.
* tests/packages.scm ("package-source-derivation, snippet"): Remove
  'store' parameter of 'fetch' and change it to use 'interned-file'
  instead of 'add-to-store'.
* gnu/packages/bootstrap.scm (bootstrap-origin)[boot]: Remove 'store'
  parameter.
2015-01-14 14:42:10 +01:00
Ludovic Courtès cf81a23639 guix package: Follow symlinks for pattern search paths.
* guix/scripts/package.scm (search-path-environment-variables): Add
  local 'files' variable.
* tests/packages.scm ("--search-paths with pattern"): New test.
2015-01-03 19:46:07 +01:00