Commit Graph

1215 Commits (58caebf0327aafe6240612f28c339f5a00cd2c92)

Author SHA1 Message Date
Mark H Weaver a813710a5f Merge branch 'master' into core-updates 2015-01-13 12:14:08 -05:00
Federico Beffa f5895dab8a build/glib-or-gtk-build-system: Fix 'generate-icon-cache'.
Reported by Mark H Weaver <mhw@netris.org>

* guix/build/glib-or-gtk-build-system.scm (generate-icon-cache): Add check for
  existence of icons directory.
2015-01-13 09:16:47 +01:00
Ludovic Courtès abebac4601 monads: Remove 'derivation-expression'.
* guix/monads.scm (lower-inputs, derivation-expression): Remove.
* tests/monads.scm (derivation-expression, "mlet* +
  derivation-expression"): Remove.
2015-01-12 23:33:08 +01:00
Ludovic Courtès 462a3fa36c monads: Rewrite 'text-file*' using gexps.
* guix/monads.scm (text-file*): Move to...
* guix/gexp.scm (text-file*): ... here.  Rewrite using gexps.
* tests/monads.scm ("text-file*"): Move to...
* tests/gexp.scm ("text-file*"): ... here.
2015-01-12 23:33:08 +01:00
Federico Beffa 61771a79ab guix: build/glib-or-gtk-build-system: Add support for GIO and XDG theming.
* guix/build/glib-or-gtk-build-system.scm (data-directories): Rename
  'schemas-directories' to 'data-directories' and add support for XDG theming
  data.

* guix/build/glib-or-gtk-build-system.scm (gio-module-directories): New
  function.

* guix/build/glib-or-gtk-build-system.scm (wrap-all-programs): Update names to
  reflect that we are dealing with more types of data and not only with
  schemas.  Add handling of GIO modules.

* guix/build-system/glib-or-gtk.scm (lower): Import the 'bin' output of GLib
  instead of 'out'.  This was an error since we need the program
  'glib-compile-schemas'.  Update the description.
2015-01-12 18:00:08 +01:00
Ludovic Courtès c06d140c03 derivations: Use a set for 'substitution-oracle'.
* guix/derivations.scm (substitution-oracle): Use sets instead of lists.
2015-01-11 23:50:01 +01:00
Ludovic Courtès ed3592a980 derivations: Use sets for 'derivations-prerequisites'.
This yields a 46% improvement in 'derivation-prerequisites' invocations
on the Emacs derivation.

* guix/derivations.scm (derivation-prerequisites): Add 'input-set'
  variable, and use it in iterations.
2015-01-11 23:50:01 +01:00
Ludovic Courtès d326767e64 Add (guix sets).
* guix/sets.scm, tests/sets.scm: New files.sets
* Makefile.am (MODULES, SCM_TESTS): Add them.
2015-01-11 23:50:01 +01:00
Mark H Weaver 7744885731 Merge branch 'master' into core-updates 2015-01-11 09:38:49 -05:00
Ludovic Courtès e9651e39b3 derivations: Add 'substitution-oracle' and use it.
This makes 'guix environment PACKAGE' significantly faster when
substitutes are enabled.  Before that, it would lead to many invocations
of 'guix substitute-binary', one per 'derivation-prerequisites-to-build'
call.  Now, all these are replaced by a single invocation.

* guix/derivations.scm (derivation-output-paths, substitution-oracle):
  New procedures.
  (derivation-prerequisites-to-build): Replace #:use-substitutes? with
  #:substitutable?.  Remove the local 'derivation-output-paths' and
  'substitutable?'.
* guix/ui.scm (show-what-to-build): Add 'substitutable?'.  Pass it to
  'derivation-prerequisites-to-build'.
  [built-or-substitutable?]: Use it instead of 'has-substitutes?'.
* tests/derivations.scm ("derivation-prerequisites-to-build and
  substitutes"): Use #:substitutable? instead of #:use-substitutes?.
2015-01-10 00:39:59 +01:00
Ludovic Courtès 0b6af195fe derivations: Add 'derivation-output-names'.
* guix/derivations.scm (derivation-output-names): New procedure.
  (derivation-prerequisites-to-build): Use it for #:outputs.
  (map-derivation): Likewise.
* tests/derivations.scm ("derivation-output-names"): New test.
2015-01-09 23:36:24 +01:00
Ludovic Courtès 4eb01e5442 build-system/gnu: Patch /usr/bin/file in all 'configure' files.
* guix/build/utils.scm (patch-/usr/bin/file): New procedure.
* guix/build/gnu-build-system.scm (patch-usr-bin-file): Rewrite using
  it.  Patch all the files returned by 'find-files' that are executable.
* gnu/packages/gawk.scm (gawk)[arguments]: Remove use of 'substitute*'
  for 'extension/configure'.
2015-01-09 23:29:20 +01:00
Eric Bavier d45dc6da5c import: Add CPAN importer.
* guix/import/cpan.scm, guix/scripts/import/cpan.scm, tests/cpan.scm:
  New files.
* Makefile.am (MODULE)[HAVE_GUILE_JSON]: Add them.
* guix/scripts/import.scm (importers): Add cpan.
* doc/guix.texi (Requirements): Mention `guix import cpan` as a user
  of guile-json.
  (Invoking guix import): Document new `guix import cpan` command.
2015-01-09 10:38:26 -06:00
Eric Bavier 694b317c2d tests: import: Factorize utility function.
* tests/pypi.scm (mock): Move this...
* guix/tests.scm: to here.
2015-01-09 10:38:25 -06:00
Eric Bavier 1ff2619bc1 import: Factorize utility functions.
* guix/import/pypi.scm (hash-table->alist, flatten, assoc-ref*,
  url-fetch, json-fetch): Pull procedures from here into...
* guix/import/utils.scm: Here and...
* guix/import/json.scm: Here.  New file.
* Makefile.am (MODULE)[HAVE_GUILE_JSON]: Add it.
* guix/import/gnu.scm (file-sha256): Move from here to...
* guix/hash.scm: Here.
* tests/pypi.scm (pypi->guix-package): Update mock module reference.
2015-01-09 10:33:24 -06:00
Eric Bavier c6cb82f5d5 import: gnu: Propagate the key-download argument.
* guix/import/gnu.scm (gnu->guix-package): Pass the key-download
  argument on to gnu-package->sexp.
2015-01-09 10:33:24 -06:00
Ludovic Courtès 8234fcf21a substitute-binary: Micro-optimize 'narinfo-sha256'.
* guix/scripts/substitute-binary.scm (narinfo-signature->canonical-sexp):
  Change "~a" to "~s" in error message.
  (%signature-line-rx): Remove.
  (narinfo-sha256): Use 'string-contains' instead of 'regexp-exec', and
  'string-take' instead of 'match:substring'.
2015-01-09 01:10:31 +01:00
Ludovic Courtès fb519bd831 records: Optimize 'recutils->alist' by avoiding regexps.
* guix/records.scm (%recutils-field-rx, %recutils-comment-rx,
  %recutils-plus-rx): Remove.
  (%recutils-field-charset): New variable.
  (recutils->alist): Adjust to use tests (string-ref line 0) instead of
  regexps.
2015-01-09 01:08:10 +01:00
Ludovic Courtès b2ad9d9b08 base64: Inline arithmetic operations.
* guix/base64.scm (define-alias): New macro.
  (fxbit-field, fxarithmetic-shift, fxarithmetic-shift-left, fxand,
  fxior, fxxor): New aliases.
2015-01-09 01:01:04 +01:00
Mark H Weaver 3f00ff8b43 gnu: Add toolchain support for 'armhf-linux'.
Based on preliminary work by John Darrington <john@darrington.wattle.id.au>.

* gnu/packages/cross-base.scm (xgcc-armhf): New variable.
* gnu/packages/gcc.scm (gcc-configure-flags-for-triplet): Add armhf case.
  (gcc-4.7)[pre-configure]: Add gcc/config/*/linux-eabi.h to the list
  of files in which to patch GLIBC_DYNAMIC_LINKER.
* gnu/packages/bootstrap.scm (glibc-dynamic-linker): Add armhf case.
* guix/utils.scm (gnu-triplet->nix-system, nix-system->gnu-triplet):
  Add armhf cases.
2015-01-07 16:27:55 -05:00
Mark H Weaver 8eb8048432 Move 'nix-system->gnu-triplet' to (guix utils) and export it.
* gnu/packages/commencement.scm (nix-system->gnu-triplet): Move to...
* guix/utils.scm (nix-system->gnu-triplet): ... here.  Fix docstring typo.
2015-01-07 12:34:10 -05:00
Mark H Weaver 23800e4736 Merge branch 'master' into core-updates 2015-01-06 12:57:15 -05:00
宋文武 9331ba5dd9 linux-boot: Make /etc/mtab a symlink to /proc/self/mounts.
Fixes <http://bugs.gnu.org/19491>.

* gnu/build/linux-boot.scm (mount-root-file-system): Make /root/etc/mtab
  a symlink to /proc/self/mounts.
* gnu/build/file-systems.scm (mount-file-system): Don't update /etc/mtab.
* guix/build/syscalls.scm (mount, umount): Have #:update-mtab? default to
  #f.
2015-01-05 22:24:00 +08:00
Ludovic Courtès 828c0bec6b pk-crypto: Improve docstring of signature-related procedures.
* guix/pk-crypto.scm (bytevector->hash-data, sign): Augment docstring.
2015-01-04 22:46:51 +01:00
Ludovic Courtès ac70048be2 build-system/gnu: Use executables from the target inputs in 'patch-shebangs'.
Fixes <http://bugs.gnu.org/18895>.

* guix/build/gnu-build-system.scm (patch-shebangs): Add #:inputs
  parameter.  Remove 'bindirs'.  Add 'bin-directories',
  'output-bindirs', and 'input-bindirs'.  Use them instead of (getenv
  "PATH") to as the argument to 'patch-shebang'.
2015-01-04 18:16:16 +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
Mark H Weaver 8cbb67e045 Merge branch 'master' into core-updates 2014-12-30 12:23:32 -05:00
Ludovic Courtès 7da473b757 gnu: Revert use of '--strip-all'.
This reverts commits f05bdc9412
and 856ae5e6c7.

This broke all sorts of things.  See <http://hydra.gnu.org/eval/102058>,
for example.
2014-12-29 21:54:12 +01:00
Ludovic Courtès dd8ea244f4 download: Export 'maybe-expand-mirrors'.
* guix/build/download.scm (uri-vicinity, maybe-expand-mirrors): New
  procedures.
  (url-fetch): Remove them from here.
2014-12-29 21:19:17 +01:00
Ludovic Courtès 8b385969cf tests: Factorize the 'dummy-package' macro.
* guix/tests.scm (dummy-package): New macro.
* tests/lint.scm (dummy-package): Remove.
* tests/packages.scm (dummy-package): Remove.
2014-12-29 21:18:12 +01:00
Ludovic Courtès 907c98acbb lint: Add tests for the 'home-page' checker.
Suggested by Cyril Roelandt <tipecaml@gmail.com>.

* tests/lint.scm (%http-server-port, %http-server-socket, %local-url,
  stub-http-server): New variables.
  (http-write, call-with-http-server): New procedures.
  (with-http-server): New macro.
  ("home-page: wrong home-page", "home-page: invalid URI", "home-page:
  host not found", "home-page: Connection refused", "home-page: 200",
  "home-page: 404"): New tests.
* guix/scripts/lint.scm (check-home-page): Export.
2014-12-29 21:17:36 +01:00
Ludovic Courtès f05bdc9412 gnu: Don't use --strip-all in cases where this is problematic.
This is a followup to 856ae5e.  See <http://hydra.gnu.org/build/180506>
for an example of build failure.

* guix/build/gnu-build-system.scm (strip): Add #:archive-strip-flags
  parameter.  Use it when (ar-file? path).
* guix/build-system/gnu.scm (gnu-build): Add #:archive-strip-flags
  parameter and pass it down.
* gnu/packages/commencement.scm (gcc-boot0)[arguments]: Add
  #:strip-flags.
* gnu/packages/base.scm (glibc)[arguments]: Likewise.
2014-12-28 23:46:59 +01:00
Ludovic Courtès c79c6e598a lint: Report on the package being checked.
* guix/scripts/lint.scm (run-checkers): Check
  whether (current-error-port) is a tty, and print the package being
  checked and the checker currently running when it is.
2014-12-28 18:21:53 +01:00
Ludovic Courtès a3bf096945 lint: Add 'home-page' checker.
* guix/build/download.scm (open-connection-for-uri): Export.
* guix/scripts/lint.scm (probe-uri, check-home-page): New procedures.
  (%checkers): Add 'home-page' checker.
2014-12-28 17:57:36 +01:00
Ludovic Courtès cc9a5c1454 guix package: Use 'search-path-as-list' instead of custom code.
This will handle the new 'file-type' and 'file-pattern' fields correctly.

* guix/scripts/package.scm (search-path-environment-variables)[search-path-definition]:
  Rewrite in terms of 'search-path-as-list'.
2014-12-27 23:46:10 +01:00
Ludovic Courtès bd2fc4d813 utils: Export 'search-path-as-list'.
* guix/build/utils.scm (search-path-as-list): Make public.
* guix/scripts/environment.scm (for-each-search-path): Use it.
2014-12-27 23:24:35 +01:00
Ludovic Courtès 7b21fe5385 packages: Add 'file-pattern' field to 'search-path-specification'.
* guix/packages.scm (<search-path-specification>)[file-pattern]: New
  field.
  (search-path-specification->sexp): Honor it.
2014-12-27 23:22:55 +01:00
Ludovic Courtès 7ec02d374d build-support/gnu: Add support for file patterns in search paths.
* guix/build/utils.scm (search-path-as-list): Add #:pattern parameter
  and honor it.
  (set-path-environment-variable): Likewise, and pass it to
  'search-path-as-list'.
* guix/packages.scm (search-path-specification->sexp): Add PATTERN slot.
* guix/build/gnu-build-system.scm (set-paths): Adjust accordingly.
2014-12-27 23:22:55 +01:00
Ludovic Courtès af07095516 packages: Add 'file-type' field to 'search-path-specification'.
Fixes <http://bugs.gnu.org/18033>.

* guix/packages.scm (<search-path-specification>): Rename 'directories'
  field to 'files'.  Add 'file-type'.
  (search-path-specification->sexp): Honor 'file-type'.
* gnu/packages/autotools.scm, gnu/packages/bootstrap.scm,
  gnu/packages/cross-base.scm, gnu/packages/games.scm,
  gnu/packages/gcc.scm, gnu/packages/glib.scm,
  gnu/packages/guile.scm, gnu/packages/man.scm,
  gnu/packages/perl.scm, gnu/packages/pkg-config.scm,
  gnu/packages/python.scm, gnu/packages/ruby.scm,
  gnu/packages/xfce.scm: Change 'directories' to 'files'.
* tests/packages.scm ("search paths"): Change 'directories' field to
  'files'.
* guix/scripts/environment.scm (for-each-search-path): Likewise.
2014-12-27 23:22:49 +01:00
Ludovic Courtès 856ae5e6c7 build-system/gnu: Strip with '--strip-all' instead of '--strip-debug'.
This saves 19% on the 'bin' directory of Coreutils, and certainly
helpful for things like Git's 'libexec' directory.

* guix/build-system/gnu.scm (gnu-build): Change default value for
  #:strip-flags to '("--strip-all").
* guix/build/gnu-build-system.scm (strip): Ditto.
* gnu/packages/linux.scm (linux-libre)[arguments]: Add #:strip-flags.
2014-12-27 19:20:18 +01:00
Ludovic Courtès 6aa47e3883 build-system/gnu: Add support for non-directory search paths.
Partly fixes <http://bugs.gnu.org/18033>.

* guix/build/utils.scm (search-path-as-list): Rename 'sub-directories'
  parameter to 'files'.  Add #:type parameter and honor it.
  (set-path-environment-variable): Likewise.  Pass #:type to
  'search-path-as-list'.
* guix/packages.scm (search-path-specification->sexp): Add 'directory as
  the last item of the tuple.
* guix/build/gnu-build-system.scm (set-paths): Add 'type' to search-path
  pattern.  Pass #:type to 'set-path-environment-variable'.
2014-12-27 12:25:31 +01:00
Ludovic Courtès 763a401ed1 Merge branch 'master' into core-updates 2014-12-26 23:31:04 +01:00
Ludovic Courtès 9426440781 packages: Apply patches with "patch --force".
Fixes <http://bugs.gnu.org/19402>.
Reported by Mark H Weaver <mhw@netris.org>.

* guix/packages.scm (patch-and-repack): Change "--batch" to "--force".
2014-12-26 23:30:29 +01:00
Ludovic Courtès 78a2745370 build-system/python: Fix 'package-with-explicit-python'.
Reported by Federico Beffa <beffa@ieee.org>
and Eric Bavier <ericbavier@gmail.com>.

* guix/build-system/python.scm (package-with-explicit-python): Do
  nothing when P's build system is not PYTHON-BUILD-SYSTEM.
2014-12-23 19:14:52 +01:00
Mark H Weaver a193b8248b Optimize package-transitive-supported-systems.
* guix/packages.scm (first-value): Remove.
  (define-memoized/v): New macro.
  (package-transitive-supported-systems): Rewrite.
2014-12-21 20:12:18 -05:00
Ludovic Courtès c9bf64d6d7 syscalls: Add more procedures for network interfaces.
* guix/build/syscalls.scm (sizeof*, type-size, write-type, write-types,
  read-type, read-types, define-c-struct): New macros.
  (SIOCSIFFLAGS, SIOCGIFADDR, SIOCSIFADDR): New variables.
  (sockaddr-in, sockaddr-in6): New C structs.
  (write-socket-address!, read-socket-address,
  set-network-interface-flags, set-network-interface-address,
  network-interface-address, configure-network-interface): New
  procedures.
2014-12-19 17:15:53 +01:00
Federico Beffa 6f8fe4b29e build/python-build-system: Fix easy-install.pth collisions.
* guix/build/python-build-system.scm (rename-pth-file): New rename-pth-file
  phase and corresponding function.
2014-12-18 17:58:10 +01:00
Ludovic Courtès bea26837e8 profiles: Fix removal of the next-to-last item in a profile.
Fixes a bug whereby removing the next-to-last item in a profile would
lead to an obscure error, as shown at
<http://lists.gnu.org/archive/html/guix-devel/2014-12/msg00292.html>.
Reported by Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de>.

* guix/profiles.scm (profile-derivation)[inputs]: Use (list info-dir
  "out") instead of just INFO-DIR.
2014-12-15 23:01:56 +01:00
Ludovic Courtès c4a1b6c2ba Merge branch 'master' into 'core-updates'. 2014-12-14 11:55:07 +01:00
Ludovic Courtès 2ed11b3a3e utils: Change 'wrap-program' to preserve the original argv[0].
Suggested by Mark H Weaver <mhw@netris.org>
in <http://bugs.gnu.org/19138>.

* guix/build/utils.scm (wrap-program): Change wrapper to use "exec -a
  PROG" instead of just "exec".
2014-12-14 11:54:12 +01:00