Skip to content

Commit e6fcf5d

Browse files
authored
ci: set NIX_PATH after installing Nix (#707)
For some reason Nix stopped being able to find nixpkgs by default after a fresh install. Explicitly setting `NIX_PATH` seems to fix it.
1 parent d01209d commit e6fcf5d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

.github/workflows/cli-tests.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,10 +93,12 @@ jobs:
9393
run: |
9494
sh <(curl -L https://nixos.org/nix/install) --no-modify-profile --daemon --daemon-user-count 1
9595
. /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh
96+
export NIX_PATH=nixpkgs=https://github.com/nixos/nixpkgs/tarball/nixos-unstable
9697
nix-build '<nixpkgs>' -A stdenv -A bash -A hello
9798
echo "__ETC_PROFILE_NIX_SOURCED=1" >> $GITHUB_ENV
9899
echo "NIX_PROFILES=$NIX_PROFILES" >> $GITHUB_ENV
99100
echo "NIX_SSL_CERT_FILE=$NIX_SSL_CERT_FILE" >> $GITHUB_ENV
101+
echo "NIX_PATH=$NIX_PATH" >> $GITHUB_ENV
100102
echo "PATH=$PATH" >> $GITHUB_ENV
101103
- name: Run tests
102104
run: go test -race -cover -v ./...

0 commit comments

Comments
 (0)