Skip to content

Commit 0bdd769

Browse files
committed
export the whole nix store
1 parent b25d535 commit 0bdd769

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

.github/workflows/maven.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ jobs:
1818
steps:
1919
- uses: actions/checkout@v4
2020
- uses: cachix/install-nix-action@v31
21+
- name: List pre-installed store paths
22+
run: find /nix/store -mindepth 1 -maxdepth 1 | sort > pre-installed
2123
- uses: actions/cache/restore@v4
2224
id: cache
2325
with:
@@ -32,7 +34,11 @@ jobs:
3234
if: steps.cache.outputs.cache-hit != 'true'
3335
run: |
3436
nix-build --out-link dependencies nix/github-workflow-dependencies.nix
35-
nix-store --export $(nix-store --query --requisites dependencies) > cache-closure.nar
37+
find /nix/store -mindepth 1 -maxdepth 1 | sort > store-paths
38+
echo ----
39+
comm -13 pre-installed store-paths
40+
echo ----
41+
nix-store --export $(comm -13 pre-installed store-paths) > cache-closure.nar
3642
- uses: actions/cache/save@v4
3743
if: steps.cache.outputs.cache-hit != 'true'
3844
with:

0 commit comments

Comments
 (0)