Commit Graph

236 Commits

Author SHA1 Message Date
Ludovic Courtès 86eee976f5
Revert "packages: Optimize 'package-transitive-supported-systems'."
This reverts commit 24420f5ffa.

This broke 'package-transitive-supported-systems', which would return
the union of supported systems instead of the intersection.
2018-07-03 17:50:04 +02:00
Ludovic Courtès 24420f5ffa
packages: Optimize 'package-transitive-supported-systems'.
This version is 13% faster than the one above when timing:

  (fold-packages (lambda (p x)
		   (package-transitive-supported-systems p))
		 '())

* guix/packages.scm (package-transitive-supported-systems): Make
'systems' a set instead of calling 'lset-intersection' repeatedly.
2018-07-03 00:39:10 +02:00
Ludovic Courtès c423ae8918
packages: Add 'package-patched-vulnerabilities'.
* guix/packages.scm (patch-file-name): New procedure.
(%vulnerability-regexp): New variable.
(package-patched-vulnerabilities): New procedure.
* guix/scripts/lint.scm (patch-file-name): Remove.
(check-vulnerabilities): Adjust to use
'package-patched-vulnerabilities'.
* tests/packages.scm ("package-patched-vulnerabilities"): New test.
2018-06-09 12:02:28 +02:00
Mark H Weaver 539bf8f2c0
Merge branch 'master' into core-updates 2018-05-17 01:00:50 -04:00
Chris Marusich ede121de42
guix: Separate the package name and version with "@", not "-".
* guix/packages.scm (package-full-name): By default, use "@" to separate
  the package name and package version.  Add an optional delimiter
  argument so that there is still a way to explicitly use a different
  delimiter.
* gnu/packages/commencement.scm (gcc-boot0) <unpack-gmp&co>: Adjust
  accordingly.
* tests/graph.scm: Adjust accordingly.
* tests/profiles.scm: Adjust accordingly.
* NEWS: Mention the change.

Fixes: <https://bugs.gnu.org/31088>.
Reported by Pierre Neidhardt <ambrevar@gmail.com>.
2018-05-08 21:55:46 -07:00
Mark H Weaver daac9c77b9
packages: Issue a warning unless the snippet returns #t.
* guix/packages.scm (patch-and-repack): Issue a warning if the snippet
returns a value other than #t.
2018-03-16 09:08:20 -04:00
Mark H Weaver 5732008757
packages: Update copyright notice.
This is a followup to commit 5003aeaf2560d6ddebcf980a94785fba77e00f34.

* guix/packages.scm: Update copyright notice for Mark H Weaver.
2018-03-16 05:33:21 -04:00
Mark H Weaver 00d9494d80
packages: patch-and-repack: Fix snippet handling.
This is a followup to commit 5003aeaf2560d6ddebcf980a94785fba77e00f34.

* guix/packages.scm (patch-and-repack): For the snippet, generate a single
boolean expression for 'unless', instead of the list of expressions which had
previously been spliced into an 'and' form (prior to commit 5003aea).
2018-03-16 05:28:31 -04:00
Mark H Weaver 7ac1b4084f
packages: patch-and-repack: Use invoke instead of system*.
* guix/packages.scm (patch-and-repack): Use invoke and remove vestigial
plumbing.
2018-03-16 05:01:41 -04:00
Mark H Weaver e074a655dd
Merge branch 'master' into core-updates 2018-01-19 23:59:20 -05:00
Ludovic Courtès 20fe727105
packages: 'package-mapping' maps replacement.
* guix/packages.scm (package-mapping): Apply PROC to 'replacement' as well.
2018-01-20 00:45:29 +01:00
Ludovic Courtès 8102cf0b37
gnu: commencement: Memoize 'linux-libre-headers-boot0'.
Fixes <https://bugs.gnu.org/30155>.

The effect can be seen in the package graph produced by:

  guix graph -e '(@@ (gnu packages commencement) static-bash-for-glibc)'

This reduces the number of "duplicate" nodes in this graph, i.e.,
distinct package objects that correspond to the same derivation (objects
that are not 'eq?' but semantically equal.)

* gnu/packages/commencement.scm (linux-libre-headers-boot0): Make an
'mlambda' instead of a 'lambda'.
(hurd-core-headers-boot0): Ditto.
2018-01-18 16:14:06 +01:00
Marius Bakke 9e111db453
Merge branch 'master' into core-updates 2017-12-07 18:26:11 +01:00
Ludovic Courtès 609d126e86
Revert "packages: 'package-grafts' trims native inputs."
This reverts commit 91c9b5d016
following the concerns raised by Mark, Ben, and Tobias:
<https://lists.gnu.org/archive/html/guix-devel/2017-12/msg00081.html>.
2017-12-06 09:07:28 +01:00
Marius Bakke 77181815ae
Merge branch 'master' into core-updates 2017-12-05 23:41:30 +01:00
Ludovic Courtès 91c9b5d016
packages: 'package-grafts' trims native inputs.
'package-grafts' returns a list of potentially applicable grafts, which
'cumulative-grafts' then narrows by looking at store item references and
determining the subset of the grafts that's actually applicable.

Until now, 'package-grafts' would traverse native inputs and would thus
return a large superset of the applicable grafts, since native inputs
are not in the reference graph by definition.  This patch fixes that by
having 'package-grafts' ignore entirely native inputs from the
dependency graph.

* guix/packages.scm (fold-bag-dependencies)[bag-direct-inputs*]: Add
special case for libc.
* guix/packages.scm (bag-grafts)[native-grafts, target-grafts]: Remove.
[grafts]: New procedure.
Use it.
* tests/packages.scm ("package-grafts, grafts of native inputs
ignored"): New test.
2017-12-05 16:32:40 +01:00
Ludovic Courtès ff0e0041f3
packages: 'fold-bag-dependencies' honors nativeness in recursive calls.
Previously recursive calls to 'loop' would always consider all the bag
inputs rather than those corresponding to NATIVE?.

* guix/packages.scm (fold-bag-dependencies)[bag-direct-inputs*]: New
procedure.  Use it both in the 'match' expression and in its body.
2017-12-05 15:13:38 +01:00
Marius Bakke c6bc8e22e9
gnu: glibc: Don't use full version string in locale path.
This is a follow-up to commit ee3ebf1a35.
Fixes <https://bugs.gnu.org/29537>.

* gnu/packages/base.scm (glibc/linux)[version]: Change to 2.26.91-gaaa2eb83b8.
[source](uri): Adjust accordingly.
[arguments]: Use VERSION-MAJOR+MINOR for locales path.
(glibc-locales, glibc-utf8-locales): Likewise.
* guix/packages.scm (patch-and-repack): Likewise.
* guix/profiles.scm (ca-certificate-bundle, profile-derivation): Likewise.
2017-12-03 16:23:43 +01:00
Ludovic Courtès a912c723f7
gexp: 'compiled-modules' disables deprecation warnings by default.
This avoids repeated deprecation messages, particularly while running
'guix system build' or similar.

* guix/gexp.scm (gexp->derivation): Add #:deprecation-warnings.  Pass it
to 'compiled-modules'.
(compiled-modules): Add #:deprecation-warnings and honor it.
* doc/guix.texi (G-Expressions): Update 'gexp->derivation'
documentation.
* guix/packages.scm (patch-and-repack): Pass #:deprecation-warnings #t.
2017-11-29 16:44:54 +01:00
Ludovic Courtès e4925e00ca
packages: Use Guile 2.0 for grafting.
Works around <https://bugs.gnu.org/28211>.
Reported by Marius Bakke <mbakke@fastmail.com>.

* guix/packages.scm (guile-2.0): New procedure.
(package-derivation, package-cross-derivation): Use it when computing
the #:guile argument to 'graft-derivation'.
2017-08-24 00:41:44 +02:00
Leo Famulari c8eb2b8c60
Merge branch 'master' into core-updates 2017-07-10 14:37:53 -04:00
Ludovic Courtès d5ec5ed719
packages: Mark 'replacement' as an "innate" field.
Suggested by Mark H Weaver
at <https://lists.gnu.org/archive/html/guix-devel/2017-06/msg00355.html>.

* guix/packages.scm (<package>)[replacement]: Mark as "innate".
* gnu/packages/base.scm (glibc-2.25-patched, glibc-2.24)
(glibc-2.23, glibc-2.22, glibc-2.21, glibc-locales): Remove
'replacement' field, which was set to #f.
* gnu/packages/commencement.scm (perl-boot0): Likewise.
* gnu/packages/fontutils.scm (graphite2/fixed): Likewise.
* gnu/packages/ghostscript.scm (ghostscript/fixed): Likewise.
* gnu/packages/gnupg.scm (libgcrypt-1.7.8): Likewise.
* gnu/packages/guile.scm (guile-2.0/fixed, guile-2.2): Likewise.
* gnu/packages/icu4c.scm (icu4c/fixed): Likewise.
* gnu/packages/image.scm (libpng-apng): Likewise.
* gnu/packages/make-bootstrap.scm (%guile-static): Likewise.
* gnu/packages/pcre.scm (pcre/fixed): Likewise.
* gnu/packages/perl.scm (perl/fixed): Likewise.
* gnu/packages/ruby.scm (ruby-2.3, ruby-2.2, ruby-2.1)
(ruby-1.8): Likewise.
* gnu/packages/tls.scm (gnutls-3.5.13, gnutls/guile-2.2): Likewise.
* gnu/packages/xml.scm (expat-2.2.1): Likewise.
2017-07-03 23:51:22 +02:00
Mark H Weaver ed068b960e
Merge branch 'master' into core-updates 2017-06-26 00:00:58 -04:00
Arun Isaac 148585c240
gnu: Move contents of zip module into compression module.
* gnu/packages/zip.scm (zip, unzip, zziplib, perl-zip): Move to...
* gnu/packages/compression.scm: ...here.
* gnu/packages/zip.scm: Delete file.
* gnu/local.mk (GNU_SYSTEM_MODULES): Unregister deleted file.
* po/packages/POTFILES.in: Unregister deleted file.
* gnu/packages/{audio, avr, bioinformatics, busybox, cdrom, ci, compression,
docbook, documentation, fonts, fpga, game-development, games, gl, gnome,
gnuzilla, graphics, guile, haskell, image, java, kodi, ldc, libreoffice,
markup, maths, mc, monitoring, music, php, pretty-print, python, scheme,
smalltalk, statistics, synergy, tex, textutils, video, web-browsers, xml,
zip}.scm, guix/build-system/{ant, font}.scm, guix/{download, packages}.scm:
Adapt module import.
2017-06-20 18:10:35 +05:30
Mark H Weaver 9d4385634d
Merge branch 'master' into core-updates 2017-06-18 02:36:51 -04:00
Ludovic Courtès 7ebc6cf869
packages: Patches can be any lowerable object.
* guix/packages.scm (patch-and-repack)[instantiate-patch]: Replace
'origin?' with 'struct?'.
2017-06-15 23:07:47 +02:00
Ricardo Wurmus d1a914082b
Merge branch 'master' into core-updates 2017-05-24 12:05:47 +02:00
Efraim Flashner 59d0f067ff
packages: Add aarch64-linux to %supported-systems.
* guix/packages.scm (%supported-systems): Add aarch64-linux.
(%hydra-supported-systems): Remove aarch64-linux.
2017-05-23 21:51:36 +03:00
Mark H Weaver bedba06426
Add package/inherit.
* guix/packages.scm (package/inherit): New public macro.
2017-05-02 04:19:09 -04:00
Leo Famulari c8a3dea847
packages: Enable threaded compression of source tarballs.
This provides a ~2x speedup when using 4 threads.

* guix/packages.scm (patch-and-repack)[build]: Invoke xz with
'--threads=0' when re-packing tarballs.
2017-04-15 18:34:59 -04:00
Ludovic Courtès f37f2b83fa
packages: Add 'package-mapping' and base 'package-input-rewriting' on it.
* guix/packages.scm (package-mapping): New procedure.
(package-input-rewriting): Rewrite in terms of 'package-mapping'.
* tests/packages.scm ("package-mapping"): New test.
* doc/guix.texi (Defining Packages): Document it.
2017-04-05 22:45:41 +02:00
Ludovic Courtès 76c486196f
packages: Catch invalid input errors for structs.
Reported by Thomas Sigurdsen <thomas.sigurdsen@gmail.com>
at <https://lists.gnu.org/archive/html/help-guix/2017-04/msg00007.html>.

* guix/packages.scm (expand-input): Add 'guard' form around call to
'package-source-derivation'.
* tests/packages.scm (dummy): New test.
2017-04-04 00:10:00 +02:00
Ludovic Courtès cdb3f734cf
packages: Remove "mips64el-linux" from '%hydra-supported-systems'.
* guix/packages.scm (%hydra-supported-systems): Remove "mips64el-linux".
2017-03-29 22:50:42 +02:00
Ludovic Courtès c9134e82fe
packages: Remove 'define-memoized/v' and use 'mlambdaq' instead.
* guix/packages.scm (define-memoized/v): Remove.
(package-transitive-supported-systems): Use 'mlambdaq' instead of
'define-memoized/v'.
(package-input-rewriting)[replace]: Likewise.
2017-01-28 18:55:20 +01:00
Ludovic Courtès 3b0fcc672d
packages: Add 'package-upstream-name' and use it.
* guix/packages.scm (package-upstream-name): New procedure.
* guix/gnu-maintenance.scm (gnu-package?, ftp-server/directory)
(latest-release*, latest-gnome-release)
(latest-kde-release): Use it instead of the inline expression.
2017-01-28 00:38:20 +01:00
Mark H Weaver dcaf70897a
Merge branch 'master' into core-updates 2016-10-17 16:47:12 -04:00
Ludovic Courtès d0025d0144
packages: 'package-grafts' applies grafts on replacement.
Partly fixes <http://bugs.gnu.org/24418>.

* guix/packages.scm (input-graft): Compute 'new' with #:graft? #t.
(input-cross-graft): Likewise.
* tests/packages.scm ("package-grafts, indirect grafts, cross"): Comment
out.
("replacement also grafted"): New test.
2016-10-14 23:05:41 +02:00
Ludovic Courtès 79355ae3e8
Merge branch 'master' into core-updates 2016-09-30 12:05:27 +02:00
Ludovic Courtès 1cdecf24f5
gexp: Store compilers in a hash table for O(1) lookup.
* guix/gexp.scm (<gexp-compiler>)[predicate]: Remove.
[type]: New field.
(%gexp-compilers): Turn into a hash table.
(register-compiler!, lookup-compiler, lookup-expander): Adjust
accordingly.
(define-gexp-compiler): Replace 'predicate' by 'record-type'.
(derivation-compiler, local-file-compiler, plain-file-compiler)
(computed-file-compiler, program-file-compiler, scheme-file-compiler)
(file-append-compiler): Adjust accordingly.
* guix/packages.scm (package-compiler, origin-compiler): Likewise.
2016-09-10 13:10:06 +02:00
Ludovic Courtès 01afdab89c
packages: Add 'package-superseded' and associated support.
This provides a way to mark a package as superseded by another one.
Upgrades replace superseded packages with their replacement.

* guix/packages.scm (package-superseded, deprecated-package): New
procedures.
* gnu/packages.scm (%find-package): Check for 'package-superseded'.
* guix/scripts/package.scm (transaction-upgrade-entry)[supersede]: New
procedure.  Call it when 'package-superseded' is true.
* tests/guix-build.sh: Add test for a superseded package.
* tests/packages.scm ("package-superseded")
("transaction-upgrade-entry, superseded package"): New tests.
2016-09-06 23:22:10 +02:00
Ludovic Courtès 072e10615f
Merge branch 'master' into core-updates 2016-09-02 15:39:50 +02:00
Ludovic Courtès 2a75b0b63d
packages: Add 'package-input-rewriting'.
* guix/packages.scm (package-input-rewriting): New procedure.
* tests/packages.scm ("package-input-rewriting"): New test.
* doc/guix.texi (Defining Packages): Document it.
(Package Transformation Options): Add cross-reference.
2016-09-01 23:07:54 +02:00
Alex Kost 8d65c71f12
packages: Use '--no-backup-if-mismatch' for patching.
Suggested-by: Ludovic Courtès <ludo@gnu.org>

* guix/packages.scm (patch-and-repack)[build]: Use
  '--no-backup-if-mismatch' patch flag to avoid making *.orig files.
2016-08-10 15:29:40 -04:00
Ludovic Courtès 6980511b73
packages: Add 'hidden-package'.
* guix/packages.scm (hidden-package, hidden-package?): New procedures.
* gnu/packages.scm (fold-packages): Filter out 'hidden-package?'.
* tests/packages.scm ("hidden-package"): New test.
2016-07-28 18:50:43 +02:00
Ludovic Courtès 1929fdba80
packages: <origin> no longer has an 'imported-modules' field.
* guix/packages.scm (<origin>)[imported-modules]: Remove.
(patch-and-repack): Remove #:imported-modules.  Use
'with-imported-modules'.  Remove #:modules argument to
'gexp->derivation'.
(origin->derivation): Adjust accordingly.
* doc/guix.texi (origin Reference): Adjust accordingly.
2016-07-12 22:47:08 +02:00
Ludovic Courtès a7db719f3d
packages: Disambiguate 'modules' and 'imported-modules' in <origin>.
The two mistakes made here (confusion between 'modules' and
'imported-modules') were canceling each other.

* guix/packages.scm (patch-and-repack): Use IMPORTED-MODULES, not
MODULES, as the base of the module list passed as #:modules to
'gexp->derivation'.
(origin->derivation): Pass IMPORTED-MODULES, not MODULES, as
the #:imported-modules argument of 'patch-and-repack'.
* gnu/packages/engineering.scm (fastcap)[source]: Add 'imported-modules'
field.
2016-06-16 14:31:52 +02:00
Ludovic Courtès da675305dd
packages: The 'source' can be any lowerable object.
* guix/packages.scm (expand-input): Use 'struct?' instead of 'origin?'
when matching SOURCE.
(package-source-derivation): Use 'lower-object' instead of
'origin->derivation'.
* tests/packages.scm ("package-source-derivation, local-file"): New
test.
* doc/guix.texi (package Reference): Update 'source' documentation
accordingly.
2016-06-15 15:26:30 +02:00
Ludovic Courtès 789510640d
packages: 'origin->derivation' expects an origin and nothing else.
* guix/packages.scm (origin->derivation): Rename 'source' parameter to
'origin'.  Move cases where SOURCE is a string to...
(package-source-derivation): ... here.
2016-06-15 15:26:30 +02:00
Ludovic Courtès 5257ab6de2
packages: Recognize the '.Z' extension.
Reported by thomasd on #guix.

* guix/packages.scm (patch-and-repack)[decompression-type]: Add "Z".
2016-06-15 15:26:30 +02:00
Ludovic Courtès ced71ac7a7 packages: Cache the result of 'input-grafts'.
This reduces the wall-clock time of

  guix environment gnutls --pure -E true

by ~35%.

* guix/packages.scm (%graft-cache): New variable.
(input-graft): Use 'cached' to cache to %GRAFT-CACHE.
2016-03-08 00:01:13 +01:00
Ludovic Courtès 9775412ee0 packages: Cache the result of 'package->bag'.
This reduces the wall-clock time of

  guix environment gnutls --pure -E true

by ~25%.

* guix/packages.scm (%bag-cache): New variable.
(package->bag): Use 'cached' to cache things to %BAG-CACHE.
2016-03-08 00:01:13 +01:00
Ludovic Courtès 198d84b70b packages: Generalize the 'cached' macro.
* guix/packages.scm (cache): Rename to...
  (cache!): ... this.  Add 'cache' parameter, and use it.
  (cached): Add a rule to allow the cache to be specified.
2016-03-08 00:01:13 +01:00
Ludovic Courtès fcadd9ff9d packages: The result of 'bag-grafts' does not contain duplicates.
* guix/packages.scm (bag-grafts): Add call to 'delete-duplicates'.
2016-03-05 00:19:10 +01:00
Ludovic Courtès c22a1324e6 grafts: Graft recursively.
Fixes <http://bugs.gnu.org/22139>.

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

* guix/packages.scm (patch-and-repack)[build]: Append "/X.Y" to
  LOCPATH.
2015-10-04 10:19:42 +02:00
Ludovic Courtès afd3d9316c Use "normalized codesets" everywhere.
In other words, change "xx_YY.UTF-8" to "xx_YY.utf8".

* guix/profiles.scm (ca-certificate-bundle): Use "en_US.utf8" instead of
  "en_US.UTF-8".
* guix/packages.scm (patch-and-repack): Likewise.
* guix/build/gnu-build-system.scm (install-locale): Likewise.
* guix/build-system/gnu.scm (gnu-build, gnu-cross-build): Likewise.
* gnu/packages/python.scm (python-ipython): Likewise.
* gnu/packages/gawk.scm (gawk): Likewise.
* build-aux/hydra/demo-os.scm: Likewise.
* gnu/packages/guile.scm (guile-ncurses)[arguments]: Remove
  'change-locale' phase.
2015-10-04 00:10:03 +02:00
Mark H Weaver bd90127ad4 Merge branch 'master' into core-updates 2015-09-22 16:38:48 -04:00
Eric Bavier 3b4d01035f guix: packages: Add origin-actual-file-name.
* guix/scripts/graph.scm (uri->file-name, node-full-name): Move origin file
  name logic to...
* guix/packages.scm (origin-actual-file-name): ...here.
* tests/packages.scm ("origin-actual-file-name")
  ("origin-actual-file-name, file-name"): New tests.
2015-09-14 18:02:37 -05:00
Ludovic Courtès 75710da667 Merge branch 'master' into core-updates 2015-09-13 21:28:01 +02:00
Eric Bavier a6d0b306c2 guix: packages: Add transitive-input-references.
* guix/packages.scm (transitive-input-references): New procedure.
* gnu/packages/version-control.scm (package-transitive-propagated-labels*)
  (package-propagated-input-refs): Delete.
  (git)[arguments]: Adjust to transitive-input-references.
2015-09-10 03:21:55 -05:00
Mark H Weaver 140b4bc6cd packages: Build tarballs in sorted order even if tar doesn't support it.
This is a followup to commit 92226a470d.

* guix/packages.scm (patch-and-repack)[build]: Determine if tar supports the
  "--sort=name" option using a run-time test.  If not supported, generate the
  sorted file list with 'find-files' and pass it to tar using "--files-from".
2015-09-06 17:25:51 -04:00
Ludovic Courtès 035b6ff707 packages: Define '%hurd-systems'.
* guix/packages.scm (%hurd-systems): New variable.
2015-09-04 13:50:38 +02:00
Mark H Weaver 92226a470d Build tarballs with deterministic file ordering.
* guix/packages.scm (patch-and-repack)[build],
  gnu/system/install.scm (self-contained-tarball)[build],
  gnu/packages/make-bootstrap.scm (tarball-package),
  gnu/packages/admin.scm (isc-dhcp),
  gnu/packages/video.scm (avidemux): Pass "--sort=name" to 'tar'.
2015-09-03 12:57:01 -04:00
Mark H Weaver 52c20d8e15 packages: Add 'armhf-linux' to '%hydra-supported-systems'.
* guix/packages.scm (%hydra-supported-systems): Do not remove 'armhf-linux'
  from it.  It is now equal to '%supported-systems'.
2015-09-02 19:59:12 -04:00
Mark H Weaver 2e9511dfbd packages: patch-and-repack: Build tarballs deterministically.
* guix/packages.scm (patch-and-repack)[build]: When invoking 'tar' to repack
  the archive, pass "--mtime=@0", "--owner=root:0", and "--group=root:0".
2015-07-14 19:41:20 -04:00
Ludovic Courtès 161094c8e2 packages: Rewrite 'transitive-inputs' to be linear and remove duplicates.
There were two issues:

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

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

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

* guix/packages.scm (transitive-inputs): Rewrite as a breadth-first
  traversal.  Remove duplicate propagated inputs.
* tests/packages.scm ("package-transitive-inputs", "package->bag, propagated
  inputs"): Adjust to use simple labels for propagated inputs, without "/".
  ("package-transitive-inputs, no duplicates"): New test.
2015-07-12 01:27:00 +02:00
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
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
Mark H Weaver 1492801655 Merge branch 'master' into core-updates 2015-06-10 17:50:27 -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
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 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
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 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
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 bbceb0ef8a packages: Add 'supported-package?'.
* guix/packages.scm (supported-package?): New procedure.
* tests/packages.scm ("supported-package?"): New test.
* build-aux/hydra/gnu-system.scm (package->job): Use it instead of
  'package-transitive-supported-systems'.
2015-04-19 23:34:53 +02:00
Ludovic Courtès 1590e8a1dd packages: Refer to the native tools when handling sources and downloads.
* guix/packages.scm (patch-and-repack)[build]: Change most #$ to #+.
* guix/cvs-download.scm (cvs-fetch)[build]: Likewise.
* guix/download.scm (url-fetch)[builder]: Likewise.
* guix/git-download.scm (git-fetch)[build]: Likewise.
* guix/svn-download.scm (svn-fetch)[build]: Likewise.
2015-04-15 10:19:47 +02:00
Ludovic Courtès 9bf3ced06c packages: 'package-transitive-supported-systems' accounts for implicit inputs.
Reported by Federico Beffa.

* guix/packages.scm (package-transitive-supported-systems): Use
  bag-direct-inputs + package->bag rather than package-direct-inputs.
* tests/packages.scm ("package-transitive-supported-systems"): Add
  explicit 'build-system' field to each 'dummy-package' form.
  ("package-transitive-supported-systems, implicit inputs"): New test.
2015-04-11 13:06:23 +02:00
Ludovic Courtès cceab87536 packages: Add 'bag-direct-inputs'.
* guix/packages.scm (bag-direct-inputs): New procedure.
  (bag-transitive-inputs): Use it.
2015-04-11 13:06:23 +02:00
Eric Bavier 17287d7d47 packages: Add zip archive support to 'patch-and-repack'.
Fixes <http://bugs.gnu.org/19830>.

* guix/packages.scm (%standard-patch-inputs): Add "unzip".
  (patch-and-repack)[decompression-type]: Detect zip archive.
  [build]: Invoke "unzip" when appropriate.
2015-03-24 15:59:30 -05:00
Ludovic Courtès a158484db4 packages: Make sure the patch inputs are not #f.
Fixes build issues whereby #:inputs would be #f.  See
<http://hydra.gnu.org/build/320333/nixlog/4/tail-reload>.

* guix/packages.scm (patch-and-repack): #:input defaults to #f.
  [lookup-input]: When INPUTS is #f, use (%standard-patch-inputs).
2015-03-21 22:07:16 +01:00
Ludovic Courtès ec3b1c575d gnu: Use 'glibc-utf8-locales-final' in the default patching inputs.
* gnu/packages/commencement.scm (glibc-utf8-locales-final): Make public.
* guix/packages.scm (%standard-patch-inputs): Use
  GLIBC-UTF8-LOCALES-FINAL instead of GLIBC-UTF8-LOCALES.
2015-03-21 21:58:04 +01:00
Ludovic Courtès cf87cc894d packages: Rewrite 'patch-and-repack' using gexps.
* guix/packages.scm (patch-and-repack): Remove 'store' parameter and
  change default value of #:inputs to (%standard-patch-inputs).
  [lookup-input, instantiate-patch]: New procedures.
  [patch-inputs]: Remove.
  [builder]: Rename to...
  [build]: ... this.  Use gexps instead of sexps.
  (patch-and-repack*): Remove.
  (origin->derivation): Use 'patch-and-repack' instead of
  'patch-and-repack*'.
* tests/packages.scm ("package-source-derivation,
  snippet")[source](snippet): Remove references to '%build-inputs' and
  '%outputs'.
2015-03-18 19:07:36 +01:00
Ludovic Courtès ff40e9b7e5 gexp: Move the package and origin compilers to (guix packages).
From now own, (guix packages) depends on (guix gexps); it was the other
way around now.  This means that (guix packages) code can use gexps.

* guix/gexp.scm (origin-compiler, package-compiler): Remove.
  (default-guile-derivation): New procedure.
  (gexp->derivation): Use it instead of 'default-guile' +
  'package->derivation'.
* guix/packages.scm (default-guile-derivation): New procedure.
  (package-compiler, origin-compiler): New variables.
* doc/guix.texi (G-Expressions): Mention extensibility.
2015-03-17 22:25:55 +01:00
Ludovic Courtès 9d8100f4c7 packages: Move grafting parameter to (guix derivations).
* guix/packages.scm (%graft?, set-grafting): Move to...
* guix/derivations.scm: ... here.
2015-03-17 22:25:55 +01:00
Ludovic Courtès 4db87162e6 packages: Set the port conversion strategy to 'error'.
Suggested by Mark H Weaver.

* guix/build/gnu-build-system.scm (gnu-build): Set
  %DEFAULT-PORT-CONVERSION-STRATEGY to 'error.
* guix/packages.scm (patch-and-repack)[builder]: Likewise.
2015-02-28 01:10:24 +01:00
Ludovic Courtès 9cca706c2e packages: When possible, use a UTF-8 locale in patch-and-repack.
* guix/packages.scm (%standard-patch-inputs): Add "locales".
  (patch-and-repack)[builder]: Add 'locales' variable.  When it is true,
  call 'setenv' and 'setlocale'.
2015-02-27 00:03:17 +01:00
Ludovic Courtès b8bedf6051 packages: Add 'set-grafting' procedure.
* guix/packages.scm (set-grafting): New procedure.
2015-02-13 23:19:49 +01:00
Ludovic Courtès 6b1f9721a8 packages: Mark the 'patches' field as delayed.
* guix/packages.scm (<origin>)[patches]: Mark as 'delayed'.
  (print-origin, origin->derivation): Add call to 'force' when accessing
  'patches'.
2015-01-20 09:59:56 +01:00
Ludovic Courtès 4e190c2803 store: Make '%store-monad' an alias for '%state-monad'.
* 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-17 23:45:48 +01:00
Ludovic Courtès 57b7e1a62d Merge branch 'core-updates'
Conflicts:
	gnu/packages/bootstrap.scm
2015-01-16 13:27:03 +01:00
Ludovic Courtès f220a83848 packages: Convert source derivations to monadic style.
* guix/packages.scm (origin->derivation): Take body from
  'package-source-derivation', and change it to monadic style.  Expect
  METHOD to a monadic procedure.
  (package-source-derivation): Define in terms of 'origin->derivation'.
* guix/download.scm (url-fetch): Remove 'store' argument.  Remove
  'guile-for-build' variable.  Turn into a monadic procedure.
* guix/git-download.scm (git-fetch): Likewise.
* guix/svn-download.scm (svn-fetch): Likewise.
* tests/builders.scm (url-fetch*): New procedure.
  Change tests to call 'url-fetch*' instead of 'url-fetch'.
* tests/packages.scm ("package-source-derivation, snippet"): Remove
  'store' parameter of 'fetch' and change it to use 'interned-file'
  instead of 'add-to-store'.
* gnu/packages/bootstrap.scm (bootstrap-origin)[boot]: Remove 'store'
  parameter.
2015-01-14 14:42:10 +01:00
Ludovic Courtès e87f0591f3 monads: Move '%store-monad' and related procedures where they belong.
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-14 13:34:52 +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