summaryrefslogtreecommitdiff
path: root/pkgs/build-support/fetchgit (follow)
Commit message (Expand)AuthorAgeFilesLines
* nix-prefetch-git: restore the tag-related clone flags when leaving .git•••When leaveDotGit == true, restore the cloning behaviour before commit 7e085677f996 ("nix-prefetch-git: dont't fetch tags when deep clone unless leaving .git") to preserve the fragile hashes of .git sources. Clean up fetchTagsCompat, as fetchTagsCompat is no longer needed after restoring the old tag-fetching flags. Yueh-Shun Li2025-12-241-13/+9
* nix-prefetch-git: Name FETCHED_HEAD "$ref" only for refs/tags/*Yueh-Shun Li2025-12-231-2/+2
* fetchgit: take `postCheckout` to allow gathering revision and commit metadata...Philip Taron2025-12-173-5/+89
|\
| * tests.fetchgit: add submodule-revision-countYueh-Shun Li2025-12-171-0/+14
| * nix-prefetch-git: dont't fetch tags when deep clone unless leaving .git•••Co-authored-by: Adam Dinwoodie <adam@dinwoodie.org> Yueh-Shun Li2025-12-171-5/+34
| * nix-prefetch-git: fetch the fetching tag for NIX_PREFETCH_GIT_CHECKOUT_HOOK•••Co-authored-by: Adam Dinwoodie <adam@dinwoodie.org> Yueh-Shun Li2025-12-172-0/+17
| * tests.fetchgit: add simple-tagYueh-Shun Li2025-12-091-0/+7
| * fetchgit: take postCheckout to allow collecting revision without leaving .gitYueh-Shun Li2025-12-092-0/+17
* | fetchurl, fetchgit: use `__structuredAttrs = true` and pass `curlOptsList` an...Yueh-Shun Li2025-12-112-1/+9
|\ \
| * | fetchgit: use __structuredAttrs = trueYueh-Shun Li2025-12-092-1/+9
| |/
* / fetchgit: reference hash from finalAttrs.hashYueh-Shun Li2025-12-101-2/+20
|/
* fetchgit: adjust format for sparseCheckout default•••Co-authored-by: Matt Sturgeon <matt@sturgeon.me.uk> Yueh-Shun Li2025-12-081-1/+5
* fetchgit: sparseCheckout: reference depending attributes from finalAttrsYueh-Shun Li2025-12-041-1/+1
* fetchgit: format expression after eliminating global assertionsYueh-Shun Li2025-12-041-86/+86
* fetchgit: move sparseCheckout type check down to sparseCheckoutTextYueh-Shun Li2025-12-041-6/+5
* fetchgit: default sparseCheckout to null and handle the default internallyYueh-Shun Li2025-12-041-2/+3
* fetchgit: keep sparseCheckout a list and stringify as sparseCheckoutTextYueh-Shun Li2025-12-042-3/+4
* fetchgit: nonConeMode: reference depending attributes from finalAttrsYueh-Shun Li2025-12-041-1/+1
* fetchgit: default nonConeMode to null and manage its default internallyYueh-Shun Li2025-12-041-2/+3
* fetchgit: default argument leaveDotGit to nullYueh-Shun Li2025-11-171-4/+8
* fetchgit: move assertions down to argument valuesYueh-Shun Li2025-11-161-9/+10
* fetchgit: expose getRevWithTag as fetchgit.getRevWithTagYueh-Shun Li2025-11-031-0/+3
* fetchgit: pass rev as revCustom and make overridableYueh-Shun Li2025-11-031-2/+3
* fetchgit: pass tag directly and make overridableYueh-Shun Li2025-11-031-6/+6
* fetchgit: abstract and simplify revWithTagYueh-Shun Li2025-11-031-18/+16
* fetchgit: take derivationArgsYueh-Shun Li2025-11-031-1/+9
* fetchurl, fetchzip, fetchgit: format Nix expression after lib.extendMkDerivationYueh-Shun Li2025-10-281-158/+158
* fetchgit: restructure with lib.extendMkDerivation (not formatted)Yueh-Shun Li2025-10-281-2/+21
* fetchgit: take passthruYueh-Shun Li2025-10-281-1/+3
* Revert "stdenv: pURL implementation (#421125)"•••This reverts commit 54271156702fc3a3f5d156df567a2a4a274bac6b, reversing changes made to 88ee2ac331edc3ce9f9df92aaf824592473ed868. d0683282025-10-181-12/+1
* stdenv: pURL implementation (#421125)Arian van Putten2025-10-171-1/+12
|\
| * stdenv: pURL review suggestions - replace mergeHans Joachim Kliemeck2025-10-141-7/+10
| * stdenv: pURL - fix chaining case (github&submodules using fetchgit)Hans Joachim Kliemeck2025-10-141-2/+2
| * stdenv: pURL implementationh0nIg2025-10-031-1/+9
* | config: add a `gitConfig`/`gitConfigFile` option•••Adds a `gitConfig` option (and `gitConfigFile`), to set a default `gitConfigFile` argument for `fetchgit`. Alexander Bantyev2025-09-292-11/+16
* | fetchgit: add a `gitConfigFile` argument•••Passing a `gitConfigFile` argument as a string allows setting a custom git config (as `$GIT_CONFIG_GLOBAL`). The most obvious use is to override URLs with custom mirrors, but others are possible too. Alexander Bantyev2025-09-293-0/+20
* | nix-prefetch-git: Add regression test for avoiding fetching cached pathsSilvan Mosberger2025-09-241-0/+30
* | nix-prefetch-git: add --no-add-path argument•••Adds a new argument to `nix-prefetch-git`: `--no-add-path`. It disables adding the path to the store. It is useful when working with a read-only store. Alexander Bantyev2025-09-242-2/+70
|/
* fetchgit: Add rootDir argument (#427165)Philip Taron2025-08-104-23/+73
|\
| * fetchgit: Add rootDir argument•••With this argument fetchgit will make a subdirectory of the Git repository a root of the resulting store path. This is helpful for dealing with monorepos where many projects are in separate directories and don't need a new source hash every time the monorepo is updated. Commit hash is removed from the name of the derivation to prevent it from changing the store path when nothing in the subdirectory changes. Yuriy Taraday2025-08-083-6/+28
| * nix-prefetch-git: Add --root-dir argument•••With this argument nix-prefetch-git will make a subdirectory of the Git repository a root of the resulting store path. This is helpful for dealing with monorepos where many projects are in separate directories and don't need a new source hash every time the monorepo is updated. The corresponding fetchgit change follows. Yuriy Taraday2025-08-081-17/+45
* | tor: add tor.proxyHook (#426763)Philip Taron2025-07-252-0/+18
|\ \
| * | tor: add tor.proxyHook•••tor.proxyHook is a setup hook intended for use with HTTP-based fetchers, enabling them to download from .onion addresses using Tor as a proxy. Ryan Hendrickson2025-07-242-0/+18
| |/
* / treewide: run nixfmt 1.0.0Wolfgang Walther2025-07-241-7/+6
|/
* fetchgit: pass --checkout when fetching submodules•••For projects that have `submodule.$name.update` set to something other than the default value of "checkout", this change will ensure those submodules are fetched as well. Jared Baur2025-07-161-2/+2
* lib, treewide: introduce `repoRevToName` and use it to cleanup most `fetch*` ...lassulus2025-06-101-12/+8
|\
| * lib, treewide: introduce `repoRevToName`, use it in most `fetch*` functions•••This patch adds `lib.repoRevToName` function that generalizes away most of the code used for derivation name generation by `fetch*` functions (`fetchzip`, `fetchFromGitHub`, etc, except those which are delayed until latter commits for mass-rebuild reasons). It's first argument controls how the resulting name will look (see below). Since `lib` has no equivalent of Nixpkgs' `config`, this patch adds `config.fetchedSourceNameDefault` option to Nixpkgs and then re-exposes `lib.repoRevToName config.fetchedSourceNameDefault` expression as `pkgs.repoRevToNameMaybe` which is then used in `fetch*` derivations. The result is that different values of `config.fetchedSourceNameDefault` now control how the `src` derivations produced by `fetch*` functions are to be named, e.g.: - `fetchedSourceNameDefault = "source"` (the default): ``` $ nix-instantiate -A fuse.src /nix/store/<hash>-source.drv ``` - `fetchedSourceNameDefault = "versioned"`: ``` $ nix-instantiate -A fuse.src /nix/store/<hash>-libfuse-2.9.9-source.drv ``` - `fetchedSourceNameDefault = "full"`: ``` $ nix-instantiate -A fuse.src /nix/store/<hash>-libfuse-2.9.9-github-source.drv ``` See the documentation of `config.fetchedSourceNameDefault` for more info. Jan Malakhovski2025-05-311-12/+8
* | tests.fetchgit.fetchTags: fix flaky test by removing .git directory after get...•••Closes #412967 Philip Taron2025-06-021-1/+3
|/
* pkgs/build-support/fetchgit: add fetchTags parameter•••Added fetchTags feature to fetchgit, explicit and clear support for fetching all tags after the source tree fetch completes. Doing this at build-time in the fetcher is required for packages that invoke commands like 'git describe' which require tags, and since the nix store is read-only by design, it is not possible to git fetch --tags at activation- or run-time. This feature may have been possible by specifying a postFetch option including calling git fetch --tags, however doing so obfuscates the solution to this very real problem. Explicit support for fetching tags should be a first class citizen just like fetching other refs. Tim Black2025-05-284-1/+28
* fetchgit: add preFetch hook•••This allows running code to change the environment before the nix-prefetch-git script is run. In particular, it allows setting things like NIX_PREFETCH_GIT_CHECKOUT_HOOK, which allows additional code to be run before deleting the .git directory. This also means there's potentially value in performing a deep clone then removing the .git directory, so remove the assertion that prevents doing so. Adam Dinwoodie2025-05-062-1/+8