summaryrefslogtreecommitdiff
path: root/guix
AgeCommit message (Collapse)Author
2015-01-20packages: Mark the 'patches' field as delayed.Ludovic Courtès
* guix/packages.scm (<origin>)[patches]: Mark as 'delayed'. (print-origin, origin->derivation): Add call to 'force' when accessing 'patches'.
2015-01-19records: Add support for delayed fields.Ludovic Courtès
* guix/records.scm (make-syntactic-constructor): Add #:delayed parameter. [delayed-field?]: New procedure. [wrap-field-value]: Use it. (define-record-type*)[delayed-field?, wrapped-field?]: New procedures. [thunked-field-accessor-name]: Rename to... [wrapped-field-accessor-name]: ... this. [field-spec->srfi-9]: Change 'thunked' to 'wrapped'. [delayed-field-accessor-definition]: New procedure. Compute delayed-field accessors and emit them. Pass #:delayed to 'make-syntactic-constructor'. * tests/records.scm ("define-record-type* & delayed", "define-record-type* & delayed & default", "define-record-type* & delayed & inherited"): New tests.
2015-01-19make-syntactic-constructor kwarg defaultLudovic Courtès
2015-01-19records: Factorize value wrapping in the record constructor.Ludovic Courtès
* guix/records.scm (make-syntactic-constructor)[wrap-field-value]: New procedure. [field-bindings, field-value]: Use it.
2015-01-19records: Move 'make-syntactic-constructor' to the top level.Ludovic Courtès
* guix/records.scm (make-syntactic-constructor): New procedure, formerly nested in 'define-record-type*'.
2015-01-19records: Use keyword parameters for 'make-syntactic-constructor'.Ludovic Courtès
* guix/records.scm (define-record-type*)[make-syntactic-constructor]: Turn THUNKED and DEFAULTS into keyword arguments. Adjust caller accordingly. Declare 'thunked' and 'defaults' local variables.
2015-01-18nar: Read archive signatures as Latin-1 strings.Ludovic Courtès
Fixes <http://bugs.gnu.org/19610>. Reported by Mark H Weaver <mhw@netris.org>. * guix/nar.scm (restore-one-item): Use 'read-latin1-string' to read the signature.
2015-01-18serialization: Read Latin-1 strings with 'get-bytevector-n'.Ludovic Courtès
* guix/serialization.scm (read-latin1-string): Use 'get-bytevector-n' instead of 'get-string-n'. Use 'list->string' etc. to convert the bytevector to a string.
2015-01-18store: Change 'store-lower' to preserve the original procedure's documentation.Ludovic Courtès
* guix/store.scm (preserve-documentation): New procedure. (store-lift, store-lower): Use it.
2015-01-17doc: Document '%state-monad' and update '%store-monad' description.Ludovic Courtès
* doc/guix.texi (The Store Monad): Document '%state-monad' and related procedures. Describe '%store-monad' as an alias for '%state-monad'. * guix/monads.scm: Update commentary.
2015-01-17store: Make '%store-monad' an alias for '%state-monad'.Ludovic Courtès
* guix/store.scm (define-alias): New macro. (%store-monad, store-return, store-bind): Define as aliases of the corresponding %STATE-MONAD part. (store-lift, text-file, interned-file): Return STORE as a second value. (run-with-store): Use 'run-with-state'. * guix/packages.scm (set-guile-for-build, package-file): Return STORE as a second value. * guix/monads.scm: Remove part of the module commentary.
2015-01-17monads: Add the state monad.Ludovic Courtès
* guix/monads.scm (state-return, state-bind, run-with-state, current-state, set-current-state, state-push, state-pop): New procedures. (%state-monad): New variable. * tests/monads.scm (%monads): Add %STATE-MONAD. (%monad-run): Add 'run-with-state'. (values->list): New macro. ("set-current-state", "state-push etc."): New tests.
2015-01-17guix archive: Add -r/--recursive.Ludovic Courtès
* guix/scripts/archive.scm (show-help, %options): Add -r/--recursive. (export-from-store): Pass #:recursive? to 'export-paths'. * doc/guix.texi (Invoking guix archive): Add -r in Emacs example. Add example with ~/.guix-profile. Document -r/--recursive.
2015-01-17guix archive: Remove unused -r/--root option.Ludovic Courtès
* guix/scripts/archive.scm (%options): Remove -r/--root.
2015-01-17store: Remove unused variable.Ludovic Courtès
* guix/store.scm (export-paths): Remove unused variable 's'.
2015-01-17store: Add #:recursive? parameter to 'export-paths'.Ludovic Courtès
* guix/store.scm (export-paths): Add #:recursive? parameter and honor it. * tests/store.scm ("export/import incomplete", "export/import recursive"): New tests.
2015-01-16Merge branch 'core-updates'Ludovic Courtès
Conflicts: gnu/packages/bootstrap.scm
2015-01-14packages: Convert source derivations to monadic style.Ludovic Courtès
* 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-14store: Add 'store-lower'.Ludovic Courtès
* guix/store.scm (store-lower): New procedure. * tests/store.scm ("store-lower"): New test.
2015-01-14monads: Move '%store-monad' and related procedures where they belong.Ludovic Courtès
This turns (guix monads) into a generic module for monads, and moves the store monad and related monadic procedures in their corresponding module. * guix/monads.scm (store-return, store-bind, %store-monad, store-lift, text-file, interned-file, package-file, package->derivation, package->cross-derivation, origin->derivation, imported-modules, compiled, modules, built-derivations, run-with-store): Move to... * guix/store.scm (store-return, store-bind, %store-monad, store-lift, text-file, interned-file): ... here. (%guile-for-build): New variable. (run-with-store): Moved from monads.scm. Remove default value for #:guile-for-build. * guix/packages.scm (default-guile): Export. (set-guile-for-build): New procedure. (package-file, package->derivation, package->cross-derivation, origin->derivation): Moved from monads.scm. * guix/derivations.scm (%guile-for-build): Remove. (imported-modules): Rename to... (%imported-modules): ... this. (compiled-modules): Rename to... (%compiled-modules): ... this. (built-derivations, imported-modules, compiled-modules): New procedures. * gnu/services/avahi.scm, gnu/services/base.scm, gnu/services/dbus.scm, gnu/services/dmd.scm, gnu/services/networking.scm, gnu/services/ssh.scm, gnu/services/xorg.scm, gnu/system/install.scm, gnu/system/linux-initrd.scm, gnu/system/shadow.scm, guix/download.scm, guix/gexp.scm, guix/git-download.scm, guix/profiles.scm, guix/svn-download.scm, tests/monads.scm: Adjust imports accordingly. * guix/monad-repl.scm (default-guile-derivation): New procedure. (store-monad-language, run-in-store): Use it. * build-aux/hydra/gnu-system.scm (qemu-jobs): Add explicit 'set-guile-for-build' call. * guix/scripts/archive.scm (derivation-from-expression): Likewise. * guix/scripts/build.scm (options/resolve-packages): Likewise. * guix/scripts/environment.scm (guix-environment): Likewise. * guix/scripts/system.scm (guix-system): Likewise. * doc/guix.texi (The Store Monad): Adjust module names accordingly.
2015-01-13Merge branch 'master' into core-updatesMark H Weaver
2015-01-13build/glib-or-gtk-build-system: Fix 'generate-icon-cache'.Federico Beffa
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-12monads: Remove 'derivation-expression'.Ludovic Courtès
* guix/monads.scm (lower-inputs, derivation-expression): Remove. * tests/monads.scm (derivation-expression, "mlet* + derivation-expression"): Remove.
2015-01-12monads: Rewrite 'text-file*' using gexps.Ludovic Courtès
* 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-12guix: build/glib-or-gtk-build-system: Add support for GIO and XDG theming.Federico Beffa
* 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-11derivations: Use a set for 'substitution-oracle'.Ludovic Courtès
* guix/derivations.scm (substitution-oracle): Use sets instead of lists.
2015-01-11derivations: Use sets for 'derivations-prerequisites'.Ludovic Courtès
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-11Add (guix sets).Ludovic Courtès
* guix/sets.scm, tests/sets.scm: New files.sets * Makefile.am (MODULES, SCM_TESTS): Add them.
2015-01-11Merge branch 'master' into core-updatesMark H Weaver
2015-01-10derivations: Add 'substitution-oracle' and use it.Ludovic Courtès
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-09derivations: Add 'derivation-output-names'.Ludovic Courtès
* 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-09build-system/gnu: Patch /usr/bin/file in all 'configure' files.Ludovic Courtès
* 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-09import: Add CPAN importer.Eric Bavier
* 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-09tests: import: Factorize utility function.Eric Bavier
* tests/pypi.scm (mock): Move this... * guix/tests.scm: to here.
2015-01-09import: Factorize utility functions.Eric Bavier
* 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-09import: gnu: Propagate the key-download argument.Eric Bavier
* guix/import/gnu.scm (gnu->guix-package): Pass the key-download argument on to gnu-package->sexp.
2015-01-09substitute-binary: Micro-optimize 'narinfo-sha256'.Ludovic Courtès
* 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-09records: Optimize 'recutils->alist' by avoiding regexps.Ludovic Courtès
* 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-09base64: Inline arithmetic operations.Ludovic Courtès
* guix/base64.scm (define-alias): New macro. (fxbit-field, fxarithmetic-shift, fxarithmetic-shift-left, fxand, fxior, fxxor): New aliases.
2015-01-07gnu: Add toolchain support for 'armhf-linux'.Mark H Weaver
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-07Move 'nix-system->gnu-triplet' to (guix utils) and export it.Mark H Weaver
* gnu/packages/commencement.scm (nix-system->gnu-triplet): Move to... * guix/utils.scm (nix-system->gnu-triplet): ... here. Fix docstring typo.
2015-01-06Merge branch 'master' into core-updatesMark H Weaver
2015-01-05linux-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-04pk-crypto: Improve docstring of signature-related procedures.Ludovic Courtès
* guix/pk-crypto.scm (bytevector->hash-data, sign): Augment docstring.
2015-01-04build-system/gnu: Use executables from the target inputs in 'patch-shebangs'.Ludovic Courtès
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-03guix package: Follow symlinks for pattern search paths.Ludovic Courtès
* guix/scripts/package.scm (search-path-environment-variables): Add local 'files' variable. * tests/packages.scm ("--search-paths with pattern"): New test.
2014-12-30Merge branch 'master' into core-updatesMark H Weaver
2014-12-29gnu: Revert use of '--strip-all'.Ludovic Courtès
This reverts commits f05bdc9412135f34a1c417edc203c35cd005d0d5 and 856ae5e6c71a1283a414d33e638051f95d3cce35. This broke all sorts of things. See <http://hydra.gnu.org/eval/102058>, for example.
2014-12-29download: Export 'maybe-expand-mirrors'.Ludovic Courtès
* guix/build/download.scm (uri-vicinity, maybe-expand-mirrors): New procedures. (url-fetch): Remove them from here.
2014-12-29tests: Factorize the 'dummy-package' macro.Ludovic Courtès
* guix/tests.scm (dummy-package): New macro. * tests/lint.scm (dummy-package): Remove. * tests/packages.scm (dummy-package): Remove.