| Commit message (Expand) | Author | Age | Files | Lines |
| * | fetchFromGitHub: use fetchgit when postCheckout not empty | Yueh-Shun Li | 2025-12-25 | 2 | -0/+12 |
| * | tests.fetchFromGitHub: add simple-tag | Yueh-Shun Li | 2025-12-25 | 1 | -0/+8 |
| * | fetchFromGitHub: simplify useFetchGit and useFetchGitArgsWDPassing | Yueh-Shun Li | 2025-12-11 | 1 | -9/+9 |
| * | fetchFromGitHub: converge arguments that determines useFetchGit | Yueh-Shun Li | 2025-12-09 | 1 | -39/+58 |
| * | fetchFromGitHub: explicitly support addditional fetchgit args | Yueh-Shun Li | 2025-12-09 | 1 | -1/+1 |
| * | fetchFromGitHub: default sparseCheckout to null | Yueh-Shun Li | 2025-12-04 | 1 | -2/+2 |
| * | fetchFromGitHub: elaborate the fetchSubmodules default choice | Yueh-Shun Li | 2025-12-04 | 1 | -0/+2 |
| * | fetchFromGitHub: pass leaveDotGit unconditionally using the null default | Yueh-Shun Li | 2025-12-04 | 1 | -2/+2 |
| * | fetchFromGitHub: pass githubBase to mkDerivation via derivationArgs•••Reduce future test rebuilds when making githubBase overridable.
| Yueh-Shun Li | 2025-11-03 | 1 | -0/+2 |
| * | fetchFromGitHub: make name respect overridden arguments | Yueh-Shun Li | 2025-11-03 | 1 | -2/+6 |
| * | fetchFromGitHub: pass rev uniformly | Yueh-Shun Li | 2025-11-03 | 1 | -5/+8 |
| * | fetchFromGitHub: pass tag to mkDerivation uniformly | Yueh-Shun Li | 2025-11-03 | 1 | -1/+1 |
| * | fetchFromGitHub: pass owner and repo via derivationArgs | Yueh-Shun Li | 2025-11-03 | 1 | -2/+14 |
| * | fetchFromGitHub: pass meta via fetcherArgs | Yueh-Shun Li | 2025-11-03 | 1 | -1/+1 |
| * | fetchFromGitHub: take and unshadow passthru | Yueh-Shun Li | 2025-10-28 | 1 | -1/+4 |
| * | fetchFromGitHub: prevent user overwriting url and private arguments | Yueh-Shun Li | 2025-10-28 | 1 | -2/+2 |
| * | Revert "stdenv: pURL implementation (#421125)"•••This reverts commit 54271156702fc3a3f5d156df567a2a4a274bac6b, reversing
changes made to 88ee2ac331edc3ce9f9df92aaf824592473ed868.
| d068328 | 2025-10-18 | 1 | -18/+1 |
| * | stdenv: pURL implementation (#421125) | Arian van Putten | 2025-10-17 | 1 | -1/+18 |
| |\ |
|
| | * | stdenv: pURL review suggestions - replace merge | Hans Joachim Kliemeck | 2025-10-14 | 1 | -17/+20 |
| | * | stdenv: pURL - fix chaining case (github&submodules using fetchgit) | Hans Joachim Kliemeck | 2025-10-14 | 1 | -4/+4 |
| | * | stdenv: pURL review suggestions - part 4 | Hans Joachim Kliemeck | 2025-10-10 | 1 | -6/+1 |
| | * | stdenv: pURL review suggestions | Hans Joachim Kliemeck | 2025-10-10 | 1 | -4/+6 |
| | * | stdenv: pURL github speed optimization | Hans Joachim Kliemeck | 2025-10-03 | 1 | -29/+21 |
| | * | stdenv: pURL implementation | h0nIg | 2025-10-03 | 1 | -9/+34 |
| * | | tests.fetchFromGitHub: init•••Copied from pkgs/build-support/fetchgit/tests.nix, see there for attribution.
| Michael Daniels | 2025-10-02 | 1 | -0/+119 |
| * | | fetchFromGitHub: use fetchgit when the rootDir option is set•••This argument was added to fetchgit in #427165,
and it's not supported by fetchzip.
Co-authored-by: Philip Taron <philip.taron@gmail.com>
| Michael Daniels | 2025-10-02 | 1 | -1/+3 |
| |/ |
|
| * | 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 Malakhovski | 2025-05-31 | 1 | -1/+2 |
| * | treewide: Format all Nix files•••Format all Nix files using the officially approved formatter,
making the CI check introduced in the previous commit succeed:
nix-build ci -A fmt.check
This is the next step of the of the [implementation](https://github.com/NixOS/nixfmt/issues/153)
of the accepted [RFC 166](https://github.com/NixOS/rfcs/pull/166).
This commit will lead to merge conflicts for a number of PRs,
up to an estimated ~1100 (~33%) among the PRs with activity in the past 2
months, but that should be lower than what it would be without the previous
[partial treewide format](https://github.com/NixOS/nixpkgs/pull/322537).
Merge conflicts caused by this commit can now automatically be resolved while rebasing using the
[auto-rebase script](https://github.com/NixOS/nixpkgs/tree/8616af08d915377bd930395f3b700a0e93d08728/maintainers/scripts/auto-rebase).
If you run into any problems regarding any of this, please reach out to the
[formatting team](https://nixos.org/community/teams/formatting/) by
pinging @NixOS/nix-formatting.
| Silvan Mosberger | 2025-04-01 | 1 | -87/+151 |
| * | fetchFromGitHub: use of the API endpoint only when fetching tarball•••https://github.com/NixOS/nixpkgs/pull/321484 introduced a bug when when
`forceFetchGit=true`.
This PR revert the change only for this case.
The previous PR made work cases like:
```bash
nix-build -E 'let pkgs = import ./nixpkgs {}; in pkgs.fetchFromGitHub {
owner = "<username>"; repo = "<repo>"; rev = "HEAD"; hash = "";
private=true; forceFetchGit=false; }'
```
You should see the download working and nix complaining about hash
mismatch.
Now if you take the case where `forceFetchGit=true`, this is a different
story:
```
nix-build -E 'let pkgs = import ./nixpkgs {}; in pkgs.fetchFromGitHub {
owner = "<username>"; repo = "<repo>"; rev = "HEAD"; hash = "";
private=true; forceFetchGit=true; }'
```
Logs look like:
```
Initialized empty Git repository in /nix/store/<hash>-source/.git/
fatal: could not read Username for 'https://github.com': No such device or address
fatal: could not read Username for 'https://github.com': No such device or address
fatal: could not read Username for 'https://github.com': No such device or address
fatal: could not read Username for 'https://github.com': No such device or address
Unable to checkout HEAD from https://github.com/<username>/<repo>.git.
```
I was using `forceFetchGit` for the exact reason the previous PR was
made, I will move to `forceFetchGit=false` now.
Still the previous PR was a broke usage of `fetchFromGitHub` force private repository when `forceFetchGit` is used.
| Olivier LDff | 2025-03-12 | 1 | -1/+4 |
| * | fetchFromGitHub: refactor for scope clarity•••Co-authored-by: Philip Taron <philip.taron@gmail.com> | Adam Dinwoodie | 2025-01-16 | 1 | -9/+10 |
| * | fetchFromGitHub: use the API tarball endpoint•••GitHub currently has two kinds of personal access token: "classic" and
"fine-grained". Fine-grained personal access tokens, as the name
suggests, allow much more control over what the token can and cannot do,
and in particular allow users to specify which repositories the token
should provide access to.
Unfortunately, fine-grained tokens don't allow access to repository
archive tarballs for private repositories at (say)
https://github.com/me-and/private-demo/archive/HEAD.tar.gz.
Fortunately, the GitHub API endpoint does provide this access, and also
works with classic tokens and -- for public repositories -- no token at
all.
To allow folk to use fine-grained access tokens, use the GitHub API for
accessing private repos. Keep using the existing interface for
non-private repos, as we can only assume an authenticated user for
private repos, and unauthenticated users have restrictive rate limits on
the API interface.
Fixes #321481
| Adam Dinwoodie | 2025-01-05 | 1 | -12/+29 |
| * | fetchFromGitHub: passthru `rev` based on `tag` | Peder Bergebakken Sundt | 2024-12-30 | 1 | -2/+4 |
| * | fetchFromGitHub: expose tag argument | Robert Schütz | 2024-12-06 | 1 | -1/+1 |
| * | fetchgit{,hub}: assert illegal tag + rev combinations•••It's quite a bit more complex due to this but this was asked for during review
| Atemu | 2024-12-05 | 1 | -4/+7 |
| * | fetchgit{,hub}: add tag argument•••It's become a common pattern to use `rev = "refs/tags/${version}"` rather than
just `rev = version` to ensure that the tag gets fetched rather than a branch
that has the same name. This has so far been done using boilerplate though, so
let's add a simple abstraction to fetch a tag instead.
| Atemu | 2024-11-18 | 1 | -3/+8 |
| * | fetchgithub: support fetchLFS | sohalt | 2024-09-04 | 1 | -2/+3 |
| * | fetchFromGitHub: fix compatibility issue with nix-prefetch | Weijia Wang | 2024-01-30 | 1 | -1/+5 |
| * | Merge #279934: fetchFromGitHub: drop unzip | Vladimír Čunát | 2024-01-16 | 1 | -1/+1 |
| |\ |
|
| | * | fetchFromGitHub: drop unzip | Weijia Wang | 2024-01-12 | 1 | -1/+1 |
| * | | build-support/fetchgithub: fix metadata eval for arguments without locations•••Without the change metadata evaluation fails on package like
`zammad.src` where no fields are defined in `.nix `files:
src = fetchFromGitHub (lib.importJSON ./source.json);
There evaluation fails as:
$ nix-instantiate --strict --eval --expr 'with import ./. {}; zammad.src.meta'
error:
23| # to indicate where derivation originates, similar to make-derivation.nix's mkDerivation
24| position = "${position.file}:${toString position.line}";
| ^
25| };
error: value is null while a set was expected
After the change evaluation succeeds as:
$ nix-instantiate --strict --eval --expr 'with import ./. {}; zammad.src.meta'
{ homepage = "https://github.com/zammad/zammad"; }
| Sergei Trofimovich | 2023-12-31 | 1 | -1/+1 |
| |/ |
|
| * | treewide: use optionalString instead of 'then ""' | Felix Buehler | 2023-06-24 | 1 | -1/+1 |
| * | fetchgit: require sparseCheckout be a list of strings•••Passing a (multi-line) string was deprecated in #200082 in favour of
list of strings, but still supported (with warning). Now, enforce use of
list of strings.
| Nicolas Benes | 2023-06-04 | 1 | -1/+1 |
| * | treewide: Make some fetchers overridable | piegames | 2023-04-22 | 1 | -0/+2 |
| * | fetchGitHub: inherit owner and repo for use with rocmUpdateScript | Madoura | 2022-12-10 | 1 | -1/+1 |
| * | treewide: make sparseCheckout a list of strings | Nicolas Benes | 2022-11-15 | 1 | -2/+2 |
| * | unstableGitUpdater: fix updating fetchzip-based sources•••a67950f20b97a293b2fefeecc349c6b785321e4b added `url` attribute
from `fetchurl` and therefore also from `fetchzip`.
We previously relied on `url` from fetchgit-based fetchers
to find the repo URL but now it will just return tarballs
in the case of `fetchFrom{GitHub,GitLab}`.
Let’s add an attribute to `fetch{git,FromGitHub,FromGitLab}`
to expose a repo URL consistently.
| Jan Tojnar | 2022-05-24 | 1 | -2/+11 |
| * | fetchFromGitHub: perserve originating position | Jonathan Ringer | 2022-02-10 | 1 | -1/+11 |
| * | fetchFromGitHub: don't overwrite meta | Jonathan Ringer | 2022-02-10 | 1 | -1/+4 |
| * | fetchgithub: Support sparseCheckout | Zhong Jianxin | 2022-01-24 | 1 | -2/+3 |
| * | fetchgithub: fix eval when passing forceFetchGit | Sandro Jäckel | 2021-11-11 | 1 | -1/+1 |