File tree Expand file tree Collapse file tree 3 files changed +20
-9
lines changed Expand file tree Collapse file tree 3 files changed +20
-9
lines changed Original file line number Diff line number Diff line change 99 runs-on : ubuntu-latest
1010 steps :
1111 - uses : actions/checkout@v3
12- - uses : nixbuild/nix-quick-install-action@v21
12+ - uses : nixbuild/nix-quick-install-action@v22
1313 with :
14+ # We use newer Nix for:
15+ # - https://github.com/NixOS/nix/issues/7263
16+ # - https://github.com/NixOS/nix/issues/7026
17+ nix_version : 2.14.1
1418 nix_conf : |
1519 experimental-features = nix-command flakes
1620 access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
Original file line number Diff line number Diff line change 33set -euo pipefail
44
55source ./test/common.sh
6+ nix --version
67
78# The test directory must contain a 'test.sh' file that will be run in that
89# directory.
Original file line number Diff line number Diff line change @@ -16,12 +16,18 @@ HASKELL_FLAKE=${DIR_OF_COMMON_SH}/..
1616OVERRIDE_HASKELL_FLAKE=" --override-input haskell-flake path:${HASKELL_FLAKE} "
1717OVERRIDE_NIXPKGS=" --override-input nixpkgs github:nixos/nixpkgs/bb31220cca6d044baa6dc2715b07497a2a7c4bc7"
1818
19- # Waiting on github.com/nixbuild/nix-quick-install-action to support 2.13+
20- # We use newer Nix for:
21- # - https://github.com/NixOS/nix/issues/7263
22- # - https://github.com/NixOS/nix/issues/7026
23- nix build --no-link github:nixos/nix/2.14.1
24- export PATH=$( nix eval --raw github:nixos/nix/2.14.1#default.outPath) /bin:$PATH
25- echo $PATH
26- nix --version
19+ currentver=" $( nix eval --raw --expr builtins.nixVersion) "
20+ requiredver=" 2.14.1"
21+ if [ " $( printf ' %s\n' " $requiredver " " $currentver " | sort -V | head -n1) " = " $requiredver " ];
22+ then
23+ echo
24+ else
25+ echo " !!!! Your Nix version is old ($currentver ). Using newer Nix from github:nixos/nix/2.14.1"
26+ # We use newer Nix for:
27+ # - https://github.com/NixOS/nix/issues/7263
28+ # - https://github.com/NixOS/nix/issues/7026
29+ nix build --no-link github:nixos/nix/2.14.1
30+ export PATH=$( nix eval --raw github:nixos/nix/2.14.1#default.outPath) /bin:$PATH
31+ fi
2732
33+ nix --version
You can’t perform that action at this time.
0 commit comments