Skip to content
Snippets Groups Projects
Commit 642a16fe authored by Tom Prince's avatar Tom Prince
Browse files

Use privatestorage and haskell.nix binary caches.

parent c7b76df0
No related branches found
No related tags found
1 merge request!101Update haskell.nix version used in CI and deployment.
...@@ -35,14 +35,17 @@ jobs: ...@@ -35,14 +35,17 @@ jobs:
steps: steps:
- run: - run:
name: "Setup Environment Variables"
command: |
# Get NIX_PATH set for the rest of the job so that the revision of # Get NIX_PATH set for the rest of the job so that the revision of
# nixpkgs we selected will be used everywhere Nix pulls in software. # nixpkgs we selected will be used everywhere Nix pulls in software.
# There is no way to set an environment variable containing the # There is no way to set an environment variable containing the
# value of another environment variable on CircleCI except to use # value of another environment variable on CircleCI except to use
# the `BASH_ENV` feature as we do here. # the `BASH_ENV` feature as we do here.
name: "Setup NIX_PATH Environment Variable"
command: |
echo "export NIX_PATH=nixpkgs=https://github.com/NixOS/nixpkgs/archive/$NIXPKGS_REV.tar.gz" >> $BASH_ENV echo "export NIX_PATH=nixpkgs=https://github.com/NixOS/nixpkgs/archive/$NIXPKGS_REV.tar.gz" >> $BASH_ENV
# Set XDG_CONFIG_DIRS to point at the source directory, so that nix
# will pickup nix/nix.conf as a configuration file from there.
echo "export XDG_CONFIG_DIRS=$CIRCLE_WORKING_DIRECTORY" >> $BASH_ENV
# Get *our* source code. # Get *our* source code.
- "checkout" - "checkout"
...@@ -92,7 +95,6 @@ jobs: ...@@ -92,7 +95,6 @@ jobs:
name: "Building with Nix" name: "Building with Nix"
command: | command: |
nix-build \ nix-build \
--option extra-substituters https://hydra.iohk.io/ \
./nix/ \ ./nix/ \
-A PaymentServer.components.exes."PaymentServer-exe" -A PaymentServer.components.exes."PaymentServer-exe"
...@@ -100,7 +102,6 @@ jobs: ...@@ -100,7 +102,6 @@ jobs:
name: "Building Tests" name: "Building Tests"
command: | command: |
nix-build \ nix-build \
--option extra-substituters https://hydra.iohk.io/ \
./nix/ \ ./nix/ \
-A PaymentServer.components.tests."PaymentServer-tests" -A PaymentServer.components.tests."PaymentServer-tests"
......
# nix.conf for usage in CI.
# Add privatestorage's and haskell.nix[1] nix caches for builds.
# [1] https://input-output-hk.github.io/haskell.nix/tutorials/getting-started/#setting-up-the-binary-cache
extra-substituters = http://saxtons.private.storage/ https://hydra.iohk.io/
# We needed to explictly specify the key for cache.nixos.org until we are using a version of nix
# that has https://github.com/NixOS/nix/commit/ff4dea63c9403880500f82ce273713ecf793d2d9
trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= saxtons.private.storage:MplOcEH8G/6mRlhlKkbA8GdeFR3dhCFsSszrspE/ZwY= hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ=
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment