aboutsummaryrefslogtreecommitdiff
path: root/guix/git-download.scm
Commit message (Collapse)AuthorAge
* download: Honor ‘GUIX_DOWNLOAD_METHODS’ environment variable.Ludovic Courtès2024-03-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This replaces ‘GUIX_DOWNLOAD_FALLBACK_TEST’ and allows you to test various download methods, like so: GUIX_DOWNLOAD_METHODS=nar guix build guile-gcrypt -S --check GUIX_DOWNLOAD_METHODS=disarchive guix build hello -S --check * guix/build/download.scm (%download-methods): New variable. (download-method-enabled?): New procedure. (url-fetch): Define ‘initial-uris’; honor ‘download-method-enabled?’. Call ‘disarchive-fetch/any’ only when the 'disarchive method is enabled. * guix/build/git.scm (git-fetch-with-fallback): Honor ‘download-method-enabled?’. * guix/download.scm (%download-methods): New variable. (%download-fallback-test): Remove. (built-in-download): Add #:download-methods parameter and honor it. (url-fetch*): Pass #:content-addressed-mirrors and #:disarchive-mirrors unconditionally. * guix/git-download.scm (git-fetch/in-band*): Pass “git url” unconditionally. (git-fetch/built-in): Likewise. Pass “download-methods”. * guix/bzr-download.scm (bzr-fetch)[build]: Honor ‘download-method-enabled?’. Pass ‘GUIX_DOWNLOAD_METHODS’ to #:env-vars. * guix/cvs-download.scm (cvs-fetch)[build]: Honor ‘download-method-enabled?’. Pass ‘GUIX_DOWNLOAD_METHODS’ to #:env-vars. * guix/hg-download.scm (hg-fetch): Honor ‘download-method-enabled?’. Pass #:env-vars to ‘gexp->derivation’. * guix/scripts/perform-download.scm (perform-download): Honor “download-methods” from DRV. Parameterize ‘%download-methods’ before calling ‘url-fetch’. (perform-git-download): Likewise. * guix/svn-download.scm (svn-fetch): Honor ‘download-method-enabled?’. Pass ‘GUIX_DOWNLOAD_METHODS’ to #:env-vars. (svn-multi-fetch): Likewise. Change-Id: Ia3402e17f0303dfa964bdc761265efe8a1dd69ab
* git-download: Download from SWH by nar hash when possible.Ludovic Courtès2024-02-12
| | | | | | | | | | | * guix/build/git.scm (git-fetch-with-fallback): Add #:hash and #:hash-algorithm. Try ‘swh-download-directory-by-nar-hash’ before ‘swh-download’ when #:hash is provided. * guix/git-download.scm (git-fetch/in-band*): Pass #:hash and #:hash-algorithm to ‘git-fetch-with-fallback’. * guix/scripts/perform-download.scm (perform-git-download): Likewise. Change-Id: Ic875a7022fd78c9fac32e92ad4f8ce4d81646ec5
* git-download: Add support for Git Large File Storage (LFS).Maxim Cournoyer2023-11-07
| | | | | | | | | | | | | | | | | | | | * guix/build/git.scm (git-fetch) [lfs?]: New argument, doc and setup code. (git-fetch-with-fallback) [lfs?]: New argument. Pass it to git-fetch. * guix/git-download.scm (git-lfs-package): New procedure. (git-fetch/in-band*): New procedure, made of the logic of git-fetch/in-band, with new git-lfs specifics, with the following changes: New #:git-lfs argument. <inputs>: Remove labels. Conditionally add git-lfs. <build>: Read "git lfs?" environment variable and pass its value to the #:lfs? argument of git-fetch-with-fallback. Use INPUTS directly; update comment. <gexp->derivation>: Add "git lfs?" to #:env-vars. (git-fetch/in-band): Express in terms of git-fetch/in-band*. (git-fetch/lfs): New procedure. * doc/guix.texi (origin Reference): Document it. Change-Id: I5b233b8642a7bdb8737b9d9b740e7254a89ccb25 Reviewed-by: Ludovic Courtès <ludo@gnu.org>
* git-download: Use “builtin:git-download” when available.Ludovic Courtès2023-09-26
| | | | | | | | | | | | | Fixes <https://issues.guix.gnu.org/63331>. Longer-term this will remove Git from the derivation graph when its sole use is to perform a checkout for a fixed-output derivation, thereby breaking dependency cycles that can arise in these situations. * guix/git-download.scm (git-fetch): Rename to… (git-fetch/in-band): … this. Deal with GIT or GUILE being #f. (git-fetch/built-in, built-in-builders*, git-fetch): New procedures. * tests/builders.scm ("git-fetch, file URI"): New test.
* git-download: Honor the ‘GUIX_DOWNLOAD_FALLBACK_TEST’ environment variable.Ludovic Courtès2023-09-26
| | | | * guix/git-download.scm (git-fetch): Honor ‘%download-fallback-test’.
* git-download: Move fallback code to (guix build git).Ludovic Courtès2023-09-26
| | | | | | | | * guix/build/git.scm (git-fetch-with-fallback): New procedure, with code taken from… * guix/git-download.scm (git-fetch): … here. [modules]: Remove modules that are no longer directly used in ‘build’. [build]: Use ‘git-fetch-with-fallback’.
* download: Refer to the 'guile-gnutls' package and not 'gnutls'.Ludovic Courtès2023-05-11
| | | | | | | | | | | | | | | | This reinstates c625e5b64d0a6cb7ffbf2ef971d4c990b1f5c5c1, which was reverted due to a circular dependency: https://issues.guix.gnu.org/63331 This is a followup to 305794762cbb57d252d5305b69a18cec6528baef, which removed Guile bindings from 'gnutls'. * guix/android-repo-download.scm (android-repo-fetch): Refer to 'guile-gnutls instead of 'gnutls. * guix/cvs-download.scm (cvs-fetch): Likewise. * guix/git-download.scm (git-fetch): Likewise. * guix/hg-download.scm (hg-fetch): Likewise.
* Revert "download: Refer to the 'guile-gnutls' package and not 'gnutls'."Ludovic Courtès2023-05-06
| | | | | | This reverts commit c625e5b64d0a6cb7ffbf2ef971d4c990b1f5c5c1, which introduced a circular dependency: the origin of guile-gnutls relies on 'git-download', which would now depend on guile-gnutls.
* download: Refer to the 'guile-gnutls' package and not 'gnutls'.Ludovic Courtès2023-05-06
| | | | | | | | | | | This is a followup to 305794762cbb57d252d5305b69a18cec6528baef, which removed Guile bindings from 'gnutls'. * guix/android-repo-download.scm (android-repo-fetch): Refer to 'guile-gnutls instead of 'gnutls. * guix/cvs-download.scm (cvs-fetch): Likewise. * guix/git-download.scm (git-fetch): Likewise. * guix/hg-download.scm (hg-fetch): Likewise.
* guix: Improve download-nar.Christopher Baines2023-03-16
| | | | | | | | | | | | | | | | | | | | | | | | | Previously download-nar worked with gzipped nars and queried berlin.guix.gnu.org (also known as ci.guix.gnu.org). ci.guix.gnu.org no longer serves gzipped nars so this is of limited use. This commit changes download-nar to query both the default substitute servers, and queries for lzipped rather than gzipped nars, since those are available from both. * guix/build/download-nar.scm (urls-for-item): Return urls for lzip rather than gzip compression, and from both default substitute servers. The comment about CDN's is no longer relevant. (restore-gzipped-nar): Rename to restore-lzipped-nar and reimplement accordingly. (download-nar): Add progress reporting and switch to use lzip rather than gzip. * guix/cvs-download.scm (cvs-fetch): Replace guile-zlib with guile-lzlib. * guix/git-download.scm (git-fetch): Replace guile-zlib with guile-lzlib. * guix/hg-download.scm (hg-fetch): Replace guile-zlib with guile-lzlib. * guix/android-repo-download.scm (android-repo-fetch): Add guile-lzlib for download-nar. Signed-off-by: Christopher Baines <mail@cbaines.net>
* git-download: Apply Git attributes on checkouts coming from SWH.Ludovic Courtès2023-03-03
| | | | | | | | | | | | | | | | Fixes a bug whereby CR/LF conversion, for instance, would not be applied on Git repositories retrieved from SWH: https://sympa.inria.fr/sympa/arc/swh-devel/2023-03/msg00000.html Reported by Simon Tournier <simon.tournier@inserm.fr>. Suggested by Valentin Lorentz <valentin.lorentz@inria.fr>. Co-authored by Simon Tournier <simon.tournier@inserm.fr>. * guix/git-download.scm (git-fetch)[build]: Add Git operations conditioned by '.gitattributes' on the result from SWH. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* git-download: Set locale to deal with Unicode in git metadata.Attila Lendvai2022-04-20
| | | | | | | | | | | | | | | | | | Without this the git-fetch GEXP is run in an environment that uses ASCII character encoding when strings are crossing the Guile - C boundary. It means that e.g. tag names that have Unicode chars in them will cause problems, e.g. when walking and deleting the .git directory. An example in the wild: https://github.com/klauspost/pgzip/tags Fixes <https://issues.guix.gnu.org/54893>. * guix/git-download.scm (git-fetch): Call 'setenv' and 'setlocale' to set it to en_US.utf8. * gnu/packages/commencement.scm (glibc-utf8-locales-final): Make public. Add 'properties' field. Co-authored-by: Ludovic Courtès <ludo@gnu.org>
* git-download: Support submodules in 'git-predicate'.Andrew Whatson2021-05-28
| | | | | | | | * guix/git-download.scm (git-file-list): Add prefix and recursive? arguments. Recurse into submodules when requested. (git-predicate): Add recursive? argument. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* git-download: 'git-predicate' now ignores deleted files.Ludovic Courtès2021-05-28
| | | | | | | | | | | When git-predicate is used on an active worktree, some files in the index might not exist on the filesystem. Instead of failing with "No such file or directory", these should be ignored. * guix/git-download.scm (git-predicate): Wrap 'lstat' call in 'false-if-exception'. Return RESULT when STAT is #f. Co-authored-by: Andrew Whatson <whatson@gmail.com>
* git-download: Call 'libgit2-init!'.Ludovic Courtès2021-04-16
| | | | | | | | | | Fixes <https://bugs.gnu.org/47797>. Reported by Ingo Ruhnke <grumbel@gmail.com> and Nicolò Balzarotti <anothersms@gmail.com>. Regression introduced in c1940fde43c7aca37d67589cc5cb248086d17d56. * guix/git-download.scm (git-predicate): Add call to 'libgit2-init!'.
* git-download: Autoload Guile-Git.Ludovic Courtès2021-03-19
| | | | * guix/git-download.scm: Autoload (git ...) modules.
* Remove (guix json) and require Guile-JSON 4.3.0+.Ludovic Courtès2020-09-08
| | | | | | | | | | | | | | This is a followup to 4071879c86d059ee087c8986915ea72b8c742b72. * guix/json.scm: Remove. * Makefile.am (MODULES): Adjust accordingly. * m4/guix.m4 (GUIX_CHECK_GUILE_JSON): Check for 'define-json-mapping'. * doc/guix.texi (Requirements): Require Guile-JSON 4.3.0+. * guix/ci.scm, guix/cve.scm, guix/import/cpan.scm, guix/import/crate.scm, guix/swh.scm: Remove (guix json) import. * guix/import/gem.scm, guix/import/pypi.scm: Likewise, and import (json). * guix/self.scm (specification->package): Switch to GUILE-JSON-4. * guix/git-download.scm (git-fetch): Likewise.
* Use guile-zlib extension in build-side code.Mathieu Othacehe2020-08-24
| | | | | | | | | | | * Makefile.am (MODULES): Move guix/build/download-nar.scm to ... (MODULES_NOT_COMPILED): ... here. * guix/build/download-nar.scm: Use (zlib) instead of (guix zlib). * guix/cvs-download.scm (cvs-fetch): Do not stub (guix config) in imported modules list, instead add "guile-zlib" to the extension list. * guix/git-download.scm (git-fetch): Ditto. * guix/hg-download.scm (hg-fetch): Do not stub (guix config) in imported modules list, instead add "guile-zlib" to the extension list.
* git-download: Don't verify X.509 certificate of SWH.Ludovic Courtès2020-07-10
| | | | | | | | | Fixes <https://bugs.gnu.org/42286>. Regression introduced with the switch to Guile 3.0 in commit b6bee63bed4f013064c0d902e7c8b83ed7514ade. * guix/git-download.scm (git-fetch): Parameterize %VERIFY-SWH-CERTIFICATE.
* git-version: Raise a condition instead of an error.Jakub Kądziołka2020-04-23
| | | | | | | * guix/git-download.scm (git-version): Replace ERROR with RAISE and CONDITION. This is a follow-up to commit bbf6bc1acc9bbdebf7ee7b68c0fa091733a5f6e1.
* git-version: Handle invalid arguments gracefullyJakub Kądziołka2020-04-23
| | | | * guix/git-download.scm (git-version): Add a check for commit ID length.
* download: Pass 'http_proxy' et al. to git, hg, etc.Ludovic Courtès2019-09-05
| | | | | | | | | | | | This allows 'git-fetch' etc. origins to honor the proxy and locale of the daemon. * guix/bzr-download.scm (bzr-fetch): Pass #:leaked-env-vars to 'gexp->derivation'. * guix/cvs-download.scm (cvs-fetch): Likewise. * guix/git-download.scm (git-fetch): Likewise. * guix/hg-download.scm (hg-fetch): Likewise. * guix/svn-download.scm (svn-multi-fetch): Likewise.
* swh: 'swh-download' prints debugging info.Ludovic Courtès2019-08-28
| | | | | | | * guix/git-download.scm (git-fetch): Print a message before calling 'swh-download'. * guix/swh.scm (swh-download): Add #:log-port. Write debugging messages to LOG-PORT.
* maint: Switch to Guile-JSON 3.x.Ludovic Courtès2019-07-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Guile-JSON 3.x is incompatible with Guile-JSON 1.x, which we relied on until now: it maps JSON dictionaries to alists (instead of hash tables), and JSON arrays to vectors (instead of lists). This commit is about adjusting all the existing code to this new mapping. * m4/guix.m4 (GUIX_CHECK_GUILE_JSON): New macro. * configure.ac: Use it. * doc/guix.texi (Requirements): Mention the Guile-JSON version. * guix/git-download.scm (git-fetch)[guile-json]: Use GUILE-JSON-3. * guix/import/cpan.scm (string->license): Expect vectors instead of lists. (module->dist-name): Use 'json-fetch' instead of 'json-fetch-alist'. (cpan-fetch): Likewise. * guix/import/crate.scm (crate-fetch): Likewise, and call 'vector->list' for DEPS. * guix/import/gem.scm (rubygems-fetch): Likewise. * guix/import/json.scm (json-fetch-alist): Remove. * guix/import/pypi.scm (pypi-fetch): Use 'json-fetch' instead of 'json-fetch-alist'. (latest-source-release, latest-wheel-release): Call 'vector->list' on RELEASES. * guix/import/stackage.scm (stackage-lts-info-fetch): Use 'json-fetch' instead of 'json-fetch-alist'. (lts-package-version): Use 'vector->list'. * guix/import/utils.scm (hash-table->alist): Remove. (alist->package): Pass 'vector->list' on the inputs fields, and default to the empty vector. * guix/scripts/import/json.scm (guix-import-json): Remove call to 'hash-table->alist'. * guix/swh.scm (define-json-reader): Expect pair? or null? instead of hash-table?. [extract-field]: Use 'assoc-ref' instead of 'hash-ref'. (json->branches): Use 'map' instead of 'hash-map->list'. (json->checksums): Likewise. (json->directory-entries, origin-visits): Call 'vector->list' on the result of 'json->scm'. * tests/import-utils.scm ("alist->package with dependencies"): New test. * gnu/installer.scm (build-compiled-file)[builder]: Use GUILE-JSON-3. * gnu/installer.scm (installer-program)[installer-builder]: Likewise. * gnu/installer/locale.scm (iso639->iso639-languages): Use 'assoc-ref' instead of 'hash-ref', and pass vectors through 'vector->list'. (iso3166->iso3166-territories): Likewise. * gnu/system/vm.scm (system-docker-image)[build]: Use GUILE-JSON-3. * guix/docker.scm (manifest, config): Adjust for Guile-JSON 3. * guix/scripts/pack.scm (docker-image)[build]: Use GUILE-JSON-3. * guix/import/github.scm (fetch-releases-or-tags): Update docstring. (latest-released-version): Use 'assoc-ref' instead of 'hash-ref'. Pass the result of 'fetch-releases-or-tags' to 'vector->list'. * guix/import/launchpad.scm (latest-released-version): Likewise.
* guix: git-download: Remove explicit import.Robert Vollmert2019-06-06
| | | | | | | | | | With guile-git version 0.2, repository-working-directory is no longer private. * guix/git-download.scm (git-file-list): Refer to public repository-working-directory. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* git-download: Download from Software Heritage as a last resort.Ludovic Courtès2018-11-26
| | | | | | | | * guix/git-download.scm (git-fetch)[inputs]: Add gzip and tar when 'git-reference-recursive?' is false. [guile-json, gnutls]: New variables. [modules]: Add (guix swh). [build]: Wrap in 'with-extensions'. Add call to 'swh-download'.
* git-download: Use 'git-minimal' instead of 'git'.Ludovic Courtès2018-11-26
| | | | * guix/git-download.scm (git-package): Refer to 'git-minimal'.
* git-download: Don't assume the working directory is the parent of ".git".Marius Bakke2018-09-26
| | | | | | | This makes it do the right thing w.r.t. git worktrees. * guix/git-download.scm (git-file-list): Use REPOSITORY-WORKING-DIRECTORY to locate checkout. Rename from "top" to "workdir".
* git-download: 'git-predicate' returns #f on Git errors.Ludovic Courtès2018-09-14
| | | | | | | | Fixes a regression introduced in aed0a594058a59bc3bb1d2686391dc0e8a181b1f whereby 'git-predicate' would throw to 'git-error instead of returning #f as the docstring says. * guix/git-download.scm (git-predicate): Return #f upon 'git-error'.
* git-download: Rewrite 'git-predicate' using Guile-Git.Ludovic Courtès2018-09-13
| | | | | | | | | | Fixes <https://bugs.gnu.org/27925>. * guix/git-download.scm (files->directory-tree) (directory-in-tree?): Remove. (git-file-list): New procedures. (git-predicate): Use it instead of opening a pipe to 'git'. Remove directory tree hack and rely exclusively on inode/device numbers.
* git-download: Fix recursive checkouts.Eric Bavier2018-03-18
| | | | | * guix/git-download.scm (git-fetch)<build>: Fix match on INPUTS, which may contain package outputs.
* download: Download a nar when a VCS checkout fails.Ludovic Courtès2017-10-19
| | | | | | | | | | | | Fixes <https://bugs.gnu.org/28709>. * guix/build/download-nar.scm: New file. * Makefile.am (MODULES): Add it. * guix/cvs-download.scm (cvs-fetch)[zlib, config.scm, modules]: New variables. [build]: Use MODULES. Add call to 'download-nar'. * guix/git-download.scm (git-fetch): Likewise. * guix/hg-download.scm (hg-fetch): Likewise.
* git-download: Remove call to 'canonicalize-path'.Ludovic Courtès2017-07-30
| | | | | | | * guix/git-download.scm (git-predicate): Remove call to 'canonicalize-path' since this could lead to discrepancies. For instance it broke 'make update-guix-package' since it passes a non-canonical directory name.
* git-download: Speed up 'git-predicate'.Christopher Baines2017-07-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adjust 'git-predicate' to use data structures that perform better when used with git repositories with a large number of files. Previously when matching either a regular file or directory, 'git-predicate' would search a list with a length equal to the number of files in the repository. As a search operation happens for roughly every file in the repository, this meant that the time taken to use 'git-predicate' to traverse all the files in a repository was roughly exponential with respect to the number of files in the repository. Now, for matching regular files or symlinks, 'git-predicate' uses a vhash using the inode value as the key. This should perform roughly in constant amount of time, instead of linear with respect to the number of files in the repository. For matching directories, 'git-predicate' now uses a tree structure stored in association lists. To check if a directory is in the tree, the tree is traversed from the root. The time complexity of this depends on the shape of the tree, but it should be an improvement on searching through the list of all files. * guix/git-download.scm (files->directory-tree, directory-in-tree?): New procedures. (git-predicate): Compute DIRECTORY-TREE. Turn INODES into a vhash. Adjust body of lambda accordingly. Co-authored-by: Ludovic Courtès <ludo@gnu.org>
* git-download: Fix 'git-predicate' to use absolute paths.Christopher Baines2017-05-30
| | | | | | | | | | | | git ls-files will return paths relative to the repository directory. This commit prepends the repository directory to those paths when calling lstat, such that 'git-predicate' works if the current working directory is not the repository directory. * guix/git-download.scm (git-predicate): Prepend repository directory to the file path when calling lstat. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* git-download: Fix 'git-predicate' file membership.Ludovic Courtès2017-05-07
| | | | | | | | | Previously, it the predicate would return #t for "m4/ChangeLog" if "ChangeLog" (in the top-level directory) was in FILES. This commit fixes the ambiguity. * guix/git-download.scm (git-predicate): Add 'inodes' variable. Use it to determine file membership.
* git-download: Add 'git-predicate'.Mathieu Lirzin2017-02-09
| | | | | | * guix/git-download.scm (git-predicate): New procedure. * gnu/packages/package-management.scm (current-guix): Use it. (make-git-predicate): Remove.
* git download: Remove redundant argument in 'gexp->derivation' call.Mathieu Lirzin2017-01-11
| | | | | * guix/git-download.scm (git-fetch): Call 'gexp->derivation' with only one '#:local-build?' keyword argument.
* git-download: Add some helpers.David Craven2017-01-04
| | | | * guix/git-download.scm (git-version, git-file-name): New variables.
* git-download: Use a single download script for all derivations.Ludovic Courtès2016-12-31
| | | | | | | | | | | That way, we have only one /gnu/store/…-git-download instead of one /gnu/store/…-PACKAGE-checkout-builder for each package. This is a followup to ced200328ca6337ac446e4557c645629e7d7a997. * guix/git-download.scm (git-fetch)[build]: Get the URL, commit, and recursive parameter using 'getenv'. Pass #:script-name and #:env-vars arguments to 'gexp->derivation'.
* download: Use 'with-imported-modules'.Ludovic Courtès2016-07-12
| | | | | | | | | * guix/cvs-download.scm (cvs-fetch): Use 'with-imported-modules' instead of the #:modules argument of 'gexp->derivation'. * guix/download.scm (url-fetch): Likewise. * guix/git-download.scm (git-fetch): Likewise. * guix/hg-download.scm (hg-fetch): Likewise. * guix/svn-download.scm (svn-fetch): Likewise.
* download: Disable offloading for downloads.Ludovic Courtès2015-09-05
| | | | | * guix/download.scm (url-fetch): Use #:local-build? #t. * guix/git-download.scm (git-fetch): Likewise.
* derivations: Add #:substitutable?, distinguished from #:local-build?.Ludovic Courtès2015-07-03
| | | | | | | | | | | | | | | | | | | | Fixes <http://bugs.gnu.org/18747>. * guix/derivations.scm (substitutable-derivation?): Rewrite to check for "allowSubstitutes". (derivation): Add #:substitutable? parameter. [user+system-env-vars]: Honor it. (build-expression->derivation): Add #:substitutable? and honor it. * guix/gexp.scm (gexp->derivation): Likewise. * tests/derivations.scm ("derivation-prerequisites-to-build and substitutes, non-substitutable build"): Use #:substitutable? instead of #:local-build?. ("substitutable-derivation?", "derivation-prerequisites-to-build and substitutes, local build"): New tests. * guix/download.scm (url-fetch): Adjust comment. * guix/git-download.scm (git-fetch): Likewise. * guix/build-system/gnu.scm (gnu-build, gnu-cross-build): Use #:substitutable? instead of #:local-build?. * doc/guix.texi (Derivations, G-Expressions): Adjust accordingly.
* packages: Refer to the native tools when handling sources and downloads.Ludovic Courtès2015-04-15
| | | | | | | | * 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.
* packages: Convert source derivations to monadic style.Ludovic Courtès2015-01-14
| | | | | | | | | | | | | | | | | | * 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.
* monads: Move '%store-monad' and related procedures where they belong.Ludovic Courtès2015-01-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* download: Allow use of substitutes.Ludovic Courtès2014-10-16
| | | | | | | | See <https://bugs.gnu.org/18747> for the original report. * guix/download.scm (url-fetch): Comment out #:local-build? argument. * guix/git-download.scm (git-fetch): Likewise. * guix/svn-download.scm (svn-fetch): Likewise.
* build-system: Introduce "bags" as an intermediate representation.Ludovic Courtès2014-10-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * guix/build-system.scm (<build-system>)[build, cross-build]: Remove. [lower]: New field. (<bag>): New record type. (make-bag): New procedure. * guix/packages.scm (bag-transitive-inputs, bag-transitive-build-inputs, bag-transitive-host-inputs, bag-transitive-target-inputs, package->bag): New procedures. (package-derivation): Use it; use the bag, apply its build procedure, etc. (package-cross-derivation): Likewise. * gnu/packages/bootstrap.scm (raw-build, make-raw-bag): New procedure. (%bootstrap-guile): Use them. * guix/build-system/trivial.scm (lower): New procedure. (trivial-build, trivial-cross-build): Remove 'source' parameter. Pass INPUTS as is. (trivial-build-system): Adjust accordingly. * guix/build-system/gnu.scm (%store, inputs-search-paths, standard-search-paths, expand-inputs, standard-inputs): Remove. (gnu-lower): New procedure. (gnu-build): Remove 'source' and #:implicit-inputs? parameters. Remove 'implicit-inputs' and 'implicit-search-paths' variables. Get the source from INPUT-DRVS. (gnu-cross-build): Likewise. (standard-cross-packages): Remove call to 'standard-packages'. (standard-cross-inputs, standard-cross-search-paths): Remove. (gnu-build-system): Remove 'build' and 'cross-build'; add 'lower'. * guix/build-system/cmake.scm (lower): New procedure. (cmake-build): Remove 'source' and #:cmake parameters. Use INPUTS and SEARCH-PATHS as is. Get the source from INPUTS. * guix/build-system/perl.scm: Likewise. * guix/build-system/python.scm: Likewise. * guix/build-system/ruby.scm: Likewise. * gnu/packages/cross-base.scm (cross-gcc): Change "cross-linux-headers" to "linux-headers". (cross-libc)[xlinux-headers]: Pass #:implicit-cross-inputs? #f. Likewise. In 'propagated-inputs', change "cross-linux-headers" to "linux-headers". * guix/git-download.scm (git-fetch): Use 'standard-packages' instead of 'standard-inputs'. * tests/builders.scm ("gnu-build-system"): Remove use of 'build-system-builder'. ("gnu-build"): Remove 'source' and #:implicit-inputs? arguments to 'gnu-build'. * tests/packages.scm ("search paths"): Adjust to new build system API. ("package-cross-derivation, no cross builder"): Likewise. * doc/guix.texi (Build Systems): Add paragraph on bags.
* gnu: Split (gnu packages base), adding (gnu packages commencement).Ludovic Courtès2014-08-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * gnu/packages/base.scm (gnu-make-boot0, diffutils-boot0, findutils-boot0, %boot0-inputs, nix-system->gnu-triplet, boot-triplet, binutils-boot0, gcc-boot0, perl-boot0, linux-libre-headers-boot0, texinfo-boot0, %boot1-inputs, glibc-final-with-bootstrap-bash, cross-gcc-wrapper, static-bash-for-glibc, glibc-final, gcc-boot0-wrapped, %boot2-inputs, binutils-final, libstdc++, gcc-final, ld-wrapper-boot3, %boot3-inputs, bash-final, %boot4-inputs, guile-final, gnu-make-final, ld-wrapper, coreutils-final, grep-final, %boot5-inputs, %final-inputs, canonical-package, gcc-toolchain, gcc-toolchain-4.8, gcc-toolchain-4.9): Move to... * gnu/packages/commencement.scm: ... here. New file. * gnu-system.am (GNU_SYSTEM_MODULES): Add it. * build-aux/check-final-inputs-self-contained.scm: Adjust accordingly. * gnu/packages/cross-base.scm: Likewise. * gnu/packages/make-bootstrap.scm: Likewise. * guix/build-system/cmake.scm (cmake-build): Likewise. * guix/build-system/gnu.scm (standard-packages, gnu-build, gnu-cross-build): Likewise. * guix/build-system/perl.scm (perl-build): Likewise. * guix/build-system/python.scm (python-build): Likewise. * guix/build-system/trivial.scm (guile-for-build): Likewise. * guix/download.scm (url-fetch): Likewise. * guix/gexp.scm (default-guile): Likewise. * guix/git-download.scm (git-fetch): Likewise. * guix/monads.scm (run-with-store): Likewise. * guix/packages.scm (default-guile): Likewise. * guix/scripts/package.scm (guix-package): Likewise. * guix/scripts/refresh.scm: Likewise. * guix/svn-download.scm (svn-fetch): Likewise. * tests/builders.scm (%bootstrap-inputs, %bootstrap-search-paths): Likewise. * tests/packages.scm ("GNU Make, bootstrap"): Likewise. * tests/guix-package.sh: Likewise. * gnu/services/base.scm: Use 'canonical-package' instead of xxx-final. * gnu/services/xorg.scm: Likewise. * gnu/system/vm.scm: Likewise. * guix/scripts/pull.scm (guix-pull): Likewise.
* git-download: Rewrite using gexps.Ludovic Courtès2014-08-23
| | | | | | | * guix/git-download.scm (git-package): New procedure. (git-fetch): Use it. Remove 'git-for-build'. Use a gexp and 'gexp->derivation'. * guix/download.scm (gnutls-package): Fix docstring.