Commit Graph

1215 Commits (58caebf0327aafe6240612f28c339f5a00cd2c92)

Author SHA1 Message Date
Ludovic Courtès c809ec94d1 utils: Change 'patch-makefile-SHELL' to support ":=" assignments.
Reported by Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de>.

* guix/build/utils.scm (patch-makefile-SHELL): Update regexp to match
  ":=" assignments.
2014-12-13 00:06:32 +01:00
Ludovic Courtès 5e5deea952 utils: Use 'which' to find the shell in 'patch-makefile-SHELL'.
* guix/build/utils.scm (patch-makefile-SHELL)[find-shell]: Use 'which'.
2014-12-13 00:04:25 +01:00
Ludovic Courtès 5920d90e68 build-system/glib-or-gtk: Fix default value of #:glib-or-gtk-wrap-excluded-outputs.
Fixes <http://bugs.gnu.org/19321>.
Reported by Mark H Weaver <mhw@netris.org>.

* guix/build-system/glib-or-gtk.scm (glib-or-gtk-build): Change default
  value of #:glib-or-gtk-wrap-excluded-outputs to ''().
2014-12-09 23:21:39 +01:00
Eric Bavier 499cdcc6cb gnu: licenses: Add NCSA license.
* guix/licenses.scm (ncsa): New variable.
2014-12-09 12:02:08 -06:00
Ludovic Courtès 5f742c84d4 substitute-binary: Add missing newline in download progress report.
Fixes <http://bugs.gnu.org/19313>.
Reported by rekado <rekado@elephly.net>.

* guix/scripts/substitute-binary.scm (guix-substitute-binary)
  <--substitute>: Add 'newline' call.
2014-12-09 11:24:56 +01:00
Ludovic Courtès 6412e58a68 system: Don't make /boot/grub/grub.cfg a symlink to the store.
This would not work when /boot is a separate partition, as reported by
Nikita Karetnikov <nikita@karetnikov.org> in <http://bugs.gnu.org/19220>.
This fixes a regression introduced in 39d1f82.

* gnu/build/install.scm (install-grub): Copy GRUB.CFG instead of
  symlinking it, as was the case before 39d1f82.
* gnu/build/vm.scm (register-grub.cfg-root): Add 'grub.cfg' parameter.
  Make it a permanent GC root instead of an indirect GC root.
  (initialize-hard-disk): Adjust accordingly.
* guix/scripts/system.scm (install-grub*): Replace use of
  'add-indirect-root' by the addition of a permanent GC root in
  %GC-ROOTS-DIRECTORY.
2014-12-09 11:06:50 +01:00
Federico Beffa c3ea85d110 build-system/python: Add handling of 'propagated-inputs' in
'package-with-explicit-python'.

* guix/build-system/python.scm (package-with-explicit-python): Add mapping for
  'propagated-inputs'.
2014-12-08 09:54:34 +01:00
Ludovic Courtès c9e46f1c39 guix system: Fix typo affecting 'guix system init'.
Fixes <http://bugs.gnu.org/19279>.
Fixes a regression introduced in cc7fa59.
Reported by Tomas Cech <tcech@suse.cz>.

* guix/scripts/system.scm (install): Fix order of arguments to 'lift'
  and 'lift2'.
2014-12-07 00:00:42 +01:00
nebuli 847391fe62 guix: scripts: Parse $GUIX_BUILD_OPTIONS separately.
Appending to "raw" args broke optional parameters in 'guix package -I'
and 'guix package -A', and possibly other places.  Therefore, switch to
parsing each set of options on its own and append resulting alists
together afterwards.

* guix/scripts/archive.scm (parse-options-from): Rename from
  (parse-options) and add explicit argument.  New form of (parse-options)
  using its old algorithm via -from function.
* guix/scripts/build.scm: Ditto.
* guix/scripts/environment.scm: Ditto.
* guix/scripts/package.scm: Ditto.
* guix/scripts/system.scm: Ditto.
* tests/guix-package.sh: Add test.
* doc/guix.texi (Invoking guix build): Make it clear that the options
  are parsed independently.

Co-authored-by: Ludovic Courtès <ludo@gnu.org>
2014-12-06 16:03:49 +01:00
Ludovic Courtès 39d1f82b52 system: Make /boot/grub/grub.cfg an indirect GC root.
Fixes <http://bugs.gnu.org/19160>.

* guix/scripts/system.scm (install-grub*): Make /boot/grub/grub.cfg an
  indirect GC root.
* gnu/build/install.scm (install-grub): Make TARGET a symlink.
* gnu/build/vm.scm (register-grub.cfg-root): New procedure.
  (initialize-hard-disk): Use it.
2014-12-04 23:53:16 +01:00
Ludovic Courtès c3e79cde06 guix system: Factorize 'grub-install' error handling, and use more 'mbegin'.
* guix/scripts/system.scm (install-grub*): New procedure.
  (install): Use it, and use 'mwhen?'.
  (perform-action) <reconfigure>: Likewise.
2014-12-04 23:53:16 +01:00
Alex Kost 0b08600ca5 build: emacs-utils: Add 'emacs-generate-autoloads'.
* guix/build/emacs-utils.scm (emacs-generate-autoloads): New procedure.
2014-12-02 22:09:23 +03:00
Ludovic Courtès ec38437f94 packages: Use the target's system Guile when downloading patches.
* guix/packages.scm (patch-and-repack)[patch-inputs]: Pass SYSTEM in
  'package-source-derivation' call.
2014-12-02 16:51:43 +01:00
Ludovic Courtès 7ce7361b76 derivations: Export 'derivation-builder'.
* guix/derivations.scm: Export 'derivation-builder'.
2014-12-02 16:51:43 +01:00
Ludovic Courtès b307c06456 monads: Add 'lift0'.
* guix/monads.scm (lift0): New variable.
2014-12-02 16:51:43 +01:00
Ludovic Courtès 21caa6deeb monads: Add 'mwhen' and 'munless'.
* guix/monads.scm (mbegin): Add special '%current-monad' syntactic
  keyword.
  (mwhen, munless): New macros.
2014-12-02 16:51:43 +01:00
Ludovic Courtès cc7fa5929c guix system: Use 'mbegin' for 'install'.
* guix/scripts/system.scm (install): Use 'mbegin'.  Lift FORMAT and
  POPULATE-ROOT-FILE-SYSTEM, and use the result.
2014-12-02 16:51:43 +01:00
Ludovic Courtès 73aa8ddb75 build-system/glib-or-gtk: Allow specific outputs to be excluded from wrapping.
* guix/build/glib-or-gtk-build-system.scm (wrap-all-programs): Add
  #:glib-or-gtk-wrap-excluded-outputs parameter and honor it.
* guix/build-system/glib-or-gtk.scm (glib-or-gtk-build): Add
  #:glib-or-gtk-wrap-excluded-outputs parameter and pass it in BUILDER.
* doc/guix.texi (Build Systems): Mention it.
2014-12-01 22:41:04 +01:00
Ludovic Courtès c8b7569558 build-system/glib-or-gtk: Correctly handle multiple-output packages.
* guix/build/glib-or-gtk-build-system.scm (wrap-all-programs): Move body
  to 'handle-output' inner procedure, and parametrize it by output name
  and directory.  Call it for each element of OUTPUTS.
  (compile-glib-schemas): Likewise.
2014-12-01 22:41:04 +01:00
Ludovic Courtès 4efdabb810 build-system/glib-or-gtk: Use 'for-each' and 'cut' as appropriate.
* guix/build/glib-or-gtk-build-system.scm (wrap-all-programs): Use
  'for-each' instead of 'map' in for-effect contexts.  Use 'cut' instead
  of 'lambda' when appropriate.
2014-12-01 22:41:04 +01:00
Ludovic Courtès 85dbd3dcd0 build-system/glib-or-gtk: Clean up whitespace.
* guix/build/glib-or-gtk-build-system.scm: M-x whitespace-cleanup.
2014-12-01 22:41:04 +01:00
Ludovic Courtès 7cc7dec139 build-system/gnu: Add 'compress-documentation' phase.
* guix/build/gnu-build-system.scm (compress-documentation): New
  procedure.
  (%standard-phases): Add it.
2014-12-01 16:50:28 +01:00
Ludovic Courtès 9741aca9a5 utils: Add 'symbolic-link?'.
* guix/build/utils.scm (symbolic-link?): New procedure.
2014-12-01 15:46:38 +01:00
Ludovic Courtès d68fe74162 build-system/gnu: Add 'validate-documentation-location' phase.
* guix/build/gnu-build-system.scm (validate-documentation-location): New
  procedure.
  (%standard-phases): Add it.
2014-12-01 14:09:36 +01:00
nebuli 16eb115ef4 guix: scripts: Add GUIX_BUILD_OPTIONS environment handling.
* doc/guix.texi (Invoking guix build): Mention 'GUIX_BUILD_OPTIONS'.
* guix/scripts/archive.scm: (append args (environment-build-options)).
* guix/scripts/build.scm: Ditto.
* guix/scripts/environment.scm: Ditto.
* guix/scripts/package.scm: Ditto.
* guix/scripts/system.scm: Ditto.
* guix/ui.scm (environment-build-options): New function.
* guix/utils.scm (arguments-from-environment-variable): New function.
* tests/guix-build.sh: Add tests.
* test-env.in: Unset GUIX_BUILD_OPTIONS.

Co-authored-by: Ludovic Courtès <ludo@gnu.org>
2014-11-30 18:54:07 +01:00
Ludovic Courtès f5d9604f27 gnu-maintenance: Support .zip files.
Reported by Andreas Enge <andreas@enge.fr>.

* guix/gnu-maintenance.scm (sans-extension): Add case for ".zip".
  (%tarball-rx): Extend to handle .zip extension.
2014-11-29 22:34:59 +01:00
Ludovic Courtès d5d1668630 Add (guix elf).
* guix/elf.scm: New file.  Taken from Guile 'master', commit 3f826e3.
* Makefile.am (MODULES): Add it.
* THANKS: Thank Andy, who wrote this module.
2014-11-28 00:10:28 +01:00
Ludovic Courtès d616c05529 substitute-binary: Change "unresponsive" to "slow".
* guix/scripts/substitute-binary.scm (fetch): Change "unresponsive" to
  "somewhat slow".  I'm being told that the former is often
  misunderstood as "broken".
2014-11-28 00:10:27 +01:00
Andreas Enge d57b88bed5 Update gnupg mirrors.
* guix/download.scm (%mirrors): Update mirror list for gnupg.
2014-11-26 19:52:11 +01:00
Taylan Ulrich Bayırlı/Kammer 094b2efc3c utils: Improve docstring of 'substitute*' & co.
* guix/build/utils.scm (substitute): Clarify first sentence of
  docstring and add warning to the docstring about using '$' to match
  an end of line.
  (substitute*): Add warning to the docstring about using '$' to match
  an end of line.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2014-11-26 11:17:48 +01:00
Ludovic Courtès f6526eb330 guix build: Add '--max-jobs' option.
Suggested by Deck Pickard <deck.r.pickard@gmail.com>.

* guix/scripts/build.scm (show-build-options-help): Document
  --max-jobs.
  (set-build-options-from-command-line): Pass #:max-build-jobs.
  (%standard-build-options): Add --max-jobs.
* doc/guix.texi (Invoking guix-daemon): Document the meaning of
  '--max-jobs 0'.
  (Invoking guix build): Document --max-jobs, with a reference to
  "Invoking guix-daemon'.
2014-11-25 22:37:44 +01:00
Ludovic Courtès 0ae332d3ef licenses: Add MPL 1.1.
* guix/licenses.scm (mpl1.1): New variable.
2014-11-25 18:01:59 +01:00
Ludovic Courtès 2cdda52b1a import: gnu: Write the hash in nix-base32 format.
* guix/import/gnu.scm (gnu-package->sexp): Use
  'bytevector->nix-base32-string', not 'bytevector->base32-string'.
2014-11-25 18:01:59 +01:00
Ludovic Courtès f8bcf1935a build-system/gnu: Gracefully handle dangling symlinks in the 'strip' phase.
* guix/build/gnu-build-system.scm (strip): Check whether 'file-exists?'
  before calling 'elf-file?' and 'ar-file?'.  This should fix build
  failures in the presence of dangling symlinks, as in
  <http://hydra.gnu.org/build/167521/nixlog/1/raw>.
2014-11-24 22:45:41 +01:00
nebuli 8b47758f02 store: default to serial "scheduler"
* guix/store.scm (set-build-options): exchange default argument values

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2014-11-23 21:48:47 +01:00
Ludovic Courtès c23d17095d utils: 'elf-file?' and 'ar-file?' return #f for directories.
This avoids uncaught exceptions when the 'strip' phase would call these
procedures on symlinks to directories, such as 'lib/terminfo' in
ncurses (see <http://hydra.gnu.org/build/167310/nixlog/1/tail-reload>.)

* guix/build/utils.scm (file-header-match): Catch 'system-error', and
  return #f upon EISDIR.
2014-11-23 19:19:35 +01:00
Ludovic Courtès 1d1fa9327c utils: Turn 'parallel-job-count' into a parameter.
* guix/build/utils.scm (parallel-job-count): Turn into a SRFI-39 parameter.
2014-11-22 21:57:05 +01:00
Ludovic Courtès e8c7fdda5d build-system/gnu: Strip 'ar' archives as well.
* guix/build/gnu-build-system.scm (strip): Also strip when (ar-file?
  PATH) is true.
2014-11-22 21:54:27 +01:00
Ludovic Courtès 2bbc6db5e2 utils: Factorize magic bytes detection.
* guix/build/utils.scm (file-header-match): New procedure.
  (%elf-magic-bytes): New variable.
  (elf-file?, ar-file?): Define using 'file-header-match'.
2014-11-22 21:52:57 +01:00
Ludovic Courtès 91ee959b03 utils: Add 'ar-file?'.
* guix/build/utils.scm (%ar-magic-bytes): New variable.
  (ar-file?): New procedure.
2014-11-22 21:52:12 +01:00
Ludovic Courtès 50b87bd54b build-system/gnu: Strip only ELF files.
Suggested by Mark H Weaver <mhw@netris.org>
at <http://lists.gnu.org/archive/html/guix-devel/2014-10/msg00395.html>.

* guix/build/gnu-build-system.scm (strip)[strip-dir]: Strip only
  when (elf-file? PATH) is true.
2014-11-22 12:49:14 +01:00
Ludovic Courtès 99533da50d utils: Add 'elf-file?'.
* guix/build/utils.scm (elf-file?): New procedure.
2014-11-22 12:44:56 +01:00
Ludovic Courtès e6039b9c70 utils: Export 'parallel-job-count'.
* guix/build/utils.scm (parallel-job-count): New procedure.
* guix/build/gnu-build-system.scm (%parallel-job-count): Remove.
  (build, check): Use 'parallel-job-count' instead.
2014-11-22 12:32:32 +01:00
Ludovic Courtès 0276f697b3 guix system: Add '--share' and '--expose' options for 'vm'.
* guix/scripts/system.scm (system-derivation-for-action): Add #:mappings
  parameter.  Pass it to 'system-qemu-image/shared-store-script'.
  (perform-action): Likewise.
  (show-help): Document --share and --expose.
  (specification->file-system-mapping): New procedure.
  (%options): Add --share and --expose.
  (guix-system): Pass #:mapping to 'perform-action'.
* doc/guix.texi (Invoking guix system): Document it.
2014-11-21 00:02:26 +01:00
Ludovic Courtès 8b9019a6a9 lint: Fix typos in checker descriptions.
* guix/scripts/lint.scm (%checkers): "file names" (two words), and
  "synopses" (plural).
2014-11-19 22:52:30 +01:00
Ludovic Courtès db6dcf816f lint: Use localized checker descriptions.
* guix/scripts/lint.scm (list-checkers-and-exit): Wrap
  'lint-checker-description' call in (_ ...).
2014-11-19 22:52:30 +01:00
Ludovic Courtès 836f02bf52 lint: Correctly internationalize warning messages.
* guix/scripts/lint.scm (emit-warning): Remove '_' call for format
  string.
  (check-description-style, check-inputs-should-be-native,
  check-synopsis-style, check-patches, check-gnu-synopsis+description):
  Wrap message in (_ ...).
2014-11-19 22:52:30 +01:00
Ludovic Courtès f4d5bca39e lint: Change checker names to be symbols.
* guix/scripts/lint.scm (%checkers): Change 'name' fields to be
  symbols.
  (%options): Adjust "-c" option handler accordingly.
2014-11-19 22:52:30 +01:00
Ludovic Courtès 37627ffa89 lint: Fold 'sync-descriptions' script as 'gnu-description' lint checker.
* build-aux/sync-descriptions.scm: Remove.  Move payload to...
* guix/scripts/lint.scm: ... here.
  (escape-quotes, official-gnu-packages*,
  check-gnu-synopsis+description): New procedures.
  (%checkers): Add 'gnu-descriptions'.
* Makefile.am (EXTRA_DIST): Remove build-aux/sync-descriptions.scm.
  (sync-descriptions): Use 'guix lint'.
2014-11-19 22:52:28 +01:00
Ludovic Courtès af8c2a158e licenses: Add the Clarified Artistic License.
* guix/licenses.scm (clarified-artistic): New variable.
2014-11-19 22:07:02 +01:00
Ludovic Courtès cd4a3cb359 syscalls: Update /etc/mtab, not /etc/fstab.
* guix/build/syscalls.scm (remove-from-mtab): Replace "fstab" with
  "mtab".
2014-11-14 00:41:01 +01:00
Ludovic Courtès d09e8c7b15 substitute-binary: Be slightly less verbose when downloading.
* guix/scripts/substitute-binary.scm (guix-substitute-binary)<"--substitute">:
  Be slightly less verbose.
2014-11-13 22:17:44 +01:00
Ludovic Courtès 7f614a747c derivations: Clarify message produced by 'graft-derivation'.
* guix/derivations.scm (graft-derivation): Use the term "grafting" in
  the build message.
2014-11-13 11:35:13 +01:00
Ludovic Courtès 906b1b0986 guix system: Decorate GRUB entries of old generations with date and number.
* guix/scripts/system.scm (seconds->string): New procedure.
  (previous-grub-entries)[system->grub-entry]: Add 'number' and 'time'
  parameters.  Adjust call accordingly.
2014-11-11 22:42:42 +01:00
Ludovic Courtès 7047133f07 import: Add GNU importer.
Suggested by Karl Berry <karl@gnu.org>
and Andreas Enge <andreas@enge.fr>.

* guix/import/gnu.scm, guix/scripts/import/gnu.scm: New files.
* Makefile.am (MODULES): Add them.
* guix/scripts/import.scm (importers): Add "gnu".
* guix/gnu-maintenance.scm (gnu-release-archive-types): New procedure.
  (download-tarball): Export.
2014-11-11 15:31:35 +01:00
Ludovic Courtès 501d764751 gnu-maintenance: Introduce <gnu-release> data type.
* guix/gnu-maintenance.scm (<gnu-release>): New record type.
  (release-file): Rename to...
  (release-file?): ... this.  Return a Boolean.
  (tarball->version, coalesce-releases): New procedures.
  (releases): Call 'coalesce-releases' on RESULT.  Return <gnu-release>
  objects instead of pairs.
  (latest-release): Likewise.
  (package-update-path): Adjust accordingly.
* gnu/packages.scm (check-package-freshness): Adjust accordingly.
2014-11-11 15:31:35 +01:00
Ludovic Courtès ccea821bef syscalls: Add 'mount-points'.
* guix/build/syscalls.scm (mount-points): New procedure.
* tests/syscalls.scm ("mount-points"): New test.
2014-11-10 22:42:14 +01:00
Alex Kost d9e56454e2 licenses: Add 'silofl1.1'.
* guix/licenses.scm (silofl1.1): New variable.
2014-11-10 18:21:25 +03:00
Ludovic Courtès f81ac34dd9 pull: Use the build procedure provided by the newly-downloaded Guix.
Fixes <http://bugs.gnu.org/18534>.

* guix/scripts/pull.scm (with-environment-variable, with-PATH): New
  macros.
  (temporary-directory, first-directory, interned-then-deleted): New
  procedures.
  (unpack): Rewrite to do the unpacking in the current process rather
  than as a separate derivation.
  (%self-build-file): New variable.
  (build-from-source): New procedure.
  (build-and-install): Use it.
* guix/build/pull.scm (build-guix): Rename 'tarball' argument to
  'source'.  Remove #:tar and #:gzip parameters, as well as 'tar'
  invocation.  Remove 'scandir' invocation.  Wrap body in
  'with-directory-excursion'.
* build-aux/build-self.scm: New file.
* Makefile.am (EXTRA_DIST): Add it.
2014-11-09 22:33:45 +01:00
Ludovic Courtès 4684f301d5 gexp: Add #:module-path parameter to 'gexp->derivation'.
* guix/gexp.scm (gexp->derivation): Add #:module-path parameter, and
  pass it to 'imported-modules' and 'compiled-modules'.
* doc/guix.texi (G-Expressions): Adjust accordingly.
2014-11-09 22:33:45 +01:00
Ludovic Courtès 6aa260af12 vm: Fix 'vm --full-boot' to produce a sufficient disk image.
* gnu/system/vm.scm (system-qemu-image/shared-store): Add
  #:disk-image-size and #:full-boot? parameters and honor them.  Pass
  '#:copy-inputs? full-boot?', and change #:inputs argument.
* guix/scripts/system.scm (system-derivation-for-action): Pass
  #:disk-image-size to 'system-qemu-image/shared-store'.
* doc/guix.texi (Invoking guix system): Mention use of '--image-size' in
  conjunction with '--full-boot'.
2014-11-08 15:10:42 +01:00
Ludovic Courtès ab11f0bed4 vm: Support 'guix system vm --full-boot'.
* gnu/system/vm.scm (system-qemu-image/shared-store-script): Add
  #:full-boot? parameter and honor it.
* guix/scripts/system.scm (system-derivation-for-action): Likewise.
  (perform-action): Likewise.
  (show-help): Document '--full-boot'.
  (%options): Add '--full-boot'.
  (guix-system): Add #:full-boot? argument in call to 'perform-action'.
* doc/guix.texi (Invoking guix system): Document it.
2014-11-08 01:05:35 +01:00
Ludovic Courtès 15a6d433ff lint: Allow synopses that start with an abbreviation.
* guix/scripts/lint.scm (starts-with-abbreviation?): New procedure.
  (check-synopsis-style)[check-start-with-package-name]: Use it.
* tests/lint.scm ("synopsis: start with abbreviation"): New test.
2014-11-07 17:52:11 +01:00
Ludovic Courtès 105c260f00 lint: Skip starting-article test for the synopses of GNU packages.
* guix/scripts/lint.scm (check-synopsis-style)[check-start-article]:
  Change to (const #t) when PACKAGE matches 'gnu-package?'.
2014-11-07 17:52:11 +01:00
Ludovic Courtès 431e5f5a3e lint: Tolerate sentences that start with a parenthesis or a quote.
* guix/scripts/lint.scm (properly-starts-sentence?): Add (, ", and ' as
  valid beginnings.
2014-11-07 17:52:11 +01:00
Ludovic Courtès 17854ef91d lint: Improve check for synopses starting with package name.
* guix/scripts/lint.scm (package-name-regexp): New procedure.
  (check-synopsis-style)[check-start-with-package-name]: Use it instead
  of 'string-prefix-ci?'.
* tests/lint.scm ("synopsis: start with package name prefix"): New test.
2014-11-07 17:52:11 +01:00
Ludovic Courtès e4bed284ae monads: Remove unused 'nargs' parameter from 'lift'.
* guix/monads.scm (lift): Remove 'nargs' parameter.
2014-11-05 22:59:50 +01:00
Ludovic Courtès 84934f40d1 import: pypi: Gracefully handle wrong argument counts.
* guix/scripts/import/pypi.scm (guix-import-pypi): Use 'leave' to handle
  cases where ARGS has zero or two or more elements.
2014-11-05 18:04:16 +01:00
Ludovic Courtès 467a3c93db import: pypi: Gracefully handle non-existent packages.
Fixes <http://bugs.gnu.org/18831>.
Reported by Ian Denhardt <ian@zenhack.net>.

* guix/import/pypi.scm (url-fetch, json-fetch, pypi-fetch): Augment
  docstring to mention #f on failure.
  (pypi->guix-package): Likewise, and actually return #f on failure.
* guix/scripts/import/pypi.scm (guix-import-pypi): Call 'leave' when
  'pypi->guix-package' returns #f.
2014-11-05 17:56:39 +01:00
Ludovic Courtès 000c59b671 store: Invalidate caches once GC has run.
* guix/store.scm (run-gc): Add calls to 'hash-clear!'.
* tests/store.scm ("add-text-to-store vs. delete-paths",
  "add-to-store vs. delete-paths"): New tests.
2014-11-04 21:13:28 +01:00
Ludovic Courtès c37a74bd3e packages: 'package-transitive-supported-systems' accounts for indirect deps.
Reported by Andreas Enge <andreas@enge.fr>.

* guix/packages.scm (first-value): New macro.
  (package-transitive-supported-systems): Rewrite to traverse all the
  DAG rooted at PACKAGE.
* tests/packages.scm ("package-transitive-supported-systems"): Add 'd'
  and 'e', and test them.
2014-11-03 21:26:48 +01:00
Ludovic Courtès 05962f2958 packages: Implement grafts.
Thanks to Mark H. Weaver <mhw@netris.org> for insightful discussions
and suggestions.

* guix/packages.scm (<package>)[graft]: New field.
  (patch-and-repack): Invoke 'package-derivation' with #:graft? #f.
  (package-source-derivation): Likewise.  Do not use (%guile-for-build)
  in call to 'patch-and-repack', and we could end up using a grafted
  Guile.
  (expand-input): Likewise, also for 'package-cross-derivation' call.
  (package->bag): Add #:graft? parameter.  Honor it.  Use 'strip-append'
  instead of 'package-full-name'.
  (input-graft, input-cross-graft, bag-grafts, package-grafts): New
  procedures.
  (package-derivation, package-cross-derivation): Add #:graft? parameter
  and honor it.
* gnu/packages/bootstrap.scm (package-with-bootstrap-guile): Add
  recursive call on 'graft'.
* guix/build-system/gnu.scm (package-with-explicit-inputs,
  package-with-extra-configure-variable, static-package): Likewise.
  (gnu-build): Use the ungrafted Guile to avoid full rebuilds.
  (gnu-cross-build): Likewise.
* guix/build-system/cmake.scm (cmake-build): Likewise.
* guix/build-system/glib-or-gtk.scm (glib-or-gtk-build): Likewise.
* guix/build-system/perl.scm (perl-build): Likewise.
* guix/build-system/python.scm (python-build): Likewise.
* guix/build-system/ruby.scm (ruby-build): Likewise.
* guix/build-system/trivial.scm (guile-for-build): Likewise.
* tests/packages.scm ("package-derivation, direct graft",
  "package-cross-derivation, direct graft", "package-grafts,
  indirect grafts", "package-grafts, indirect grafts, cross",
  "package-grafts, indirect grafts, propagated inputs",
  "package-derivation, indirect grafts"): New tests.
  ("bag->derivation", "bag->derivation, cross-compilation"): Wrap in
  'parameterize'.
* doc/guix.texi (Security Updates): New node.
  (Invoking guix build): Document --no-graft.
2014-11-02 21:22:12 +01:00
Ludovic Courtès e786293e76 derivations: Add 'derivation-name'.
* guix/derivations.scm (derivation-name): New procedure.
* tests/derivations.scm ("derivation-name"): New test.
2014-11-02 21:22:12 +01:00
Ludovic Courtès e0ea3f8a0d download: Append (effective-version) to '%load-path' for GnuTLS.
* guix/download.scm (url-fetch)[builder]: Append (effective-version) to
  %load-path, as discussed at
  <http://lists.gnu.org/archive/html/guix-devel/2014-10/msg00398.html>.
  This fixes a regression introduced in b94ae0b.
2014-10-30 15:46:36 +01:00
Ludovic Courtès b9113adf45 environment: Improve '--help' output.
* guix/scripts/environment.scm (show-help): Align --pure and
  --search-paths with other long options; add 'newline' call before
  'show-bug-report-information' call.
2014-10-30 14:08:03 +01:00
Ludovic Courtès 7dbe096c63 import: snix: Handle license attributes.
* guix/import/snix.scm (snix-derivation->guix-package)[license-variable]:
  Move to...
  (license-variable): ... here.  Handle license attributes.
2014-10-29 14:03:46 +01:00
Ludovic Courtès 940a8c57be offload: Remove mutual exclusion on transfers.
Suggested by Mark H. Weaver <mhw@netris.org>
at <http://lists.gnu.org/archive/html/guix-devel/2014-10/msg00352.html>.

* guix/scripts/offload.scm (transfer-and-offload): Remove uses of
  'with-machine-lock'.
2014-10-29 00:31:23 +01:00
Ludovic Courtès d2d0514b58 derivations: Fix 'derivation-prerequisites-to-build' when #:local-build?.
* guix/derivations.scm (derivation-prerequisites-to-build)[derivation-substitutable?]:
  Call 'substitutable-derivation?'.
  <body>: When 'substitutable-derivation?' returns #f, add DRV to BUILD.
2014-10-29 00:31:23 +01:00
Ludovic Courtès e6740741d1 tests: Move some of the narinfo test tools to (guix tests).
* guix/tests.scm (derivation-narinfo, call-with-derivation-narinfo): New
  procedures.
  (with-derivation-narinfo): New macro.
* tests/derivations.scm ("derivation-prerequisites-to-build and
  substitutes"): Use them.
2014-10-29 00:31:23 +01:00
Ludovic Courtès fc93e30919 derivations: Add 'offloadable-derivation?' and 'substitutable-derivation?'.
* guix/derivations.scm (offloadable-derivation?,
  substitutable-derivation?): New procedures.
* tests/derivations.scm ("offloadable-derivation?"): New test.
2014-10-29 00:31:23 +01:00
Ludovic Courtès 77b0ac905d build-system/gnu: Add #:substitutable? parameter.
* guix/build-system/gnu.scm (gnu-build): Add #:substitutable?
  parameter.  Pass #:local-build? to 'build-expression->derivation'.
  (gnu-cross-build): Likewise.
2014-10-28 10:17:13 +01:00
Alex Kost 8835aed4ad licenses: Add 'imlib2'.
* guix/licenses.scm (imlib2): New variable.
* gnu/packages/image.scm (imlib2): Use it.
2014-10-26 22:22:43 +03:00
Eric Bavier 3c42965b1e guix: lint: Make exception for package name starting description.
* guix/scripts/lint.scm (check-description-style): Exception for
  upper-case rule if the description starts with the package name.
* tests/lint.scm: Test it.
2014-10-26 13:03:53 -05:00
Eric Bavier 903581f971 guix: lint: Allow digits at start of synopsis or description.
* guix/scripts/lint.scm (start-with-capital-letter?): Rename too...
  (properly-starts-sentence?): Rewrite with regex and add digits.
  (check-description-style, check-synopsis-style): Use it.
* tests/lint.scm: Add tests.
2014-10-26 13:03:53 -05:00
Eric Bavier 334c43e354 guix: lint: Check for empty synopses and descriptions.
* guix/scripts/lint.scm (check-description-style,
  check-synopsis-style): New emptiness checks.
* tests/lint.scm: Test them.
2014-10-26 13:03:53 -05:00
Eric Bavier 574e847b8e guix: lint: Check for proper end-of-sentence space.
* guix/scripts/lint.scm (start-with-capital-letter?): Handle empty
  strings.
  (check-description-style): New check for end-of-sentence space.
* tests/lint.scm: Test it.
2014-10-26 13:03:53 -05:00
Eric Bavier c04b82ffce guix: lint: Use if/when consistently.
* guix/scripts/lint.scm (check-synopsis-style): Replace single-branch
  uses of if with when.
  (check-patches): Same
2014-10-26 13:03:53 -05:00
Eric Bavier 86a4126348 guix: lint: Use string-suffix? and string-prefix? where appropriate.
* guix/scripts/lint.scm (check-synopsis): Use string-suffix? and
  string-prefix? in place of string-take and string=?.
2014-10-26 13:03:53 -05:00
Cyril Roelandt 68b18aae6a guix import pypi: Fix a typo in a docstring.
* guix/import/pypi.scm (snake-case): Fix documentation.
2014-10-22 02:47:29 +02:00
Cyril Roelandt a5ffa812b8 guix import pypi: do not add "python-" to a package name if it's already there.
* guix/import/pypi.scm (make-pypi-sexp): test whether the package name starts
  with "python-" before modifying it.
2014-10-22 02:47:29 +02:00
Cyril Roelandt cf690129b4 guix import pypi: add the Apache License 2.0
* guix/import/pypi.scm (string->license): add ASL2.0.
2014-10-22 02:47:29 +02:00
Eric Bavier 05b4226ad9 refresh: Add end-of-line to error message.
* guix/scripts/refresh.scm (%options)[select]: Add end-of-line to
  error message.
2014-10-20 17:03:02 -05:00
Ian Denhardt 29a7c98a42 gnu: Add 'version-prefix' and 'version-major+minor'; use them.
The procedure version-prefix truncates a version string to a certain
number of components. version-major+minor is a special case of this,
which extracts the "major.minor" part of the string. Previously this
was handled by an expression common to several packages.

* guix/utils.scm (version-prefix, version-major+minor): New procedures
* gnu/packages/backup.scm (duplicity): Use version-major+minor.
* gnu/packages/cmake.scm (cmake): Likewise.
* gnu/packages/gnome.scm (libbonobo, libbonoboui): Likewise.
* gnu/packages/gnutls.scm (gnutls): Likewise.
* gnu/packages/mail.scm (gmime): Likewise.
* gnu/packages/mpd.scm (mpd): Likewise.
* gnu/packages/mpi.scm (openmpi): Likewise.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2014-10-20 15:32:54 +02:00
Ludovic Courtès 38bf090e7c download: Add "Accept: */*" to the headers.
Fixes downloads from https://alioth.debian.org.
Reported by John Darrington <jmd@gnu.org>.

* guix/build/download.scm (http-fetch)[headers]: Add 'Accept'.
2014-10-19 12:07:53 +02:00
Ludovic Courtès 7c3c0374de packages: Add 'package-transitive-supported-systems'.
* guix/packages.scm (package-transitive-supported-systems): New procedure.
* tests/packages.scm ("package-transitive-supported-systems"): New test.
* build-aux/hydra/gnu-system.scm (package->job): Use it.
2014-10-17 23:23:21 +02:00
Ludovic Courtès e5997888fa derivations: 'graft-derivation' correctly handles multiple-output sources.
* guix/derivations.scm (graft-derivation): Add DRV as input for each one
  of OUTPUT-NAMES.
2014-10-17 23:23:20 +02:00
Ludovic Courtès 8dcec91426 packages: Improve the package-to-derivation cache.
* guix/packages.scm (cache): Preserve the former values associated with
  PACKAGE.
  (cached): Bind SYSTEM in 'let', to prevent double evaluation.
2014-10-17 23:23:20 +02:00
Ludovic Courtès 3d7d17b318 derivations: Add #:system parameter to 'graft-derivation'.
* guix/derivations.scm (graft-derivation): Add #:system parameter.
2014-10-17 23:23:20 +02:00
Ludovic Courtès 969df97487 derivations: Introduce 'graft' record type.
* guix/derivations.scm (<graft>): New record type.
  (graft-derivation): Rename 'replacements' to 'grafts', and expect it
  to be a list of <graft> records.  Adjust accordingly.
* tests/derivations.scm ("graft-derivation"): Use 'graft' instead of
  pairs in argument to 'graft-derivation'.
2014-10-17 23:23:20 +02:00
Ludovic Courtès e25408849a records: Improve the docstring of 'define-record-type*'.
* guix/records.scm (define-record-type*): Agument the docstring, give
  examples.
2014-10-17 23:23:20 +02:00