From 4d477f53c1fd5c2feb60185ff5d1b9a309d5c48c Mon Sep 17 00:00:00 2001
From: Jean-Paul Calderone <exarkun@twistedmatrix.com>
Date: Mon, 7 Oct 2019 13:27:27 -0400
Subject: [PATCH] Specify a nixpkgs to use

---
 .circleci/config.yml | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/.circleci/config.yml b/.circleci/config.yml
index b8beebc..1ed65af 100644
--- a/.circleci/config.yml
+++ b/.circleci/config.yml
@@ -54,8 +54,25 @@ jobs:
 
     environment:
       CODECOV_TOKEN: "cc6e4697-4337-4506-88af-92b8f8ca6b22"
+      # Specify a revision of NixOS/nixpkgs to run against.  This essentially
+      # pins the majority of the software involved in the build.  This
+      # revision is selected arbitrarily.  It's somewhat current as of the
+      # time of this comment.  We can bump it to a newer version when that
+      # makes sense.  Meanwhile, the platform won't shift around beneath us
+      # unexpectedly.
+      NIXPKGS_REV: "5d5cd70516001e79516d2ade8bcf31df208a4ef3"
 
     steps:
+      - run:
+          # 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.
+          # There is no way to set an environment variable containing the
+          # value of another environment variable on CircleCI except to use
+          # the `BASE_ENV` feature as we do here.
+          name: "Setup NIX_PATH Environment Variable"
+          command: |
+            echo "export NIX_PATH=nixpkgs=https://github.com/NixOS/nixpkgs-channels/archive/$NIXPKGS_REV.tar.gz" >> $BASH_ENV
+
       - "checkout"
 
       - run:
-- 
GitLab