From 69171dc265d3916bb66ea4b6e5184ccf94a5473b Mon Sep 17 00:00:00 2001 From: Jean-Paul Calderone <exarkun@twistedmatrix.com> Date: Fri, 14 Jan 2022 13:07:22 -0500 Subject: [PATCH] Use command line arguments for the config $NIX_CONFIG is a nix >=2.4 feature so it doesn't help w/ 2.3 --- .circleci/config.yml | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 97951fe..726b0fe 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -25,14 +25,14 @@ jobs: resource_class: "xlarge" environment: - NIX_CONFIG: | - # 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 - extra-trusted-public-keys = saxtons.private.storage:MplOcEH8G/6mRlhlKkbA8GdeFR3dhCFsSszrspE/ZwY= hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ= + # 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: "--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 + EXTRA_TRUSTED_PUBLIC_KEYS: "--extra-trusted-public-keys='saxtons.private.storage:MplOcEH8G/6mRlhlKkbA8GdeFR3dhCFsSszrspE/ZwY= hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ='" steps: # Get *our* source code. @@ -71,6 +71,8 @@ jobs: nix-build \ -vvvv \ --debug \ + "${EXTRA_SUBSTITUTERS}" \ + "${EXTRA_TRUSTED_PUBLIC_KEYS}" \ -j 4 \ ./nix/ \ -A PaymentServer.components.exes."PaymentServer-exe" @@ -79,6 +81,8 @@ jobs: name: "Building Tests" command: | nix-build \ + "${EXTRA_SUBSTITUTERS}" \ + "${EXTRA_TRUSTED_PUBLIC_KEYS}" \ -j 4 \ ./nix/ \ -A PaymentServer.components.tests."PaymentServer-tests" -- GitLab