Skip to content

Commit

Permalink
ci: set NIX_PATH after installing Nix (#707)
Browse files Browse the repository at this point in the history
For some reason Nix stopped being able to find nixpkgs by default after
a fresh install. Explicitly setting `NIX_PATH` seems to fix it.
  • Loading branch information
gcurtis committed Feb 28, 2023
1 parent d01209d commit e6fcf5d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/cli-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,12 @@ jobs:
run: |
sh <(curl -L https://nixos.org/nix/install) --no-modify-profile --daemon --daemon-user-count 1
. /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh
export NIX_PATH=nixpkgs=https://github.com/nixos/nixpkgs/tarball/nixos-unstable
nix-build '<nixpkgs>' -A stdenv -A bash -A hello
echo "__ETC_PROFILE_NIX_SOURCED=1" >> $GITHUB_ENV
echo "NIX_PROFILES=$NIX_PROFILES" >> $GITHUB_ENV
echo "NIX_SSL_CERT_FILE=$NIX_SSL_CERT_FILE" >> $GITHUB_ENV
echo "NIX_PATH=$NIX_PATH" >> $GITHUB_ENV
echo "PATH=$PATH" >> $GITHUB_ENV
- name: Run tests
run: go test -race -cover -v ./...
Expand Down

0 comments on commit e6fcf5d

Please sign in to comment.