1111 - v[0-9]+.x
1212 paths :
1313 - ' **.nix'
14+ - tools/nix/**
1415 - .github/workflows/nix-changes.yml
1516 pull_request :
1617 paths :
1718 - ' **.nix'
19+ - tools/nix/**
1820 - .github/workflows/nix-changes.yml
1921 types : [opened, synchronize, reopened, ready_for_review]
2022
4749 with :
4850 fetch-depth : 2
4951 persist-credentials : false
50- sparse-checkout : ' *.nix'
52+ sparse-checkout : |
53+ shell.nix
54+ tools/nix/
5155 sparse-checkout-cone-mode : false
5256
5357 - uses : cachix/install-nix-action@630ae543ea3a38a9a4166f03376c02c50f408342 # v31.11.0
@@ -60,39 +64,14 @@ jobs:
6064 name : nodejs
6165
6266 - name : Compute requisites after change
63- shell : bash # See https://docs.github.com/en/actions/writing-workflows/workflow-syntax-for-github-actions#exit-codes-and-error-action-preference, we want the pipefail option.
64- run : |
65- nix-store --query --references "$(
66- nix-instantiate -I "nixpkgs=./tools/nix/pkgs.nix" shell.nix \
67- --arg devTools "
68- (import ./tools/nix/devTools.nix {})
69- ++ builtins.attrValues (
70- { inherit (import <nixpkgs> {}) nixfmt-tree sccache; }
71- // import ./tools/nix/openssl-matrix.nix {}
72- // import ./tools/nix/pkcs11.nix {}
73- )")" \
74- | xargs nix-store --realise \
75- | xargs nix-store --query --requisites \
76- | sort -k1.45 \
77- > requisites-${{ matrix.system }}-after.list
67+ run : ./tools/nix/list-requisites.sh > requisites-${{ matrix.system }}-after.list
7868
7969 - name : Compute requisites before change
80- shell : bash # See https://docs.github.com/en/actions/writing-workflows/workflow-syntax-for-github-actions#exit-codes-and-error-action-preference, we want the pipefail option.
8170 run : |
8271 git reset HEAD^ --hard
83- nix-store --query --references "$(
84- nix-instantiate -I "nixpkgs=./tools/nix/pkgs.nix" shell.nix \
85- --arg devTools "
86- (import ./tools/nix/devTools.nix {})
87- ++ builtins.attrValues (
88- { inherit (import <nixpkgs> {}) nixfmt-tree sccache; }
89- // import ./tools/nix/openssl-matrix.nix {}
90- // import ./tools/nix/pkcs11.nix {}
91- )")" \
92- | xargs nix-store --realise \
93- | xargs nix-store --query --requisites \
94- | sort -k1.45 \
95- > requisites-${{ matrix.system }}-before.list
72+ # TODO(aduh95): remove this once list-requisites.sh has reached `main`
73+ [ -f tools/nix/list-requisites.sh ] || git checkout FETCH_HEAD -- tools/nix/list-requisites.sh
74+ ./tools/nix/list-requisites.sh > requisites-${{ matrix.system }}-before.list
9675
9776 - name : Output diff
9877 run : |
0 commit comments