@@ -2,39 +2,37 @@ version: 2
22jobs:
33 compile:
44 docker:
5− - image: haskell:8.2.2
5+ - image: nixorg/nix:circleci
66 steps:
77 - checkout
88 - restore_cache:
99 keys:
10− - v1-stack-{{ checksum "package.yaml" }}-{{ checksum "stack.yaml" }}
11− - v1-stack-{{ checksum "package.yaml" }}-
12− - v1-stack-
10+ - v1-nix-{{ checksum "package.yaml" }}
11+ - v1-nix-
1312 name: Restoring stack cache
1413 - run:
1514 name: Compile
16− command: make build
15+ command: nix-shell --run 'make build'
1716 - persist_to_workspace:
1817 root: .
1918 paths:
2019 - dist
2120 - save_cache:
22− key: v1-stack-{{ checksum "package.yaml" }}-{{ checksum "stack.yaml" }}
23− name: Caching stack
21+ key: v1-nix-{{ checksum "package.yaml" }}
22+ name: Caching nix
2423 paths:
25− - .stack-work
26− - /root/.stack
24+ - /nix
2725
2826 doc-test:
2927 docker:
30− - image: haskell:8.2.2
28+ - image: nixorg/nix:circleci
3129 steps:
3230 - checkout
3331 - attach_workspace:
3432 at: .
3533 - run:
3634 name: Doc test
37− command: make test-doc-test
35+ command: nix-shell --run 'make test-doc-test'
3836
3937 for-github:
4038 docker:
@@ -46,18 +44,17 @@ jobs:
4644
4745 sdist:
4846 docker:
49− - image: haskell:8.2.2
47+ - image: nixorg/nix:circleci
5048 steps:
5149 - checkout
5250 - restore_cache:
5351 keys:
54− - v1-stack-{{ checksum "package.yaml" }}-{{ checksum "stack.yaml" }}
55− - v1-stack-{{ checksum "package.yaml" }}-
56− - v1-stack-
52+ - v1-nix-{{ checksum "package.yaml" }}
53+ - v1-nix-
5754 name: Restoring stack cache
5855 - run:
5956 name: Build sdist
60− command: make sdist
57+ command: nix-shell --run 'make sdist'
6158
6259workflows:
6360 version: 2