summaryrefslogtreecommitdiff
path: root/guix
Commit message (Collapse)AuthorAge
* packages: Cache the result of 'input-grafts'.Ludovic Courtès2016-03-08
| | | | | | | | | | | 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.
* packages: Cache the result of 'package->bag'.Ludovic Courtès2016-03-08
| | | | | | | | | | | 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.
* packages: Generalize the 'cached' macro.Ludovic Courtès2016-03-08
| | | | | | * 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.
* import: snix: Use the right 'package-name->name+version'.Ludovic Courtès2016-03-06
| | | | | | | | Fixes a regression introduced in 1b846da8c372bee78851439fd9e72b2499115e5a. * guix/import/snix.scm: Use 'package-name->name+version' from (guix build utils).
* store: 'references/substitutes' correctly handles the order of substitutes.Ludovic Courtès2016-03-05
| | | | | | | | | | | | | | | Before that, 'references/substitutes' would assume that 'substitutable-path-info' would return things in the same order as its arguments, which is not the case. Thus, it would sometimes provide incorrect reference information, occasionally leading to infinite loop (because dependency information would denote cycles.) Fixes <http://bugs.gnu.org/22914>. Reported by Eric Bavier <ericbavier@openmailbox.org>. * guix/store.scm (references/substitutes): Make ITEMS the first argument of the loop; match on it. Use 'any' to find a matching substitute. (substitutable-path-info): Clarify docstring about ordering.
* grafts: Memoize intermediate results in 'cumulative-grafts'.Ludovic Courtès2016-03-05
| | | | | | | | | | | | | The time for: guix build inkscape -n --no-substitutes goes down by 30% (in the presence of 3 replacements among all the packages.) * guix/grafts.scm (cumulative-grafts): Turn into a monadic procedure in %STATE-MONAD. Use the current state as a derivation-to-graft cache. (graft-derivation): Call 'cumulative-grafts' within 'run-with-state'.
* packages: The result of 'bag-grafts' does not contain duplicates.Ludovic Courtès2016-03-05
| | | | * guix/packages.scm (bag-grafts): Add call to 'delete-duplicates'.
* grafts: Use dependency information from substitutes when possible.Ludovic Courtès2016-03-05
| | | | | | | | | | | | | | This avoids starting derivation builds just for the sake of knowing the references of their outputs, thereby restoring the expected behavior of --dry-run when substitutes are available. * guix/grafts.scm (non-self-references): Remove 'store' parameter, and add 'references'. Use it. Update caller. (references-oracle): New variable. (cumulative-grafts): Add 'references' parameter and use it. Update callers. (graft-derivation): Remove 'build-derivations' call. Add call to 'references-oracle'.
* store: Add 'references/substitutes'.Ludovic Courtès2016-03-05
| | | | | | * guix/store.scm (references/substitutes): New procedure. * tests/store.scm ("references/substitutes missing reference info") ("references/substitutes with substitute info"): New tests.
* tests: Narinfos can specify an non-empty reference list.Ludovic Courtès2016-03-05
| | | | | | | | * guix/tests.scm (derivation-narinfo): Add #:references and honor it. (call-with-derivation-narinfo, call-with-derivation-substitute): Likewise. (with-derivation-narinfo, with-derivation-substitute): Add 'references' keyword.
* guix build: Set the build options early.Ludovic Courtès2016-03-05
| | | | | | | | | | | | This fixes a bug whereby, with grafts leading to builds very early, build options such as --substitute-urls would not be taken into account yet. Reported by Andreas Enge <andreas@enge.fr>. * guix/scripts/build.scm (guix-build): Move 'opts' to the beginning. Use 'with-store' instead of 'open-connection'. Call 'set-build-options-from-command-line' right after 'with-store'.
* lint: cve: Gracefully handle HTTP errors.Ludovic Courtès2016-03-04
| | | | | * guix/scripts/lint.scm (current-vulnerabilities*): New procedure. (package-vulnerabilities): Use it.
* lint: derivation: Disable grafts, but check replacements.Ludovic Courtès2016-03-03
| | | | | * guix/scripts/lint.scm (check-derivation): Pass #:graft? #f. When 'package-replacement' exists, compute its derivation.
* guix build: -S returns the replacement's source.Ludovic Courtès2016-03-03
| | | | | | | | Reported by Mark H Weaver. * guix/scripts/build.scm (options->derivations): When SRC and GRAFT? are true, use the source of P's replacement. * tests/guix-build.sh: Add test.
* utils: Use '@' for separating package names and version numbers.Mathieu Lirzin2016-03-02
| | | | | | | | | | | | | | | | | | | | | This provides the ability to use numbers in package names. Fixes <http://bugs.gnu.org/19219>. * guix/utils.scm (package-name->name+version): New procedure. * gnu/packages.scm (%find-package): Add a FALLBACK? keyword argument. Use the previous method when no package is found. (specification->package+output, specification->package): Adapt documentation to new syntax. * doc/guix.texi (Invoking guix package, Invoking guix import): Likewise. * guix/ui.scm (package-specification->name+version+output): Likewise. * guix/scripts/import/hackage.scm (show-help): Likewise. * tests/guix-build.sh: Adapt to new syntax. * tests/guix-lint.sh: Likewise. * tests/guix-package.sh: Likewise. * tests/ui.scm ("package-specification->name+version+output"): Likewise. * tests/utils.scm ("package-name->name+version"): Likewise. * NEWS: Mention new syntax.
* graph: Ignore 'GUIX_BUILD_OPTIONS'.Ludovic Courtès2016-03-02
| | | | | | | | Previously 'GUIX_BUILD_OPTIONS' would be honored, but 'guix graph' does not support the common build options. * guix/scripts/graph.scm (guix-graph): Use 'args-fold*' instead of 'parse-command-line'.
* guix build: Move '--no-grafts' to the common build options.Ludovic Courtès2016-03-02
| | | | | | | | | | | | | | | | * guix/scripts/build.scm (%options): Move --no-grafts to... (%standard-build-options): ... here. (show-help, show-build-options-help): Adjust accordingly. * guix/scripts/archive.scm (%default-options): Add 'graft?'. (guix-archive): Parametrize '%graft?'. * guix/scripts/environment.scm (%default-options): Add 'graft?'. (guix-environment): Parametrize '%graft?'. * guix/scripts/package.scm (%default-options): Add 'graft?'. (guix-package): Parametrize '%graft?'. * guix/scripts/system.scm (%default-options): Add 'graft?'. (guix-system): Parametrize 'graft?'. * doc/guix.texi (Additional Build Options): Move --no-grafts to... (Common Build Options): ... here.
* guix archive: Use 'with-store'.Ludovic Courtès2016-03-02
| | | | | * guix/scripts/archive.scm (guix-archive): Use 'with-store' instead of an explicit 'open-connection'.
* grafts: Graft recursively.Ludovic Courtès2016-03-01
| | | | | | | | | | | | | | | | | | | | | | 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.
* grafts: Consider all the outputs in the graft mapping.Ludovic Courtès2016-02-27
| | | | | | | | | | | Before that, outputs of a derivation could be left referring to the ungrafted version of the derivation. * guix/grafts.scm (graft-derivation)[outputs]: Change to a list of name/file pairs. * guix/grafts.scm (graft-derivation)[build]: Add 'old-outputs' variable and use it when computing 'mapping'. Use 'mapping' directly. * tests/grafts.scm ("graft-derivation, multiple outputs"): New test.
* grafts: Slight simplification.Ludovic Courtès2016-02-27
| | | | | * guix/grafts.scm (graft-derivation)[output-names]: Use 'derivation-output-names'.
* grafts: Make sure files are not created world-writable.Ludovic Courtès2016-02-27
| | | | * guix/build/graft.scm (rewrite-directory): Add 'umask' call.
* import: Add github-updater.Ben Woodcroft2016-02-26
| | | | | | | * guix/import/github.scm: New file. * guix/scripts/refresh.scm (%updaters): Add %GITHUB-UPDATER. * doc/guix.texi (Invoking guix refresh): Mention it. * Makefile.am (MODULES): Add gnu/import/github.scm.
* store: 'path-info-deriver' is #f when there is no deriver.Ludovic Courtès2016-02-26
| | | | | | | * guix/store.scm (read-path-info): Use #f when we get the empty string for DERIVER. * guix/scripts/publish.scm (narinfo-string): Adjust accordingly. * tests/store.scm ("path-info-deriver"): New test.
* grafts: Add record type printer.Ludovic Courtès2016-02-26
| | | | | * guix/grafts.scm (write-graft): New procedure. Register it as a printer for <graft>.
* Merge branch 'media-updates'Mark H Weaver2016-02-25
|\
| * gnu-maintenance: Add X.org updater.Andy Wingo2016-02-24
| | | | | | | | | | | | | | | | | | | | * guix/gnu-maintenance.scm (xorg-package?, latest-xorg-release): New private functions. (%xorg-updater): New public variable. * guix/scripts/refresh.scm (%updaters): Add %xorg-updater. * doc/guix.texi (Invoking guix refresh): Mention the new updater.
* | http-client: 'http-client/cached' uses unique cache file names.Ludovic Courtès2016-02-25
| | | | | | | | | | | | * guix/http-client.scm (cache-file-for-uri): New procedure. (http-fetch/cached): Use it. Remove 'directory' variable. [update-cache]: Make the 'dirname' of FILE.
* | http-client: 'http-fetch/cached' updates the cache atomically.Ludovic Courtès2016-02-25
| | | | | | | | | | * guix/http-client.scm (http-fetch/cached)[update-cache]: Use 'with-atomic-file-output' instead of 'call-with-output-file'.
* | guix system: Restore load path after running the activation script.Ludovic Courtès2016-02-25
| | | | | | | | | | | | | | | | | | | | Fixes <http://bugs.gnu.org/22753>. Reported by Mark H Weaver <mhw@netris.org>. * guix/scripts/system.scm (save-load-path-excursion): New variable. (upgrade-shepherd-services): Add comment about the issue. (switch-to-system): Use 'save-load-path-excursion' around 'primitive-load' call.
* | store: Clarify documentation of 'valid-path?'.Ludovic Courtès2016-02-25
| | | | | | | | | | * guix/store.scm (valid-path?): Improve docstring. * doc/guix.texi (The Store): Update accordingly.
* | publish: Do not publish nars for invalid store items.Ludovic Courtès2016-02-25
|/ | | | | | | | | | | Before that, /nar requests could succeed if the requested store item exists but is invalid (although such requests were unlikely because the corresponding narinfo request would have failed.) * guix/scripts/publish.scm (render-nar): Add 'store' parameter. Use 'valid-path?' instead of 'file-exists?'. (make-request-handler): Adjust 'render-nar' call accordingly. * tests/publish.scm ("/nar/invalid"): New test.
* Do not check package freshness during upgrade.Alex Kost2016-02-24
| | | | | | | | | Fixes <http://bugs.gnu.org/22740>. Reported by Andreas Enge <andreas@enge.fr>. * gnu/packages.scm (waiting, ftp-open*, check-package-freshness): Remove. * guix/scripts/package.scm (options->installable): Adjust accordingly. * emacs/guix-main.scm (package->manifest-entry*): Likewise.
* publish: Move 'query-path-info' call where it belongs.Ludovic Courtès2016-02-24
| | | | | | * guix/scripts/publish.scm (narinfo-string): Remove 'path-info' parameter and add 'store' parameter. Call 'query-path-info'. (render-narinfo): Adjust accordingly.
* refresh: Remove unneeded import.Ludovic Courtès2016-02-23
| | | | | | | | | Reported by Leo Famulari <leo@famulari.name> and Ben Woodcroft <b.woodcroft@uq.edu.au> at <http://bugs.gnu.org/22752>. * guix/scripts/refresh.scm: Remove unneeded and harmful import of (guix import gem).
* grafts: 'name' parameter of 'graft-derivation' is now optional.Ludovic Courtès2016-02-22
| | | | | | | | * 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.
* derivations: Move grafts to (guix grafts).Ludovic Courtès2016-02-22
| | | | | | | | | | | | * 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.
* licenses: Add repoze license.Leo Famulari2016-02-22
| | | | * guix/licenses.scm (repoze): New variable.
* download: Add 'url-fetch/tarbomb'.Ludovic Courtès2016-02-22
| | | | | | | | | | | | | Suggested by Federico Beffa. Fixes <http://bugs.gnu.org/22676>. Reported by Danny Milosavljevic <dannym@scratchpost.org>. * gnu/packages/engineering.scm (broken-tarball-fetch): Remove. (fastcap)[source](method): Use URL-FETCH/TARBOMB instead. * gnu/packages/scheme.scm (broken-tarball-fetch): Remove. (scmutils)[source](method): Use URL-FETCH/TARBOMB instead. * guix/download.scm (url-fetch/tarbomb): New procedure, renamed from 'broken-tarball-fetch'.
* import: gem: Add updater.Ben Woodcroft2016-02-20
| | | | | | | | | | * guix/import/gem.scm (guix-package->gem-name, gem-package?, latest-release): New procedures. (%gem-updater): New variable. (rubygems-fetch): Wrap body in 'call-with-output-file' and 'with-error-to-port'. * guix/scripts/refresh.scm (%updaters): Add %GEM-UPDATER. * doc/guix.texi (Invoking guix refresh): Mention RubyGems.
* licenses: Add CC-BY-SA and CC-BY.Rene Saavedra2016-02-18
| | | | | | * guix/licenses.scm (cc-by-sa2.0, cc-by2.0): New variables. Signed-off-by: Alex Kost <alezost@gmail.com>
* licenses: Add tcl/tk license.Jan Nieuwenhuizen2016-02-12
| | | | | | * guix/licenses.scm (tcl/tk): New variable. Signed-off-by: Leo Famulari <leo@famulari.name>
* scripts: environment: Build environments as profiles.David Thompson2016-02-12
| | | | | | | | | | | | | | | | | | | | | | | | | Fixes <http://bugs.gnu.org/19816>. * guix/scripts/environment.scm (evaluate-input-search-paths) (build-inputs): Delete. (evaluate-profile-search-paths, strip-input-name) (package-or-package+output?, package-environment-inputs) (build-environment, inputs->profile-derivations): New procedures. (create-environment, show-search-paths, launch-environment) (launch-environment/container): Replace 'inputs' argument with 'profile' argument. (package+propagated-inputs): Strip off names off of input tuples. (options/resolve-packages): Handle input tuples that specify an output in expressions. (guix-environment): Convert inputs into a profile to use in the environment. Remove non-package inputs such as origins from environment inputs. * doc/guix.texi ("invoking guix environment"): Document package+output tuples for --expression option. * tests/guix-environment.sh: Update tests. * tests/guix-environment-container.sh: Likewise. Co-authored-by: Ludovic Courtès <ludo@gnu.org>
* profiles: Add #:system argument to profile-derivation.Ludovic Courtès2016-02-12
| | | | | | | Suggested by David Thompson <davet@gnu.org>. * guix/profiles.scm (profile-derivation): Add #:system parameter and honor it.
* store: Add monadic access to '%current-system'.Ludovic Courtès2016-02-12
| | | | | * guix/store.scm (current-system, set-current-system): New procedures. * tests/store.scm ("current-system"): New test.
* Add (guix build bournish) and use it in the initrd.Ludovic Courtès2016-02-08
| | | | | | | * guix/build/bournish.scm: New file. * Makefile.am (MODULES): Add it. * gnu/system/linux-initrd.scm (base-initrd): Add (guix build bournish) and use it.
* build-system/python: Honor the 'python2-variant' property of packages.Ludovic Courtès2016-02-07
| | | | | | | | | Fixes <http://bugs.gnu.org/22437>. Reported by Leo Famulari <leo@famulari.name> and others. * guix/build-system/python.scm (package-with-explicit-python): Add #:variant-property and honor it. (strip-python2-variant): New procedure.
* guix system: Simply warn if we cannot talk to the shepherd.Ludovic Courtès2016-02-05
| | | | | | | | | | | | | | | Before that 'open-connection' would return #f, and thus 'current-services' would return a single #f value when its continuation expects two. Reported by calher on #guix. * gnu/services/herd.scm (open-connection): Rethrow system-error exceptions. (with-shepherd): Expect CONNECTION to always be true; remove useless 'dynamic-wind'. * guix/scripts/system.scm (warn-on-system-error): New macro. (upgrade-shepherd-services): Wrap body in 'warn-on-system-error'.
* licenses: Add the fdl1.1+.Fabian Harfert2016-02-04
| | | | * guix/licenses.scm (fdl1.1+): New variable.
* guix system: 'reconfigure' loads and starts new services.Ludovic Courtès2016-02-03
| | | | | | | | | | | | | | Partly fixes <http://bugs.gnu.org/22039>. * gnu/services/herd.scm: New file. * gnu-system.am (GNU_SYSTEM_MODULES): Add it. * gnu/services/shepherd.scm (shepherd-service-canonical-name): New procedure. (shepherd-service-file): Export. * guix/scripts/system.scm (upgrade-shepherd-services): New procedure. (switch-to-system): Use it. * guix/ui.scm (info): New procedure. * doc/guix.texi (Invoking guix system): Mention system services.