CircleCI¶
Create new binary cache on https://app.cachix.org/cache and generate a write auth token.
Follow circleci documentation to setup environment variable to set
$CACHIX_AUTH_TOKEN
.
Replace
mycache
in the following.circleci/config.yml
:
version: 2.1
workflows:
version: 2
workflow:
jobs:
- build
jobs:
build:
docker:
- image: nixos/nix:2.3.12
environment:
CACHIX_NAME: mycache
steps:
- checkout
- run:
name: Set up Cachix
command: |
nix-env -iA nixpkgs.cachix nixpkgs.bash
cachix use $CACHIX_NAME
- run: cachix watch-exec $CACHIX_NAME nix-build
- run: cachix watch-exec $CACHIX_NAME -- nix-shell --run "echo nix-shell successfully entered"