@@ -20,8 +20,8 @@ blocks:
2020 - " checkout"
2121
2222 # Download and verify Nix installation script.
23- - curl -o install-nix-2.3.15 https://releases.nixos.org/nix/nix-2.3.15 /install
24- - sha256sum --check .semaphore/install-nix-2.3.15 .sha256
23+ - curl -o install-nix-2.10.3 https://releases.nixos.org/nix/nix-2.10.3 /install
24+ - sha256sum --check .semaphore/install-nix.sha256
2525
2626 # Restore `/nix` cache. Create the directory first, otherwise we encounter
2727 # permission errors. We do this because the Semaphore cache is faster than
@@ -34,7 +34,11 @@ blocks:
3434 - unset LD_LIBRARY_PATH
3535
3636 # Install Nix and source the shell configuration immediately.
37- - " sh ./install-nix-2.3.15 --no-daemon"
37+ - " sh ./install-nix-2.10.3 --no-daemon"
38+ # Enable `nix-command` feature, which `nix build` needs to build
39+ - " sudo mkdir /etc/nix"
40+ - " echo 'experimental-features = nix-command' | sudo tee -a /etc/nix/nix.conf"
41+
3842 - " . $HOME/.nix-profile/etc/profile.d/nix.sh"
3943
4044 # Install Cachix and use the Channable cache
@@ -48,14 +52,14 @@ blocks:
4852 - " cat nix-store-locations | cachix push channable-public"
4953
5054 # Run the build and tests with Stack
51- - " nix run -c stack build --only-dependencies --test"
52- - " nix run -c stack test"
55+ - " nix shell -f default.nix -c stack build --only-dependencies --test"
56+ - " nix shell -f default.nix -c stack test"
5357
5458 # Run the integration tests
55- - " (cd test && nix run -c ./integration_test.sh)"
59+ - " (cd test && nix shell -f default.nix -c ./integration_test.sh)"
5660
5761 # Build the Debian package
58- - " nix run -c ./package/build_package.sh"
62+ - " nix shell -f default.nix -c ./package/build_package.sh"
5963
6064 # Store a copy of the nix store. This will be refreshed daily, which
6165 # is more than sufficient for this repo.
0 commit comments