-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Nixpkgs input is very out of date #6509
Description
Describe the bug
I make all of my flake inputs follow the Nixpkgs that my system is built against, so that I can be mostly sure everything is using the same package set. However, this recently broke. Specifically, when overriding the Nixpkgs input in this from nixos-21.05-small (!!! 21.11 has been out for a while, and 22.05 will be out "soon") to nixos-unstable, the fetchGit test fails.
Steps To Reproduce
- Change the Nixpkgs input to point to nixos-unstable
- Attempt to build
- Observe test failure:
ran test tests/fetchGit.sh... [�[31;1mFAIL�[m]
++ [[ -n '' ]]
++ type -p git
+ [[ -z /nix/store/zx5pmkkgi0kszrcyc0mz7ypcsg7aggcv-git-2.36.0/bin/git ]]
+ clearStore
+ echo 'clearing store...'
clearing store...
+ chmod -R +w /build/nix-test/tests/fetchGit/store
+ rm -rf /build/nix-test/tests/fetchGit/store
+ mkdir /build/nix-test/tests/fetchGit/store
+ rm -rf /build/nix-test/tests/fetchGit/var/nix
+ mkdir /build/nix-test/tests/fetchGit/var/nix
+ clearProfiles
+ profiles=/build/nix-test/tests/fetchGit/var/nix/profiles
+ rm -rf /build/nix-test/tests/fetchGit/var/nix/profiles
+ repo=/build/nix-test/tests/fetchGit/./git
+ export _NIX_FORCE_HTTP=1
+ _NIX_FORCE_HTTP=1
+ rm -rf /build/nix-test/tests/fetchGit/./git /build/nix-test/tests/fetchGit/./git-tmp /build/nix-test/tests/fetchGit/test-home/.cache/nix /build/nix-test/tests/fetchGit/worktree /build/nix-test/tests/fetchGit/shallow /build/nix-test/tests/fetchGit/minimal
+ git init /build/nix-test/tests/fetchGit/./git
hint: Using 'master' as the name for the initial branch. This default branch name
hint: is subject to change. To configure the initial branch name to use in all
hint: of your new repositories, which will suppress this warning, call:
hint:
hint: git config --global init.defaultBranch <name>
hint:
hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and
hint: 'development'. The just-created branch can be renamed via this command:
hint:
hint: git branch -m <name>
Initialized empty Git repository in /build/nix-test/tests/fetchGit/git/.git/
+ git -C /build/nix-test/tests/fetchGit/./git config user.email foobar@example.com
+ git -C /build/nix-test/tests/fetchGit/./git config user.name Foobar
+ echo utrecht
+ touch /build/nix-test/tests/fetchGit/./git/.gitignore
+ git -C /build/nix-test/tests/fetchGit/./git add hello .gitignore
+ git -C /build/nix-test/tests/fetchGit/./git commit -m Bla1
[master (root-commit) e3d4d2c] Bla1
2 files changed, 1 insertion(+)
create mode 100644 .gitignore
create mode 100644 hello
++ git -C /build/nix-test/tests/fetchGit/./git rev-parse HEAD
+ rev1=e3d4d2ca943ab5b0e515dea9a4c00102ac507143
+ echo world
+ git -C /build/nix-test/tests/fetchGit/./git commit -m Bla2 -a
[master 714ad2c] Bla2
1 file changed, 1 insertion(+), 1 deletion(-)
+ git -C /build/nix-test/tests/fetchGit/./git worktree add /build/nix-test/tests/fetchGit/worktree
Preparing worktree (new branch 'worktree')
HEAD is now at 714ad2c Bla2
+ echo hello
++ git -C /build/nix-test/tests/fetchGit/./git rev-parse HEAD
+ rev2=714ad2cf0152893a3e894304eecd92f639809ca0
+ unset _NIX_FORCE_HTTP
++ nix eval --impure --raw --expr '(builtins.fetchGit file:///build/nix-test/tests/fetchGit/worktree).outPath'
warning: you don't have Internet access; disabling some network-dependent features
warning: Git tree '/build/nix-test/tests/fetchGit/worktree' is dirty
+ path0=/build/nix-test/tests/fetchGit/store/04ks87ny9xh3n1gv604cx6a7d4mp0mqn-source
++ nix eval --impure --raw --expr '(builtins.fetchTree { type = "git"; url = file:///build/nix-test/tests/fetchGit/worktree; }).outPath'
warning: you don't have Internet access; disabling some network-dependent features
warning: Git tree '/build/nix-test/tests/fetchGit/worktree' is dirty
+ path0_=/build/nix-test/tests/fetchGit/store/04ks87ny9xh3n1gv604cx6a7d4mp0mqn-source
+ [[ /build/nix-test/tests/fetchGit/store/04ks87ny9xh3n1gv604cx6a7d4mp0mqn-source = /build/nix-test/tests/fetchGit/store/04ks87ny9xh3n1gv604cx6a7d4mp0mqn-source ]]
+ export _NIX_FORCE_HTTP=1
+ _NIX_FORCE_HTTP=1
++ tail -n 1 /build/nix-test/tests/fetchGit/store/04ks87ny9xh3n1gv604cx6a7d4mp0mqn-source/hello
+ [[ hello = \h\e\l\l\o ]]
++ nix eval --impure --raw --expr '(builtins.fetchGit file:///build/nix-test/tests/fetchGit/./git).outPath'
warning: you don't have Internet access; disabling some network-dependent features
+ path=/build/nix-test/tests/fetchGit/store/0mmlsds7fd6dnn3v7b5fw3k4q6apgvh5-source
++ cat /build/nix-test/tests/fetchGit/store/0mmlsds7fd6dnn3v7b5fw3k4q6apgvh5-source/hello
+ [[ world = world ]]
+ git -C /build/nix-test/tests/fetchGit/./git checkout -b devtest
Switched to a new branch 'devtest'
+ echo 'different file'
+ git -C /build/nix-test/tests/fetchGit/./git add differentbranch
+ git -C /build/nix-test/tests/fetchGit/./git commit -m Test2
[devtest 5f5f4bc] Test2
1 file changed, 1 insertion(+)
create mode 100644 differentbranch
+ git -C /build/nix-test/tests/fetchGit/./git checkout master
Switched to branch 'master'
++ git -C /build/nix-test/tests/fetchGit/./git rev-parse devtest
+ devrev=5f5f4bcca06eab9e7676ea47f345d081dfb220d4
++ nix eval --impure --raw --expr 'builtins.fetchGit { url = file:///build/nix-test/tests/fetchGit/./git; rev = "5f5f4bcca06eab9e7676ea47f345d081dfb220d4"; }'
+ out='warning: you don'\''t have Internet access; disabling some network-dependent features'
+ status=139
+ [[ 139 == 1 ]]
make: *** [mk/lib.mk:123: tests/fetchGit.sh.test] Error 1
Expected behavior
The build should succeed.
nix-env --version output
nix-env (Nix) 2.9.0pre20220426_35393dc
Additional context
Not really context, but if/when this is resolved, it would be nice to make the input not use the registry reference, because I personally override the registry which then requires that I specify what the nixpkgs input should be (error: cannot find flake 'flake:nixpkgs/nixos-21.05-small' in the flake registries).