<feed xmlns='http://www.w3.org/2005/Atom'>
<title>nixos/nixpkgs.git/pkgs/build-support/fetchgitlab, branch master</title>
<subtitle>Nix Packages collection</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/nixos/nixpkgs.git/'/>
<entry>
<title>Revert "fetchurl, fetchgitlab: fix curlOpts extension"</title>
<updated>2025-12-14T17:03:34+00:00</updated>
<author>
<name>Yueh-Shun Li</name>
<email>shamrocklee@posteo.net</email>
</author>
<published>2025-12-14T17:03:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/nixos/nixpkgs.git/commit/?id=58366ffe0c3872cb1903b05ee355215af74b57e8'/>
<id>58366ffe0c3872cb1903b05ee355215af74b57e8</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>fetchurl, fetchgitlab: fix curlOpts extension</title>
<updated>2025-12-13T21:47:01+00:00</updated>
<author>
<name>Nicolas Benes</name>
<email>nbenes.gh@xandea.de</email>
</author>
<published>2025-12-13T21:43:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/nixos/nixpkgs.git/commit/?id=3db11767a99a908235c6209caac986316e300b89'/>
<id>3db11767a99a908235c6209caac986316e300b89</id>
<content type='text'>
PR #464475 enables __structuredAttrs and makes curlOpts a bash array.
Consequently, it must be extended as such to be effective.

See also https://github.com/NixOS/nixpkgs/pull/464475#issuecomment-3649765507
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
PR #464475 enables __structuredAttrs and makes curlOpts a bash array.
Consequently, it must be extended as such to be effective.

See also https://github.com/NixOS/nixpkgs/pull/464475#issuecomment-3649765507
</pre>
</div>
</content>
</entry>
<entry>
<title>fetchgitlab: pass private tokens/passwords</title>
<updated>2025-10-11T17:48:32+00:00</updated>
<author>
<name>Nicolas Benes</name>
<email>nbenes.gh@xandea.de</email>
</author>
<published>2022-11-21T20:02:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/nixos/nixpkgs.git/commit/?id=2b5981c5c79b351611c705b11d56f20bbb27c5fa'/>
<id>2b5981c5c79b351611c705b11d56f20bbb27c5fa</id>
<content type='text'>
Allow the fetcher to authenticate with user name and password.
Note: as of now, GitLab ignores the user name (it must be set, but the
value does not matter) but this may change in the future:
https://gitlab.com/gitlab-org/gitlab/-/issues/212953

Credentials can be passed to the nix-daemon, for example, via a
read-protected `EnvironmentFile`:

```console
$ ls -l /to/secrets.txt
-rw------- 1 root root 100 Nov  1 10:42 /to/secrets.txt
```

In /to/secrets.txt:

```
 # for `fetchFromGitLab { private=true; ... }`
NIX_GITLAB_PRIVATE_USERNAME=whatever
NIX_GITLAB_PRIVATE_PASSWORD=glpat-the-access-token
 # for `fetchFromGitLab { private=true; varPrefix="EXAMPLE"; ... }`
NIX_EXAMPLE_GITLAB_PRIVATE_USERNAME=whatever
NIX_EXAMPLE_GITLAB_PRIVATE_PASSWORD=glpat-another-access-token
```

In /etc/nixos/configuration.nix:

```nix
{ config, pkgs, ... }:
{
  systemd.services.nix-daemon.serviceConfig.EnvironmentFile =
    "/to/secrets.txt";
}
```

GitLab supports HTTP Basic Authentication (credentials in `.netrc` file)
only if accessed via Git. Access via the GitLab API requires a custom
header (e.g. `PRIVATE-TOKEN`) instead. See:

* https://docs.gitlab.com/ee/user/project/settings/project_access_tokens.html#project-access-tokens
* https://docs.gitlab.com/ee/api/rest/authentication.html#personalprojectgroup-access-tokens
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Allow the fetcher to authenticate with user name and password.
Note: as of now, GitLab ignores the user name (it must be set, but the
value does not matter) but this may change in the future:
https://gitlab.com/gitlab-org/gitlab/-/issues/212953

Credentials can be passed to the nix-daemon, for example, via a
read-protected `EnvironmentFile`:

```console
$ ls -l /to/secrets.txt
-rw------- 1 root root 100 Nov  1 10:42 /to/secrets.txt
```

In /to/secrets.txt:

```
 # for `fetchFromGitLab { private=true; ... }`
NIX_GITLAB_PRIVATE_USERNAME=whatever
NIX_GITLAB_PRIVATE_PASSWORD=glpat-the-access-token
 # for `fetchFromGitLab { private=true; varPrefix="EXAMPLE"; ... }`
NIX_EXAMPLE_GITLAB_PRIVATE_USERNAME=whatever
NIX_EXAMPLE_GITLAB_PRIVATE_PASSWORD=glpat-another-access-token
```

In /etc/nixos/configuration.nix:

```nix
{ config, pkgs, ... }:
{
  systemd.services.nix-daemon.serviceConfig.EnvironmentFile =
    "/to/secrets.txt";
}
```

GitLab supports HTTP Basic Authentication (credentials in `.netrc` file)
only if accessed via Git. Access via the GitLab API requires a custom
header (e.g. `PRIVATE-TOKEN`) instead. See:

* https://docs.gitlab.com/ee/user/project/settings/project_access_tokens.html#project-access-tokens
* https://docs.gitlab.com/ee/api/rest/authentication.html#personalprojectgroup-access-tokens
</pre>
</div>
</content>
</entry>
<entry>
<title>lib, treewide: introduce `repoRevToName`, use it in most `fetch*` functions</title>
<updated>2025-05-31T10:01:21+00:00</updated>
<author>
<name>Jan Malakhovski</name>
<email>oxij@oxij.org</email>
</author>
<published>2025-03-19T14:25:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/nixos/nixpkgs.git/commit/?id=7c8a4efb688b4bf3e8dbf71a43e8b963d8fe3bca'/>
<id>7c8a4efb688b4bf3e8dbf71a43e8b963d8fe3bca</id>
<content type='text'>
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/&lt;hash&gt;-source.drv
  ```

- `fetchedSourceNameDefault = "versioned"`:

  ```
  $ nix-instantiate -A fuse.src
  /nix/store/&lt;hash&gt;-libfuse-2.9.9-source.drv
  ```

- `fetchedSourceNameDefault = "full"`:

  ```
  $ nix-instantiate -A fuse.src
  /nix/store/&lt;hash&gt;-libfuse-2.9.9-github-source.drv
  ```

See the documentation of `config.fetchedSourceNameDefault` for more info.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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/&lt;hash&gt;-source.drv
  ```

- `fetchedSourceNameDefault = "versioned"`:

  ```
  $ nix-instantiate -A fuse.src
  /nix/store/&lt;hash&gt;-libfuse-2.9.9-source.drv
  ```

- `fetchedSourceNameDefault = "full"`:

  ```
  $ nix-instantiate -A fuse.src
  /nix/store/&lt;hash&gt;-libfuse-2.9.9-github-source.drv
  ```

See the documentation of `config.fetchedSourceNameDefault` for more info.
</pre>
</div>
</content>
</entry>
<entry>
<title>fetchFromGitLab: passthru `rev` based on `tag`</title>
<updated>2024-12-30T22:09:49+00:00</updated>
<author>
<name>Peder Bergebakken Sundt</name>
<email>pbsds@hotmail.com</email>
</author>
<published>2024-12-30T22:09:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/nixos/nixpkgs.git/commit/?id=f7eba55589c7af76539f7532f16f077a29c9a26b'/>
<id>f7eba55589c7af76539f7532f16f077a29c9a26b</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>fetchgitlab: add tag argument</title>
<updated>2024-12-24T11:24:54+00:00</updated>
<author>
<name>wxt</name>
<email>3264117476@qq.com</email>
</author>
<published>2024-12-22T08:15:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/nixos/nixpkgs.git/commit/?id=4616db6469a88b99875e7804b8a21448e6ba61ef'/>
<id>4616db6469a88b99875e7804b8a21448e6ba61ef</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>fetchgitlab: nixfmt</title>
<updated>2024-12-24T11:23:54+00:00</updated>
<author>
<name>wxt</name>
<email>3264117476@qq.com</email>
</author>
<published>2024-12-22T08:13:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/nixos/nixpkgs.git/commit/?id=ef0cdab2483080236da1090515df9823ac6a7d74'/>
<id>ef0cdab2483080236da1090515df9823ac6a7d74</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge pull request #268304 from panicgh/fetchgitlab-sparse-forcegit</title>
<updated>2023-12-17T02:34:52+00:00</updated>
<author>
<name>Peder Bergebakken Sundt</name>
<email>pbsds@hotmail.com</email>
</author>
<published>2023-12-17T02:34:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/nixos/nixpkgs.git/commit/?id=adc2612d49179a597e56d440115f552682cc8243'/>
<id>adc2612d49179a597e56d440115f552682cc8243</id>
<content type='text'>
fetchgitlab: add sparseCheckout and forceFetchGit args</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
fetchgitlab: add sparseCheckout and forceFetchGit args</pre>
</div>
</content>
</entry>
<entry>
<title>fetchFromGitLab: passthru owner and repo</title>
<updated>2023-11-27T10:10:17+00:00</updated>
<author>
<name>Colin</name>
<email>colin@uninsane.org</email>
</author>
<published>2023-11-27T10:10:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/nixos/nixpkgs.git/commit/?id=3a55403cf4cf7d5237b184b02a6a3051c6ae700d'/>
<id>3a55403cf4cf7d5237b184b02a6a3051c6ae700d</id>
<content type='text'>
this makes the output more consistent with `fetchFromGitHub`.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
this makes the output more consistent with `fetchFromGitHub`.
</pre>
</div>
</content>
</entry>
<entry>
<title>fetchgitlab: add option to force fetchgit</title>
<updated>2023-11-18T12:14:08+00:00</updated>
<author>
<name>Nicolas Benes</name>
<email>nbenes.gh@xandea.de</email>
</author>
<published>2023-11-18T12:14:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/nixos/nixpkgs.git/commit/?id=cf00f9c2ea24f80f1ecea7d9fdd5c5a11e12f997'/>
<id>cf00f9c2ea24f80f1ecea7d9fdd5c5a11e12f997</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
