diff --git a/.semaphore/install-nix-2.3.15.sha256 b/.semaphore/install-nix-2.3.15.sha256 deleted file mode 100644 index c927cef..0000000 --- a/.semaphore/install-nix-2.3.15.sha256 +++ /dev/null @@ -1 +0,0 @@ -a18a0f2cf9d79d1f4504c076adedf4c59d0fe03db9f268378d61dcb49887fc2b install-nix-2.3.15 diff --git a/.semaphore/install-nix.sha256 b/.semaphore/install-nix.sha256 new file mode 100644 index 0000000..830edff --- /dev/null +++ b/.semaphore/install-nix.sha256 @@ -0,0 +1 @@ +2e96a9c4abb5648a805480e8679de3d9fecff30453603f11c26bb4e7176c7ebe install-nix-2.10.3 diff --git a/.semaphore/semaphore.yml b/.semaphore/semaphore.yml index 6573212..79a39e6 100644 --- a/.semaphore/semaphore.yml +++ b/.semaphore/semaphore.yml @@ -20,8 +20,8 @@ blocks: - "checkout" # Download and verify Nix installation script. - - curl -o install-nix-2.3.15 https://releases.nixos.org/nix/nix-2.3.15/install - - sha256sum --check .semaphore/install-nix-2.3.15.sha256 + - curl -o install-nix-2.10.3 https://releases.nixos.org/nix/nix-2.10.3/install + - sha256sum --check .semaphore/install-nix.sha256 # Restore `/nix` cache. Create the directory first, otherwise we encounter # permission errors. We do this because the Semaphore cache is faster than @@ -34,7 +34,11 @@ blocks: - unset LD_LIBRARY_PATH # Install Nix and source the shell configuration immediately. - - "sh ./install-nix-2.3.15 --no-daemon" + - "sh ./install-nix-2.10.3 --no-daemon" + # Enable `nix-command` feature, which `nix build` needs to build + - "sudo mkdir /etc/nix" + - "echo 'experimental-features = nix-command' | sudo tee -a /etc/nix/nix.conf" + - ". $HOME/.nix-profile/etc/profile.d/nix.sh" # Install Cachix and use the Channable cache @@ -48,14 +52,14 @@ blocks: - "cat nix-store-locations | cachix push channable-public" # Run the build and tests with Stack - - "nix run -c stack build --only-dependencies --test" - - "nix run -c stack test" + - "nix shell -f default.nix -c stack build --only-dependencies --test" + - "nix shell -f default.nix -c stack test" # Run the integration tests - - "(cd test && nix run -c ./integration_test.sh)" + - "(cd test && nix shell -f default.nix -c ./integration_test.sh)" # Build the Debian package - - "nix run -c ./package/build_package.sh" + - "nix shell -f default.nix -c ./package/build_package.sh" # Store a copy of the nix store. This will be refreshed daily, which # is more than sufficient for this repo.