1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-12-03 23:51:00 +01:00
nix/src
Yannik Sander 954e9101ba Add host attribute of github/gitlab flakerefs to URL serialization
`GitArchiveInputScheme::toUrl` currently drops the `host` attribute,
creating invalid urls when locking `github:` or `gitlab:` urls pointing to alterative instances and serializing the input back to a url.

```
❯ cat flake.nix
{
  inputs.gnome-2048 = {
    url = "gitlab:GNOME/gnome-2048?host=gitlab.gnome.org";
    flake = false;
  };

  outputs = inputs: {};
}
f1xb57354q79t_jpw5_h79cw0000gq/T/tmp.MOBbzbpT35
❯ nix flake metadata
warning: creating lock file '/private/var/folders/fb/f1xb57354q79t_jpw5_h79cw0000gq/T/tmp.MOBbzbpT35/flake.lock':
• Added input 'gnome-2048':
    'gitlab:GNOME/gnome-2048/70e0e430ca4bf590990433a3abdce6b631d50e6e?narHash=sha256-bya45ug2mDSU4SMn0fSBlZCuPl9y15B12ubKeb2A58s%3D' (2025-02-21)
Resolved URL:  path:/private/var/folders/fb/f1xb57354q79t_jpw5_h79cw0000gq/T/tmp.MOBbzbpT35
Locked URL:    path:/private/var/folders/fb/f1xb57354q79t_jpw5_h79cw0000gq/T/tmp.MOBbzbpT35?lastModified=1740744684&narHash=sha256-nxUL/JiTYbZX2c1XiN/TC6aA1hf%2B1YXsUvhL7ASY2uE%3D
Path:          /nix/store/f4xczpwhdxs8gal1rika1c5bvhyd472l-source
Last modified: 2025-02-28 13:11:24
Inputs:
└───gnome-2048: gitlab:GNOME/gnome-2048/70e0e430ca4bf590990433a3abdce6b631d50e6e?narHash=sha256-bya45ug2mDSU4SMn0fSBlZCuPl9y15B12ubKeb2A58s%3D (2025-02-21 23:18:46)
```

Note the gnome-2048 input url missing the original host query.

The Url after this commit:

```
[...]
Inputs:
└───gnome-2048: gitlab:GNOME/gnome-2048/70e0e430ca4bf590990433a3abdce6b631d50e6e?host=gitlab.gnome.org&narHash=sha256-bya45ug2mDSU4SMn0fSBlZCuPl9y15B12ubKeb2A58s%3D (2025-02-21 23:18:46)
```
2025-02-28 13:14:16 +01:00
..
build-remote Use getStandardError() 2025-02-17 18:09:59 +01:00
external-api-docs Format .nix files 2025-01-24 17:04:02 +01:00
internal-api-docs Format .nix files 2025-01-24 17:04:02 +01:00
libcmd libexpr: Fix use-after-free of StaticEnv::up 2025-02-21 14:36:39 +00:00
libexpr libexpr: Fix use-after-free of StaticEnv::up 2025-02-21 14:36:39 +00:00
libexpr-c Write just ./.version on all components 2025-02-18 11:41:35 +01:00
libexpr-test-support Write just ./.version on all components 2025-02-18 11:41:35 +01:00
libexpr-tests Merge pull request #12498 from NixOS/fix-cli-fine-version 2025-02-18 11:34:07 -05:00
libfetchers Add host attribute of github/gitlab flakerefs to URL serialization 2025-02-28 13:14:16 +01:00
libfetchers-tests Fix mingw build 2025-02-26 19:54:47 +01:00
libflake Introduce EvalStore::storePath 2025-02-19 21:24:26 -05:00
libflake-c Write just ./.version on all components 2025-02-18 11:41:35 +01:00
libflake-tests Write just ./.version on all components 2025-02-18 11:41:35 +01:00
libmain Merge pull request #12501 from DeterminateSystems/stop-progress-bar 2025-02-25 20:07:29 +01:00
libmain-c Write just ./.version on all components 2025-02-18 11:41:35 +01:00
libstore Merge pull request #12566 from NaN-git/fix-curl-callback 2025-02-25 20:15:06 +01:00
libstore-c Write just ./.version on all components 2025-02-18 11:41:35 +01:00
libstore-test-support Write just ./.version on all components 2025-02-18 11:41:35 +01:00
libstore-tests Write just ./.version on all components 2025-02-18 11:41:35 +01:00
libutil In pure eval mode, restrict rootFS to just the Nix store 2025-02-19 23:13:11 +01:00
libutil-c Write just ./.version on all components 2025-02-18 11:41:35 +01:00
libutil-test-support Write just ./.version on all components 2025-02-18 11:41:35 +01:00
libutil-tests Write just ./.version on all components 2025-02-18 11:41:35 +01:00
nix Merge pull request #12501 from DeterminateSystems/stop-progress-bar 2025-02-25 20:07:29 +01:00
nix-build Move code related to NIX_MAN_DIR from libstore to nix-cli 2025-02-18 01:57:33 +03:00
nix-channel Move code related to NIX_MAN_DIR from libstore to nix-cli 2025-02-18 01:57:33 +03:00
nix-collect-garbage Move code related to NIX_MAN_DIR from libstore to nix-cli 2025-02-18 01:57:33 +03:00
nix-copy-closure Move code related to NIX_MAN_DIR from libstore to nix-cli 2025-02-18 01:57:33 +03:00
nix-env Move code related to NIX_MAN_DIR from libstore to nix-cli 2025-02-18 01:57:33 +03:00
nix-instantiate Move code related to NIX_MAN_DIR from libstore to nix-cli 2025-02-18 01:57:33 +03:00
nix-store Move code related to NIX_MAN_DIR from libstore to nix-cli 2025-02-18 01:57:33 +03:00
perl Fix perl store bindings 2025-02-21 11:49:00 +01:00
nix-functional-tests Build Functional tests with Meson 2024-08-14 15:35:40 -04:00
nix-manual Build the manual with Meson 2024-10-09 11:58:17 -04:00