Skip to content
Snippets Groups Projects
Commit a8342874 authored by Jean-Paul Calderone's avatar Jean-Paul Calderone
Browse files

try using run and checksum to avoid the duplication

parent e712f8ed
No related branches found
No related tags found
1 merge request!20Construct a better Nix store cache key for CircleCI
...@@ -49,6 +49,11 @@ jobs: ...@@ -49,6 +49,11 @@ jobs:
# Get *our* source code. # Get *our* source code.
- "checkout" - "checkout"
- "run":
name: "Prepare For Cache Key"
command: |
echo "${NIXPKGS_REV}" > nixpkgs.rev
- restore_cache: - restore_cache:
# Get all of Nix's state relating to the particular revision of # Get all of Nix's state relating to the particular revision of
# nixpkgs we're using. It will always be the same. CircleCI # nixpkgs we're using. It will always be the same. CircleCI
...@@ -76,8 +81,8 @@ jobs: ...@@ -76,8 +81,8 @@ jobs:
# Note: The literal hash here must match NIXPKGS_REV set above. # Note: The literal hash here must match NIXPKGS_REV set above.
# CircleCI doesn't let us interpolate that value so we *duplicate* # CircleCI doesn't let us interpolate that value so we *duplicate*
# it instead. # it instead.
- paymentserver-nix-store-v1-3c83ad6ac13b67101cc3e2e07781963a010c1624-{{ checksum "ristretto.nix" }} - paymentserver-nix-store-v1-{{ checksum "nixpkgs.rev" }}-{{ checksum "ristretto.nix" }}
- paymentserver-nix-store-v1-3c83ad6ac13b67101cc3e2e07781963a010c1624- - paymentserver-nix-store-v1-{{ checksum "nixpkgs.rev" }}-
- paymentserver-nix-store-v1- - paymentserver-nix-store-v1-
- restore_cache: - restore_cache:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment