Commit Graph

1664 Commits

Author SHA1 Message Date
David Thompson df3ce5c123 build: syscalls: Add pivot-root.
* guix/build/syscalls.scm (pivot-root): New procedure.
* tests/syscalls.scm ("pivot-root"): New test.
2015-07-07 21:16:25 -04:00
David Thompson 43ace6ea76 build: syscalls: Add setns.
* guix/build/syscalls.scm (setns): New procedure.
* tests/syscalls.scm ("setns"): New test.

squash: setns
2015-07-07 20:55:09 -04:00
David Thompson 8950ed11c6 build: syscalls: Add clone.
* guix/build/syscalls.scm (clone): New procedure.
  (CLONE_NEWNS, CLONE_NEWUTS, CLONE_NEWIPC, CLONE_NEWUSER, CLONE_NEWPID,
  CLONE_NEWNET): New variables.
* tests/syscalls.scm ("clone"): New test.
2015-07-07 20:35:08 -04:00
David Thompson db6e5e2b2c utils: Add call-with-temporary-directory.
* guix/utils.scm (call-with-temporary-directory): New procedure.
2015-07-07 18:47:25 -04:00
David Thompson b4abdeb63b build: syscalls: Add mkdtemp!
* guix/build/syscalls.scm (mkdtemp!): New procedure.
* tests/syscalls.scm ("mkdtemp!"): New test.
2015-07-07 18:46:44 -04:00
David Thompson b16d138a0a build: syscalls: Add unmount flags.
* guix/build/syscalls.scm (MNT_FORCE, MNT_DETACH, MNT_EXPIRE)
  (UMOUNT_NOFOLLOW): New variables.
2015-07-07 18:38:41 -04:00
David Thompson 577c02eb40 build: syscalls: Add additional mount flags.
* guix/build/syscalls.scm (MS_NOSUID, MS_NODEV, MS_NOEXEC, MS_STRICTATIME):
  New variables.
2015-07-07 18:38:41 -04:00
Ludovic Courtès a8afb9aed3 store: 'run-with-store' initializes %CURRENT-TARGET-SYSTEM to #f.
* guix/store.scm (run-with-store): Set %CURRENT-TARGET-SYSTEM to #f.
* tests/gexp.scm ("gexp->derivation vs. %current-target-system"): New test.
2015-07-08 00:06:45 +02:00
pjotrp 76ae915ec8 build: ruby: Run 'rake gem' when gemspec is missing.
* guix/build/ruby-build-system.scm (build): Run 'rake gem' when there is no
  gemspec in the source tree.

Co-Authored-By: David Thompson <davet@gnu.org>
2015-07-07 08:54:29 -04:00
Andy Patterson 075d99f195 substitute: Avoid infinite loop when updating the substitute list.
Reported
at <http://lists.gnu.org/archive/html/guix-devel/2015-07/msg00119.html>.

* guix/scripts/substitute.scm (http-multiple-get): When RESP has "Connection:
  close", consume HEAD anyway; always call PROC to read from BODY.

Co-authored-by: Ludovic Courtès <ludo@gnu.org>
2015-07-07 01:04:02 +02:00
Andreas Enge 9884d7ec8e download: Reference tls instead of renamed gnutls module.
* guix/download.scm (gnutls-package): Use new module name tls instead
  of gnutls.
2015-07-05 19:11:04 +02:00
Ludovic Courtès 4a6aeb670f derivations: Add #:substitutable?, distinguished from #:local-build?.
Fixes <http://bugs.gnu.org/18747>.

* guix/derivations.scm (substitutable-derivation?): Rewrite to check for
  "allowSubstitutes".
  (derivation): Add #:substitutable? parameter.
  [user+system-env-vars]: Honor it.
  (build-expression->derivation): Add #:substitutable? and honor it.
* guix/gexp.scm (gexp->derivation): Likewise.
* tests/derivations.scm ("derivation-prerequisites-to-build and substitutes,
  non-substitutable build"): Use #:substitutable? instead of #:local-build?.
  ("substitutable-derivation?", "derivation-prerequisites-to-build and
  substitutes, local build"): New tests.
* guix/download.scm (url-fetch): Adjust comment.
* guix/git-download.scm (git-fetch): Likewise.
* guix/build-system/gnu.scm (gnu-build, gnu-cross-build): Use #:substitutable?
  instead of #:local-build?.
* doc/guix.texi (Derivations, G-Expressions): Adjust accordingly.
2015-07-03 00:30:55 +02:00
Cyril Roelandt d2cef629fd scripts: environment: Return the exit status of the command.
* guix/scripts/environment.scm (guix-environment): Return the exit
  status of the command.
2015-07-02 21:47:24 +02:00
Ludovic Courtès 28de8d258b environment: Define 'GUIX_ENVIRONMENT'.
* guix/scripts/environment.scm (create-environment): Define 'GUIX_ENVIRONMENT'.
* doc/guix.texi (Invoking guix environment): Document it.
* gnu/system/shadow.scm (default-skeletons): Adjust 'PS1' depending on whether
  'GUIX_ENVIRONMENT' is defined.
2015-07-01 23:29:49 +02:00
Ludovic Courtès d70389c423 environment: Improve error reporting for '-l'.
This fixes two problems:

  1. Load errors would print an ugly backtrace.
  2. When FILE was an absolute name, 'load' was passed an incorrect file
     name.

* guix/scripts/environment.scm (options/resolve-packages): Use 'load*' instead
  of 'load'.
2015-07-01 23:29:49 +02:00
Ludovic Courtès 417c39f132 environment: For --ad-hoc, allow users to specify an output.
* guix/scripts/environment.scm (package+propagated-inputs): Add 'output'
  parameter.  Use it in return value.
  (options/resolve-packages): Use 'append-map' instead of 'map'.  For 'load'
  and 'expression', return all the outputs of the resulting package.  For
  'package', use 'specification->package+output' instead of
  'specification->package'.
  (guix-environment): Adjust uses of PACKAGES accordingly.
* doc/guix.texi (Invoking guix environment): Document it.
* tests/guix-environment.sh: Add test for --ad-hoc guile-bootstrap:out.
2015-07-01 23:29:49 +02:00
Ludovic Courtès ce367ef3a9 environment: Add --system.
* guix/scripts/environment.scm (show-help, %options): Add -s/--system.
  (%default-options): Add 'system' pair.
  (guix-environment): Pass 'system' value from OPTS to 'lower-inputs'.
* doc/guix.texi (Invoking guix environment): Document it.
2015-07-01 23:29:49 +02:00
Ludovic Courtès 6b6298ae39 environment: Add only the specified outputs of the dependencies.
Before that, 'guix environment guile' (for instance) would define environment
variables that would refer to the "include" output of Bash, the "debug" output
of libgc, etc., even though these are not listed as inputs in the recipe of
'guile'.

* guix/gexp.scm (lower-inputs): Export.
* guix/scripts/environment.scm (evaluate-input-search-paths): Remove
  'derivations' parameter; add 'search-paths'.  Expect 'inputs' to be
  a list of tuples.  Adjust callers.
  (create-environment): Remove 'derivations' parameter; add 'search-paths'.
  (show-search-paths): Likewise.
  (package+propagated-inputs): New procedure.
  (packages->transitive-inputs, packages+propagated-inputs): Remove.
  (build-inputs): Expect INPUTS to be a list of derivation tuples.
  (guix-environment): Compute INPUTS using 'package+propagated-inputs',
  'package->bag', and 'bag-transitive-inputs'.  Move 'run-with-store' higher.
* tests/guix-environment.sh: Add test with FINDUTILS-BOOT0.
2015-07-01 23:29:49 +02:00
Cyril Roelandt ff986890ec import: pypi: Detect inputs.
* guix/import/pypi.scm (python->package-name, maybe-inputs, compute-inputs,
  guess-requirements): New procedures.
* guix/import/pypi.scm (guix-hash-url): Now takes a filename instead of an
  URL as input.
* guix/import/pypi.scm (make-pypi-sexp): Now tries to generate the inputs
  automagically.
* tests/pypi.scm: Update the test.
2015-06-24 22:47:59 +02:00
Ludovic Courtès eae5b3fff5 linux-initrd: Produce cpio archives with zeroed timestamps, etc.
* guix/cpio.scm (file->cpio-header*): New procedure.
* gnu/build/linux-initrd.scm (write-cpio-archive): Add #:file->header argument
  to 'cpio:write-cpio-archive'.
2015-06-24 18:05:03 +02:00
Ludovic Courtès 7a18c3cc10 Add (guix cpio).
* guix/cpio.scm, tests/cpio.scm: New files.
* Makefile.am (MODULES): Add guix/cpio.scm.
  (SCM_TESTS): Add tests/cpio.scm.
2015-06-24 18:05:03 +02:00
Ludovic Courtès 8de3df72bc tests: Move 'file=?' to (guix tests).
* tests/nar.scm (file-tree-equal?)[file=?]: Move to...
* guix/tests.scm (file=?): ... here.  New procedure.
2015-06-24 18:05:03 +02:00
Mark H Weaver e5c35d9a7b licenses: Add the SGI Free Software License B, version 2.0.
* guix/licenses.scm (sgifreeb2.0): New variable.
2015-06-23 01:04:53 -04:00
Ludovic Courtès a8f996c605 size: Add '--map-file' option.
* guix/scripts/size.scm (profile->page-map): New procedures.
  (show-help, %options):  Add --map-file.
  (guix-size): Honor it.
* doc/guix.texi (Invoking guix size): Document it.
* doc/images/coreutils-size-map.png: New file.
* doc.am (dist_infoimage_DATA): Add it.
2015-06-21 23:39:12 +02:00
Ludovic Courtès a8aa84af39 size: Remove unused variables.
* guix/scripts/size.scm (ensure-store-item): Remove #:dry-run? parameter.
  (%options): Remove 'dry-run?' variable.
2015-06-21 23:39:11 +02:00
Mark H Weaver bf76d98789 Merge branch 'master' into core-updates 2015-06-21 14:30:22 -04:00
Ludovic Courtès 7833db1f30 gexp: 'local-file' canonicalizes its file argument.
Reported by Alex Kost <alezost@gmail.com>
at <http://lists.gnu.org/archive/html/guix-devel/2015-06/msg00235.html>.

* guix/gexp.scm (local-file): Add call to 'canonicalize-path'.
* tests/gexp.scm ("one local file, symlink"): New test.
2015-06-19 10:23:29 +02:00
Ludovic Courtès 69792b285c store: Memoize 'add-to-store' based on the result of 'lstat', not 'stat'.
* guix/store.scm (add-to-store): Change 'stat' call to 'lstat'.  Clarify
  docstring.
2015-06-19 10:23:29 +02:00
Ludovic Courtès 020f3e4156 gexp: 'local-file' now defaults to non-recursive.
Reported by Alex Kost <alezost@gmail.com>
at <http://lists.gnu.org/archive/html/guix-devel/2015-06/msg00235.html>.

* guix/gexp.scm (local-file): Change #:recursive? to default to #f.
* tests/gexp.scm ("one local file", "gexp->derivation, local-file"): Adjust
  calls to 'add-to-store' and 'interned-file' accordingly.
2015-06-19 10:23:28 +02:00
Mark H Weaver 2abf678682 Merge branch 'master' into core-updates 2015-06-18 01:32:37 -04:00
Ludovic Courtès fcc58db68b Add 'guix size'.
* guix/scripts/size.scm: New file.
* Makefile.am (MODULES): Add it.
  (SCM_TESTS): Add tests/size.scm.
* doc.am (SUBCOMMANDS): Add 'size'.
* po/guix/POTFILES.in: Add guix/scripts/size.scm.
* tests/size.scm: New file.
* doc/guix.texi (Packages with Multiple Outputs): Add xref to "Invoking guix
  size".
  (Invoking guix size): New node.
  (Invoking guix gc): Add index for "closure" and xref to the above.
* doc/contributing.texi (Submitting Patches): Use @enumerate for the check
  list.  Add item about 'guix size'.
2015-06-18 00:36:09 +02:00
Ludovic Courtès 39bee8a293 Add 'guix edit'.
* guix/scripts/edit.scm: New file.
* Makefile.am (MODULES): Add it.
* doc.am (SUBCOMMANDS): Add 'edit'.
* doc/guix.texi (Defining Packages): Add xref to "Invoking guix edit".
  (Invoking guix edit): New node.
* po/guix/POTFILES.in: Add it.
2015-06-18 00:25:49 +02:00
Ludovic Courtès 84189ebc66 Move 'specification->package+output' to (gnu packages).
* guix/scripts/package.scm (specification->package+output): Move to...
* gnu/packages.scm (specification->package+output): ... here
* guix/scripts/archive.scm (guix): Adjust accordingly.
2015-06-18 00:25:48 +02:00
Mark H Weaver 2c04921634 offload: Fix sorting bug in 'choose-build-machine'.
* guix/scripts/offload.scm (choose-build-machine)[undecorate]: Return the
  boolean result of pred instead of the best machine+slot.
2015-06-17 15:33:08 -04:00
Ludovic Courtès 55d1f529e1 gnu-maintenance: Use 'home-page' as an additional hint of "GNUness".
Reported by Rastus_Vernon on IRC.
Fixes 'gnu-package?' for GNUcash.

* guix/gnu-maintenance.scm (gnu-package?)[gnu-home-page?]: New procedure.  Use
  it to determine whether PACKAGE is GNU.
2015-06-16 10:31:12 +02:00
Mark H Weaver bcf2971f6e Merge branch 'master' into core-updates
Conflicts:
	gnu/packages/commencement.scm
	gnu/packages/xml.scm
2015-06-14 08:49:42 -04:00
Eric Bavier 6508ce55e9 build-system/haskell: install config for any package that creates it.
A Cabal package is allowed to declare an "empty" library, in an
otherwise executable-only package, for the purpose of allowing Cabal
to use it as a dependency for other packages.  See e.g. hspec-discover.

* guix/build/haskell-build-system.scm (register): Unconditionally call
  setup script with "register", and install any config file generated.
2015-06-11 18:55:49 -05:00
Eric Bavier b4b1fe9d2f profiles: Process ghc conf files only once.
A package may be listed in the manifest inputs multiple times.  Avoid
copying ghc *.conf files twice by deleting duplicates.

* guix/profiles.scm (ghc-package-cache-file)[conf-files]: Delete
  duplicate manifest inputs before copying conf files.
2015-06-11 18:55:48 -05:00
Eric Bavier 84de458ba8 profiles: Search for ghc conf files only if package db exists.
This avoids having 'find-files' report warnings about searching in
non-existent directories.

* guix/profiles.scm (ghc-package-cache-file)[conf-files]: Only search
  for *.conf files if the search directory exists.
2015-06-11 18:55:48 -05:00
Ludovic Courtès ad7c1a2cde records: Remove unnecessary 'begin'.
* guix/records.scm (define-record-type*): Remove unnecessary 'begin'.
2015-06-11 23:33:32 +02:00
Ludovic Courtès 79477def6b tests: Write the random seed to the error port.
* guix/tests.scm (random-seed): New procedure.
  (%seed): Use it, and write the random seed to the error port.
2015-06-11 23:33:32 +02:00
Ludovic Courtès 0004c5904c packages: Make 'location' field innate.
* guix/packages.scm (<package>)[location]: Add 'innate' property.
* guix/build-system/gnu.scm (static-package): Remove 'loc' parameter and
  'location' field.
* gnu/packages/autotools.scm (autoconf-wrapper): Remove 'location' field.
* gnu/packages/commencement.scm (gnu-make-boot0, diffutils-boot0, gcc-final):
  Likewise.
* gnu/packages/cross-base.scm (cross): Likewise.
* gnu/packages/emacs.scm (emacs-no-x, emacs-no-x-toolkit): Likewise.
* gnu/packages/make-bootstrap.scm (tarball-package): Likewise.
* gnu/packages/maths.scm (petsc-complex): Likewise.
2015-06-11 23:33:32 +02:00
Ludovic Courtès 8a16d064fa records: Add support for 'innate' fields.
* guix/records.scm (make-syntactic-constructor): Add #:innate parameter.
  [record-inheritance]: Honor it.
  [innate-field?]: New procedure.
  (define-record-type*)[innate-field?]: New procedure.
  Pass #:innate to 'make-syntactic-constructor'.
* tests/records.scm ("define-record-type* & inherit & innate",
  "define-record-type* & thunked & innate"): New tests.
2015-06-11 23:33:32 +02:00
Ludovic Courtès 792798f486 records: "options" → "properties".
* guix/records.scm (define-record-type*): Change "options" to "properties".
2015-06-11 23:33:32 +02:00
Ludovic Courtès faef3b6a96 records: Factorize field property predicates.
* guix/records.scm (define-field-property-predicate): New macro.
  (define-record-type*)[thunked-field?, delayed-field?]: Use it.
2015-06-11 23:33:32 +02:00
Ludovic Courtès b9c8647337 records: Separate default-value handling.
* guix/records.scm (make-syntactic-constructor)[default-values]: New
  variable.
  [field-default-value]: New procedure.
  Use them.
2015-06-11 23:33:32 +02:00
Ludovic Courtès 39fc041a7d records: Replace 'eval-when' with a proper 'define-syntax'.
* guix/records.scm (make-syntactic-constructor): Remove enclosing
  'eval-when'.  Turn into a 'syntax-rules' macro.
2015-06-11 23:33:32 +02:00
Ludovic Courtès a43b55f1a6 guix build: Allow directories to be passed to --with-source.
* guix/scripts/build.scm (package-with-source)[tarball-base-name]: Gracefully
  handle file names that lack an extension.
  Pass #:recursive? #t to 'download-to-store'.
* guix/download.scm (download-to-store): Add #:recursive? parameter and pass
  it to 'add-to-store'.
* doc/guix.texi (Invoking guix build): Add an example of --with-source with a
  directory.
2015-06-11 11:19:12 +02:00
Ludovic Courtès c2590362ad environment: Connect to the store after the command line has been parsed.
* guix/scripts/environment.scm (guix-environment): Call 'parse-command-line'
  outside of 'with-store'.  This allows things like --help to run even if the
  daemon is not running.
2015-06-11 11:09:12 +02:00
Mark H Weaver 1492801655 Merge branch 'master' into core-updates 2015-06-10 17:50:27 -04:00
Ludovic Courtès 78acff7c11 guix system: init: Overwrite the items in the target store.
Fixes <http://bugs.gnu.org/20722>.
Reported by Eric Bavier <ericbavier@openmailbox.org>.

* guix/scripts/system.scm (copy-item): Check whether DEST exists and remove it
  if it does.
2015-06-10 10:31:47 +02:00
Ludovic Courtès 7522a0160b ui: Replace the global 'symlink' binding.
* guix/ui.scm (symlink): Set! the global symlink.
2015-06-10 10:25:16 +02:00
Federico Beffa a415474873 import: hackage: Refactor parsing code and add new options.
* guix/import/cabal.scm: New file.
* guix/import/hackage.scm: Update to use the new Cabal parsing module.
* tests/hackage.scm: Update tests.
* guix/scripts/import/hackage.scm: Add new '--cabal-environment' and '--stdin'
  options.
* doc/guix.texi: ... and document them.
* Makefile.am (MODULES): Add 'guix/import/cabal.scm',
  'guix/import/hackage.scm' and 'guix/scripts/import/hackage.scm'.
  (SCM_TESTS): Add 'tests/hackage.scm'.
2015-06-09 09:48:38 +02:00
Ludovic Courtès 751630c9c3 monads: Allow n-ary '>>=' expressions.
Suggested by Federico Beffa <beffa@fbengineering.ch>.

* guix/monads.scm (bind-syntax): New macro.
  (with-monad): Use it instead of 'identifier-syntax'.
* tests/monads.scm (">>= with more than two arguments"): New test.
* doc/guix.texi (The Store Monad): Explain that there can be several MPROC.
  Add an example.
2015-06-08 23:00:49 +02:00
Alex Kost 2a4e2e4b01 guix: Clean up --help messages.
* guix/scripts/import.scm (show-help): Add newline before a list of
  importers.
* guix/scripts/lint.scm (show-help): Split a long description line.
* guix/scripts/package.scm (show-help): Improve docstrings for --install
  and --remove options.
* guix/scripts/system.scm (show-help): Format actions the same way as
  guix commands and importers are formatted.
2015-06-08 11:46:05 +03:00
Ludovic Courtès 7770aafc75 guix gc: Add '--verify'.
* guix/scripts/gc.scm (show-help, %options): Add --verify.
  (guix-gc): Handle it.
* doc/guix.texi (Invoking guix gc): Document --verify, and move --optimize
  description right below it.
2015-06-06 19:05:56 +02:00
Ludovic Courtès c63d94035f store: Add 'verify-store' RPC.
* guix/store.scm (operation-id): Add 'verify-store'.
  (verify-store): New procedure.
  (set-build-options): Adjust comment.
* tests/store.scm ("verify-store", "verify-store + check-contents"): New
  tests.
2015-06-06 19:05:25 +02:00
Alex Kost d2aa12250e guix package: Fix typo in --help message.
* guix/scripts/package.scm (show-help): Align '--show' option properly.
2015-06-06 18:32:03 +03:00
Mark H Weaver c058f4eca2 licenses: Add the Open Publication License 1.0.
* guix/licenses.scm (opl1.0+): New variable.
2015-06-05 00:58:53 -04:00
Ludovic Courtès 558e8b11d7 gexp: Add 'plain-file'.
* guix/gexp.scm (<plain-file>): New type.
  (plain-file, plain-file-compiler): New procedures.
* tests/gexp.scm ("one plain file"): New test.
* doc/guix.texi (G-Expressions): Document 'plain-file'.
2015-06-03 11:47:36 +02:00
Ludovic Courtès 74d441abee gexp: Export <local-file> accessors.
* guix/gexp.scm (local-file-file, local-file-name, local-file-recursive?):
  Export.
2015-06-03 11:47:36 +02:00
Ludovic Courtès d7bc3470b7 gnu-maintenance: latest-release: Honor releases that are not in subdirs.
Reported by Mark H Weaver.

* guix/gnu-maintenance.scm (latest-release): Add 'result' parameter to
  'loop'.  When entering a sub-directory, use the current directory's latest
  release as 'result'.  This fixes the code for 'gnu-pw-mgr' and 'sharutils'.
2015-06-02 21:55:30 +02:00
Ludovic Courtès 2b5115f8ba lint: source: Warn only when all the URIs are unreachable.
* guix/scripts/lint.scm (call-with-accumulated-warnings): New procedure.
  (with-accumulated-warnings): New macro.
  (check-source): Add 'try-uris' and use it.  Emit warnings only upon
  failure.
2015-05-31 23:25:46 +02:00
Ludovic Courtès 91a0b9cc0b lint: 'validate-uri' really returns #f on failure.
* guix/scripts/lint.scm (validate-uri): Always return #f on failure.
2015-05-31 23:13:09 +02:00
Ludovic Courtès 1a706ff5cf base32: Use a custom error condition instead of 'misc-error'.
Suggested by Christopher Allan Webber <cwebber@dustycloud.org>.

* guix/base32.scm (&invalid-base32-character): New error condition.
  (make-base32-string->bytevector): Use it instead of 'error'.
* tests/base32.scm ("&invalid-base32-character"): New test.
2015-05-31 22:39:48 +02:00
Ludovic Courtès 23185ceadc ui: Do not call 'display-error' for SRFI-34 exceptions.
* guix/ui.scm (report-load-error, warn-about-load-error, read/eval): Add
  clause for SRFI-34 exceptions.
2015-05-31 22:39:48 +02:00
Alex Kost 307153c1ef emacs: Report about "search paths" after operation.
* guix/scripts/package.scm: Export 'display-search-paths'.
* emacs/guix-main.scm (process-package-actions): Use it.
2015-05-29 20:54:54 +03:00
David Thompson a54bd6d72d guix environment: Add --ad-hoc option.
* guix/scripts/environment.scm (%options): Add "ad-hoc" option.
  (show-help): Display help for "--ad-hoc".
  (packages+propagated-inputs): New procedure.
  (guix-environment): Create ad hoc environment when asked.
* doc/guix.texi ("invoking guix environment"): Document it.
2015-05-28 20:52:52 -04:00
Ludovic Courtès 1ba4796d13 profiles: Deal with non-directory items in share/icons.
Reported by Mark H Weaver <mhw@netris.org>.

* guix/profiles.scm (gtk-icon-themes)[build]: Check whether DIR is a directory
  before calling 'ensure-writable-directory'.
2015-05-28 14:41:15 +02:00
Ludovic Courtès 6a669bda51 profiles: Export 'ensure-writable-directory' and use it.
* guix/build/profiles.scm (ensure-writable-directory): Export.
* guix/profiles.scm (gtk-icon-themes)[build]: Remove '@@' form and use (guix
  build profiles).
2015-05-27 22:36:52 +02:00
Ludovic Courtès 102f7101b9 profiles: Don't assume all the inputs are of a package are packages.
Reported by Ricardo Wurmus.

* guix/profiles.scm (gtk-icon-themes)[entry-lookup-gtk+](find-among-packages):
  Rename to...
  (find-among-inputs): ... this.  Check whether INPUT is a package before
  calling 'package-name'.  Fixes a regression introduced in b04af0e.
2015-05-27 22:31:56 +02:00
宋文武 eeae0b3c6c profiles: Use 'derivation?' to filter hooks.
Fixes a regression introduced in 07eaecfa.

* guix/profiles.scm (profile-derivation): Use 'derivation?' instead of
  'gexp?' to filter hooks.
2015-05-27 21:03:21 +08:00
宋文武 b04af0ec67 profiles: Add gtk-icon-themes hook.
* guix/profiles.scm (gtk-icon-themes): New function.
  (%default-profile-hooks): Add it.
2015-05-27 20:58:27 +08:00
Ludovic Courtès b734996f9c monads: 'foldm', 'mapm', and 'anym' now take a list of regular values.
* guix/monads.scm (foldm, mapm, anym): Change to take a list of regular
  values as is customary.
* tests/monads.scm ("mapm", "anym"): Adjust accordingly.
2015-05-27 09:44:43 +02:00
Ludovic Courtès 07eaecfae1 profiles: Hooks always return a monadic value.
Suggested by 宋文武 <iyzsong@gmail.com>.

* guix/profiles.scm (ghc-package-cache-file): Return a monadic #f, not just
  #f, when MANIFEST contains no GHC package.
  (profile-derivation): Do not filter based on the return value of HOOK;
  instead filter based on the value of items in EXTRAS.
2015-05-26 23:38:27 +02:00
Ludovic Courtès 41766807d0 ui: Improve error reporting for 'read/eval'.
The effect is visible on commands like:

  guix build -e '(+ 2 "foo")'
  guix build -e '()'

* guix/ui.scm (read/eval): Change handler to properly report syntax errors and
  use 'display-error' for other errors.
2015-05-26 22:38:17 +02:00
Cyrill Schenkel cdb5b075d5 gc: ignore trailing slash or subdirectories for `guix gc -d'
Fixes <http://bugs.gnu.org/19757>.

* guix/scripts/gc.scm (guix-gc): Convert paths to direct store paths.
* guix/store.scm (direct-store-path): Get rid of subdirectories in store path.
* tests/guix-gc.sh: New tests.

Co-authored-by: Ludovic Courtès <ludo@gnu.org>
2015-05-26 22:26:01 +02:00
Ludovic Courtès db030303b8 guix system: Add '--on-error'.
* guix/ui.scm (load*): Add #:on-error parameter.
  [tag, error-string]: New variables.
  Wrap 'load' call in 'call-with-prompt'.  Pass TAG to 'make-stack'.  Honor
  ON-ERROR after 'report-load-error' call.
  (report-load-error): Change to not exit on error.  Make private.
* guix/scripts/system.scm (show-help, %options): Add --on-error.
  (guix-system): Use 'load*' and pass it #:on-error.
2015-05-25 22:52:41 +02:00
Ludovic Courtès 5f1087c481 guix package: --manifest DTRT when combined with --dry-run.
* guix/scripts/package.scm (guix-package)[process-actions]: Process 'manifest
  action regardless of whether 'dry-run? is set.  Adjust the message
  accordingly.
* tests/guix-package.sh: Add error-reporting test.
2015-05-25 21:34:23 +02:00
Ludovic Courtès 2abcc97fd1 ui: Auto-compile user code, and improve error reporting.
Reported by Christian Grothoff.

* guix/ui.scm (load*): Add 'frame-with-source'.  Set
  %load-should-auto-compile.  Change error handle to just (exit 1).  Add
  pre-unwind handler to capture the stack and call 'report-load-error'.
  (report-load-error): Add optional 'frame' parameter and pass it to
  'display-error'.
* tests/guix-system.sh: Add "unbound variable" test.
2015-05-25 21:34:23 +02:00
Ludovic Courtès 6ec1f4caa3 ui: Make 'symlink' replacement more future-proof.
* guix/ui.scm (symlink): Change next-to-last 'throw' argument to explicitly
  ignore ARGS; change last argument to (list errno).
2015-05-24 17:29:14 +02:00
Ludovic Courtès 9b14107f2d ui: Add 'copy-file' replacement with better error reporting.
* guix/ui.scm (copy-file): New procedure.
2015-05-24 17:27:36 +02:00
Ludovic Courtès f245b03deb guix system: init: Copy the closure of 'grub.cfg', not that of the system.
Fixes <http://bugs.gnu.org/20591>.
Reported by Daniel Pimentel <d4n1@openmailbox.org>.

* guix/scripts/system.scm (install): Copy the closure of GRUB.CFG rather than
  that of OS-DIR.
2015-05-24 17:20:24 +02:00
Ludovic Courtès 328639e48f guix system: Always add zero previous entries in grub.cfg for 'init'.
* guix/scripts/system.scm (grub.cfg): Remove.
  (perform-action): Call 'operating-system-grub.cfg' with the empty list as
  the 2nd argument when ACTION is 'init.
2015-05-24 17:15:16 +02:00
Ludovic Courtès 4a35a866be guix system: init: Make sure the target is root-owned.
Suggested by Mark H Weaver <mhw@netris.org>.

* guix/scripts/system.scm (install): Add 'chown' and 'chmod' calls for TARGET
  when running as root, and warn otherwise.
2015-05-24 00:26:12 +02:00
Ludovic Courtès 60a56db007 services: swap: Use 'restart-on-EINTR'.
* gnu/services/base.scm (swap-service)[start, stop]: Use 'restart-on-EINTR'.
* guix/build/syscalls.scm (swapoff): Fix typo in 'throw' arguments.
2015-05-22 11:51:12 +02:00
Ludovic Courtès ea98270443 syscalls: Add 'restart-on-EINTR'.
* guix/build/syscalls.scm (call-with-restart-on-EINTR): New procedure.
  (restart-on-EINTR): New macro.
2015-05-22 11:51:12 +02:00
Ludovic Courtès a4b1a6b65e guix package: Adjust --help message.
* guix/scripts/package.scm (show-help): Add KIND parameter for
  --search-paths as a followup to dbc31ab.
2015-05-21 21:33:18 +02:00
David Thompson 2d977638c9 scripts: Move 'set-build-options-from-command-line*' to (guix scripts build) module.
* guix/scripts/build.scm (set-build-options-from-command-line*): New
  procedure.
* guix/scripts/environment.scm (set-build-options-from-command-line*): Delete.
2015-05-21 08:29:47 -04:00
David Thompson 4d043ab628 ui: Deduplicate 'show-what-to-build*'.
* guix/ui.scm (show-what-to-build*): New procedure.
* guix/scripts/environment.scm (show-what-to-build*): Delete.
* guix/scripts/system.scm (show-what-to-build*): Likewise.
* build-aux/make-binary-tarball.scm (show-what-to-build*): Likewise.
2015-05-21 08:29:47 -04:00
Ludovic Courtès 5ae4169c5f packages: Use packages from '%final-inputs' as the default patch inputs.
Reported by Manolis Ragkousis <manolis837@gmail.com>
at <http://lists.gnu.org/archive/html/guix-devel/2015-05/msg00059.html>.

* guix/packages.scm (%standard-patch-inputs): Add 'canonical', and use
  it in 'ref'.
2015-05-21 15:28:01 +03:00
David Thompson 1b6764477f package: Add --manifest option.
* guix/scripts/package.scm (show-help): Add help text.
  (%options): Add manifest option.
  (guix-package): Add manifest option handler.
* doc/guix.texi ("Invoking guix package"): Document it.
* tests/guix-package.sh: Add test.
2015-05-20 12:13:04 -04:00
David Thompson 8404ed5c3e profiles: Add 'packages->manifest' procedure.
* guix/profiles.scm (packages->manifest): New procedure.
2015-05-20 12:13:04 -04:00
David Thompson 7ea1432e22 ui: Factorize user-provided Scheme file loading.
* guix/ui.scm (make-user-module, load*): New procedures.
* guix/scripts/system.scm (%user-module): Define in terms of
  'make-user-module'.
  (read-operating-system): Define in terms of load*'.
2015-05-20 12:13:04 -04:00
Ludovic Courtès 820a40327d ftp-client: Throw when log-in fails.
* guix/ftp-client.scm (ftp-open): When '%ftp-listen' returns something
  different from 220, throw instead of writing an error message.
2015-05-20 12:13:39 +02:00
Ludovic Courtès dbc31ab25c guix package: Add optional argument to --search-paths.
* guix/scripts/package.scm (search-path-environment-variables): Add #:kind
  parameter.  Pass it to 'environment-variable-definition'.
  (display-search-paths): Add #:kind parameter and pass it to
  'search-path-environment-variables'.
  (%options): Add an optional parameter for "--search-paths".
  (guix-package)[process-query]: Handle it.
* tests/guix-package-net.sh: Adjust existing test.
* tests/guix-package.sh: Adjust existing tests and add new test.
* doc/guix.texi (Invoking guix package): Document it.
2015-05-20 12:13:39 +02:00
Ludovic Courtès 755e1147aa guix package: --search-paths mentions $PATH.
* guix/scripts/package.scm (search-path-environment-variables): Add $PATH to
  SEARCH-PATHS.
2015-05-20 12:13:38 +02:00
Ludovic Courtès 38d2778608 guix gc: Add '--optimize'.
* guix/scripts/gc.scm (show-help, %options): Add --optimize.
  (guix-gc): Handle it.
2015-05-19 16:09:58 +02:00
Ludovic Courtès e3fd0ce696 store: Add 'optimize-store' RPC.
* guix/store.scm (operation-id): Add 'optimize-store'.
  (optimize-store): New procedure.
2015-05-19 16:09:58 +02:00
Ludovic Courtès 113c17a0c9 profiles: Gracefully deal with packages containing an etc/ symlink.
This fixes a bug whereby 'guix package -i gcc-toolchain' would fail in
'build-profile'.  This is because in 'gcc-toolchain', etc/ is a symlink,
and so the 'scandir' call in 'unsymlink' would return #f instead of
returning a list.

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

* guix/build/profiles.scm (ensure-writable-directory)[unsymlink]: Append
  "/" to TARGET before calling 'scandir'.
* tests/profiles.scm ("etc/profile when etc/ is a symlink"): New test.
2015-05-18 09:47:29 +02:00
Ludovic Courtès 6944fdbdbd syscalls: Add 'set-network-interface-up'.
* guix/build/syscalls.scm (set-network-interface-up): New procedure.
2015-05-17 23:20:59 +02:00
Taylan Ulrich Bayırlı/Kammer 2fdcc6074e packages: Use %store-directory.
* guix/packages.scm (patch-and-repack): Call %store-directory instead of
  duplicating its code.
2015-05-15 16:42:54 +02:00
Ludovic Courtès 9e2292ef3d publish: Add '--listen'.
* guix/scripts/publish.scm (show-help, %options): Add --listen.
  (getaddrinfo*): New procedure.
  (%default-options): Add 'address'.
  (open-server-socket): Replace 'addr' and 'port' with 'address', a
  sockaddr.
  (guix-publish): Adjust accordingly.  Augment "publishing" message with
  the actual address.
* doc/guix.texi (Invoking guix publish): Document it.
2015-05-12 21:22:52 +02:00
Ludovic Courtès 5463fe512a publish: Add '--user' option.
* guix/scripts/publish.scm (show-help): Add --user.
  (%options): Likewise.
  (run-publish-server): Change 'port' parameter to 'socket'.  Pass
  #:socket instead of #:addr and #:port to 'run-server'.  Update caller
  accordingly.
  (open-server-socket, gather-user-privileges): New procedures.
  (guix-publish): Use them.  Force %PRIVATE-KEY and %PUBLIC-KEY early
  on.  Warn when running as root.
* doc/guix.texi (Invoking guix publish): Document --user.
2015-05-12 21:22:52 +02:00
Ludovic Courtès 005c8fc6e0 http-client: Remove monkey patching for 2.0.5.
* guix/http-client.scm (read-response-body*): Remove.
  (http-fetch): Remove hacks for 2.0.5.
2015-05-10 11:07:51 +02:00
Ludovic Courtès 09d809db6a Remove assorted Guile 2.0.5 workarounds.
* guix/scripts/authenticate.scm (%default-port-conversion-strategy):
  Remove.
* guix/scripts/substitute.scm (fetch): Remove 2.0.5 special cases.
* guix/serialization.scm (write-file): Remove 'scandir' workaround.
* guix/ui.scm (command-files): Likewise.
2015-05-10 11:07:51 +02:00
Ludovic Courtès a0dac7a01f profiles: Ensure the profile's etc/ directory is writable.
Reported by 宋文武 <iyzsong@gmail.com>.

* guix/build/profiles.scm (build-etc/profile,
  ensure-writable-directory): New procedures.
  (build-profile): Use them.
* tests/profiles.scm ("etc/profile when etc/ already exists"): New test.
2015-05-08 16:35:32 +02:00
Ludovic Courtès d664f1b431 profiles: Generate an 'etc/profile' file.
Suggested by 宋文武 <iyzsong@gmail.com>
in <http://bugs.gnu.org/20255>.

* guix/build/profiles.scm (abstract-profile,
  write-environment-variable-definition): New procedures.
  (build-profile): Add #:search-paths parameter.  Create
  OUTPUT/etc/profile.
* guix/profiles.scm (profile-derivation)[builder]: Add 'search-paths'
  variable and pass it to 'build-profile'.  Adjust #:modules argument.
* tests/profiles.scm ("etc/profile"): New test.
* doc/guix.texi (Invoking guix package): Mention etc/profile.
2015-05-06 18:26:54 +02:00
Ludovic Courtès 611adb1ee5 profiles: Move build code to (guix build profiles).
* guix/build/profiles.scm: New file.
* Makefile.am (MODULES): Add it.
* guix/profiles.scm (profile-derivation)[builder]: Call out to
  'build-profile'.
  Add (guix build profiles) to the #:modules argument.
2015-05-06 18:26:54 +02:00
Ludovic Courtès d838e70298 search-paths: Export 'string-tokenize*'.
* guix/search-paths.scm (string-tokenize*): Export.
* tests/utils.scm ("string-tokenize*"): Adjust accordingly.
2015-05-06 18:26:53 +02:00
Ludovic Courtès 7623848343 download: Work around Guile small-receive-buffer bug.
Previously, code using directly (guix build download) was still affected
by <http://bugs.gnu.org/15368>.  This includes source derivations, the
'guix download' command, and (guix gnu-maintenance).

'guix substitute' was unaffected since it used (guix http-client), which
already had the fix.

* guix/http-client.scm (open-socket-for-uri): Remove.
  (http-fetch): Remove #:buffered? argument to 'open-socket-for-uri';
  use 'setvbuf' instead.
* guix/scripts/substitute.scm (fetch): Likewise.
* guix/build/download.scm (open-socket-for-uri): New procedure, taken
  from guix/http-client.scm, but without the #:buffered? parameter.
2015-05-06 10:31:11 +02:00
Ludovic Courtès c822fb8e34 download: Reinstate buffering on connection sockets.
* guix/build/download.scm (open-connection-for-uri): Reinstate call to
  'setvbuf' inadvertently removed in d17551d9.
2015-05-06 09:50:15 +02:00
Ludovic Courtès 8e3a3bc290 environment: Move iteration outside of 'for-each-search-path'.
* guix/search-paths.scm (search-path-definition): New procedure.
* guix/scripts/environment.scm (for-each-search-path): Rename to...
  (evaluate-input-search-paths): ... this.  Remove 'proc' and 'pure?'
  parameters, and return directly the list of search-path/value pairs.
  (create-environment): Use 'for-each' and 'evaluate-input-search-paths'
  instead of 'for-each-search-path'.
  (show-search-paths): Use 'for-each', 'search-path-definition', and
  'evaluate-search-paths' instead of 'for-each-search-path'.
2015-05-05 15:13:59 +02:00
Ludovic Courtès b9ea6c6bf4 environment: Use 'evaluate-search-paths'.
This allows 'guix environment' to correctly handle non-directory
and/or pattern search-path specifications, such as that for
'XML_CATALOG_FILES'.

* guix/scripts/environment.scm (for-each-search-path): Use
  'evaluate-search-paths' instead of 'search-path-as-list' & co.
2015-05-05 15:13:59 +02:00
Ludovic Courtès fdfa753c69 search-paths: Define the 'PATH' environment variable.
* guix/search-paths.scm ($PATH): New variable.
* guix/scripts/environment.scm (for-each-search-path): Use it.
2015-05-05 15:13:58 +02:00
Ludovic Courtès 369149995c search-paths: 'evaluate-search-paths' can be passed a list of directories.
* guix/search-paths.scm (evaluate-search-paths): Change 'directory' to
  'directories', and adjust 'search-path-as-list' accordingly.
* guix/scripts/package.scm (search-path-environment-variables): Adjust
  call accordingly.
2015-05-05 15:13:58 +02:00
Ludovic Courtès c4e8d513f2 gnu-maintenance: 'gnu-package?' returns #t for R and for GNOME packages.
Reported by John Darrington.

* guix/gnu-maintenance.scm (gnu-package?)[mirror-type]: Add "gnome" to
  the list of GNU mirrors.  Return #f for "cran".
2015-05-05 15:13:57 +02:00
Ludovic Courtès 099a2c7055 environment: Use (guix search-paths).
* guix/scripts/environment.scm: Use (guix search-paths).  Fixes a
  regression introduced in e89431b.
2015-05-05 11:01:08 +02:00
Ludovic Courtès 954cea3ae6 records: Make 'make-syntactic-constructor' available at load/eval/expand.
* guix/records.scm (make-syntactic-constructor): Wrap in 'eval-when'.
2015-05-04 23:30:52 +02:00
Ludovic Courtès 88aab8e349 profiles: Use a &message error condition instead of 'error'.
* guix/profiles.scm (sexp->manifest): Use 'raise' instead of 'error'.
2015-05-04 23:30:52 +02:00
Ludovic Courtès 441cfb420a search-paths: 'evaluate-search-paths' now returns spec/value pairs.
* guix/search-paths.scm (evaluate-search-paths): Return
  specification/value pairs instead of variable/value pairs.
* guix/scripts/package.scm (search-path-environment-variables): Adjust
  accordingly.  Pass #:separator to 'environment-variable-definition'.
2015-05-04 23:30:52 +02:00
Ludovic Courtès b07901c0cc search-paths: Add 'environment-variable-definition'.
* guix/search-paths.scm (environment-variable-definition): New variable.
* guix/scripts/package.scm (search-path-environment-variables): Use it.
2015-05-04 23:30:52 +02:00
Ludovic Courtès 6568d2bd6e search-paths: Add 'evaluate-search-paths', from (guix scripts package).
* guix/scripts/package.scm (with-null-error-port,
  evaluate-search-paths): Move to...
* guix/search-paths.scm: ... here.
* guix/utils.scm (string-tokenize*): Move to...
* guix/search-paths.scm: ... here.
* tests/utils.scm ("string-tokenize*"): Adjust accordingly.
2015-05-04 23:30:51 +02:00
Ludovic Courtès e89431bf01 Move search path specifications to (guix search-paths).
* guix/packages.scm (<search-path-specification>,
  search-path-specification->sexp, sexp->search-path-specification):
  Move to...
* guix/search-paths.scm: ... here.  New file.
* Makefile.am (MODULES): Add it.
* guix/build-system/cmake.scm, guix/build-system/glib-or-gtk.scm,
  guix/build-system/gnu.scm, guix/build-system/haskell.scm,
  guix/build-system/perl.scm, guix/build-system/python.scm,
  guix/build-system/ruby.scm, guix/build-system/waf.scm,
  guix/profiles.scm, guix/scripts/package.scm: Use it.
2015-05-04 23:30:51 +02:00
Ludovic Courtès 5e6039a48b substitute: Increase TTL from 24h to 36h.
* guix/scripts/substitute.scm (%narinfo-ttl): Increase to 36h.
2015-05-04 23:30:51 +02:00
Eric Bavier 2087023dd4 guix: build: Fix indentation for --sources in help output.
* guix/scripts/build.scm (show-help)[--sources]: Make indentation
  consistent with other long options.
2015-05-04 14:16:39 -05:00
Ludovic Courtès 4e9f592058 guix package: Introduce 'evaluate-search-paths'.
* guix/scripts/package.scm (evaluate-search-paths): New procedure, with
  most of the code formerly in 'search-path-environment-variables'.
  (search-path-environment-variables): Use it.
2015-05-04 00:24:21 +02:00
Ludovic Courtès 3badccaa73 guix package: Move profile cleaning out of 'search-path-environment-variables'.
* guix/scripts/package.scm (user-friendly-profile): New procedure.
  (search-path-environment-variables): Remove 'profile' local variable.
  (display-search-paths): Explicitly call 'user-friendly-profile' for
  the argument to 'search-path-environment-variables'.
  (guix-package)[process-query]: Likewise.
2015-05-04 00:24:21 +02:00
Eric Bavier 2cdfe13dea guix: build: Add transitive source building.
* guix/scripts/build.scm (%options, options->derivations): Add --sources
  option.
* doc/guix.texi (Invoking guix build): Document --sources option.
* tests/guix-build.sh: Add tests.
2015-05-02 23:15:40 -05: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
Ludovic Courtès dedb17ad01 profiles: Store search paths in manifests.
Discussed in <http://bugs.gnu.org/20255>.

* guix/packages.scm (sexp->search-path-specification): New variable.
* guix/profiles.scm (<manifest-entry>)[search-paths]: New field.
  (package->manifest-entry): Initialize it.
  (manifest->gexp): Match it.  Wrap #$deps in (propagated-inputs ...).
  Emit (search-paths ...).  Increment version.
  (find-package): New procedure.
  (sexp->manifest)[infer-search-paths]: New procedure.
  Use it to initialize the 'search-paths' field for versions 0 and 1.
  Add case for version 2.
* guix/scripts/package.scm (search-path-environment-variables)[manifest-entry->package]:
  Remove.
  Use 'manifest-entry-search-paths' instead of 'manifest-entry->package'
  plus 'package-native-search-paths'.
* tests/profiles.scm ("profile-manifest, search-paths"): New test.
2015-05-02 23:57:11 +02:00
Ludovic Courtès b9212a5455 Merge branch 'core-updates' 2015-05-02 22:42:53 +02:00
Ludovic Courtès 2d51666bd0 build-system/gnu: 'dist-package' preserves the package's native inputs.
* guix/build-system/gnu.scm (dist-package)[native-inputs]: Preserve P's
  native-inputs.
2015-05-02 22:16:06 +02:00
Ludovic Courtès 16142b3c14 build-system/gnu: Adjust to removal of a "bin" output for Libtool.
* guix/build-system/gnu.scm (dist-package): Change libtool:bin input to
  just libtool.
2015-05-02 22:16:06 +02:00
Ludovic Courtès abcbda48c2 packages: Add '%hydra-supported-systems'.
* build-aux/hydra/gnu-system.scm (%hydra-supported-systems): Remove.
* guix/packages.scm (%hydra-supported-systems): New variable.
2015-05-01 16:05:40 +02:00
Ludovic Courtès bf4af30bb2 Merge branch 'master' into core-updates 2015-05-01 15:03:30 +02:00
Ludovic Courtès bc7d089a9c serialization: Adjust the permissive UTF-8 decoder to Guile 2.0.12ish.
* guix/serialization.scm (read-maybe-utf8-string): Use
  'set-port-encoding!' and 'set-port-conversion-strategy!' instead of
  setting '%default-port-encoding' and
  '%default-port-conversion-strategy'.  This accounts for Guile commit
  d574d96, which changes bytevector input ports to use ISO-8859-1.
2015-05-01 13:10:18 +02:00
Ludovic Courtès 310709ae58 substitute: Fix file descriptor leak in 'http-multiple-get'.
In practice we would not leak much since we reconnect after ~100
requests (with nginx running on hydra.gnu.org.)

* guix/scripts/substitute.scm (http-multiple-get): Call 'close-port'
  before 'connect'.
2015-05-01 12:50:27 +02:00
Ludovic Courtès 0d8831370f download: Honor the 'http_proxy' and 'https_proxy' env. vars.
Fixes <http://bugs.gnu.org/20402>.
Reported by Joshua Randall <jcrandall@alum.mit.edu>.

* guix/download.scm (url-fetch): Pass #:leaked-env-vars to
  'gexp->derivation'.
2015-05-01 00:06:18 +02:00
Ludovic Courtès c04681554d derivations: Add #:leaked-env-vars parameter.
Suggested by Joshua Randall <jcrandall@alum.mit.edu>
in <http://bugs.gnu.org/20402>.

* guix/derivations.scm (derivation): Add #:leaked-env-vars parameter.
  [user+system-env-vars]: Honor it.
* guix/gexp.scm (gexp->derivation): Add #:leaked-env-vars and pass it to
  'raw-derivation'.
* doc/guix.texi (Derivations, G-Expressions): Adjust accordingly.
2015-05-01 00:06:17 +02:00
Ludovic Courtès d17551d943 download: Simplify 'open-connection-for-uri' to support HTTP proxies.
Partly fixes <http://bugs.gnu.org/20402>.
Reported by Joshua Randall <jcrandall@alum.mit.edu>.

* guix/build/download.scm (open-connection-for-uri): Rewrite to be a
  small wrapper around 'open-socket-for-uri'.  This procedure was
  initially introduced in d14ecda to work around the lack of NSS modules
  during bootstrap but that has become unnecessary since 0621349, which
  introduced a bootstrap Guile that uses static NSS modules (from commit
  d3b5972.)
  On Guile >= 2.0.10, this allows the 'http_proxy' environment variable
  to be used.
2015-05-01 00:06:17 +02:00
Andreas Enge 4ac0d6444d Merge branch 'master' into core-updates. 2015-04-26 20:08:49 +02:00
Ludovic Courtès d074e2f991 build-system/{cmake,glib-or-gtk}: Add #:validate-runpath? parameter.
* guix/build-system/cmake.scm (cmake-build): Add #:validate-runpath?
  parameter and pass it to BUILDER.
* guix/build-system/glib-or-gtk.scm (glib-or-gtk-build): Likewise.
2015-04-23 18:52:40 +02:00
Ludovic Courtès 0bd4377566 build-system/gnu: #:validate-runpath? now defaults to #t.
* guix/build/gnu-build-system.scm (validate-runpath): Change default
  value of VALIDATE-RUNPATH? to #t.
2015-04-23 18:52:40 +02:00
Ludovic Courtès cb85eb5e65 build-system/gnu: Gracefully handle dangling symlinks.
Fixes <http://bugs.gnu.org/20081>.
Reported by Tomáš Čech <tcech@suse.cz>.

* guix/build/gnu-build-system.scm (patch-source-shebangs): Remove files
  that don't pass 'file-exists?'.
  (patch-generated-file-shebangs): Likewise.
2015-04-23 18:52:40 +02:00
Ludovic Courtès cd91504df2 gremlin: Add support for the expansion of $ORIGIN in RUNPATH.
* guix/build/gremlin.scm (expand-variable, expand-origin): New
  procedures.
  (validate-needed-in-runpath): Map 'expand-origin' to the RUNPATH field
  of DYNINFO.
* tests/gremlin.scm ("expand-origin"): New test.
2015-04-23 18:52:40 +02:00
Mark H Weaver fc34deea24 packages: Add armhf-linux to %supported-systems.
* guix/packages.scm (%supported-systems): Add "armhf-linux".
2015-04-22 17:25:28 -04:00
Ludovic Courtès 44fd6ef137 ui: Add 'symlink' replacement with better error reporting.
* guix/ui.scm (symlink): New procedure.
2015-04-20 22:37:20 +02:00
Ludovic Courtès f73286345e gexp: Add printers for <gexp-input> and <gexp-output>.
* guix/gexp.scm (write-gexp-input, write-gexp-output): New procedures.
  (<gexp-input>, <gexp-output>): Use them as printers.
2015-04-20 15:41:41 +02:00
Ludovic Courtès c568191a93 profiles: Create a CA certificate bundle only when it would be non-empty.
* guix/profiles.scm (ca-certificate-bundle): Create
  $output/etc/ssl/certs if and only if CA-FILES is non-empty.
2015-04-20 15:41:41 +02:00