11on :
22 workflow_call :
33 inputs :
4+ flake :
5+ default : " ."
6+ type : string
47 system :
58 required : true
69 type : string
5053 - uses : actions/checkout@v4
5154 - uses : DeterminateSystems/determinate-nix-action@main
5255 - uses : DeterminateSystems/flakehub-cache-action@main
53- - run : nix build . #packages.${{ inputs.system }}.default .#packages.${{ inputs.system }}.binaryTarball --no-link -L
54- - run : nix build . #packages.${{ inputs.system }}.binaryTarball --out-link tarball
56+ - run : nix build ${{ inputs.flake }} #packages.${{ inputs.system }}.default .#packages.${{ inputs.system }}.binaryTarball --no-link -L
57+ - run : nix build ${{ inputs.flake }} #packages.${{ inputs.system }}.binaryTarball --out-link tarball
5558 - uses : actions/upload-artifact@v4
5659 with :
5760 name : ${{ inputs.system }}
6871 - uses : actions/checkout@v4
6972 - uses : DeterminateSystems/determinate-nix-action@main
7073 - uses : DeterminateSystems/flakehub-cache-action@main
71- - run : nix flake check -L --system ${{ inputs.system }}
74+ - run : nix flake check ${{ inputs.flake }} -L --system ${{ inputs.system }}
7275
7376 vm_tests_smoke :
7477 if : inputs.run_vm_tests && github.event_name != 'merge_group'
@@ -80,10 +83,10 @@ jobs:
8083 - uses : DeterminateSystems/flakehub-cache-action@main
8184 - run : |
8285 nix build -L \
83- . #hydraJobs.tests.functional_user \
84- . #hydraJobs.tests.githubFlakes \
85- . #hydraJobs.tests.nix-docker \
86- . #hydraJobs.tests.tarballFlakes \
86+ ${{ inputs.flake }} #hydraJobs.tests.functional_user \
87+ ${{ inputs.flake }} #hydraJobs.tests.githubFlakes \
88+ ${{ inputs.flake }} #hydraJobs.tests.nix-docker \
89+ ${{ inputs.flake }} #hydraJobs.tests.tarballFlakes \
8790 ;
8891
8992 vm_tests_all :
@@ -102,7 +105,7 @@ jobs:
102105 .hydraJobs.tests
103106 | with_entries(select(.value.type == "derivation"))
104107 | keys[]
105- | ". #hydraJobs.tests." + .')
108+ | "${{ inputs.flake }} #hydraJobs.tests." + .')
106109 }
107110
108111 if ! cmd; then
@@ -167,7 +170,7 @@ jobs:
167170 mkdir -p "${NSC_CACHE_PATH}/nix/xdg-cache"
168171 export XDG_CACHE_HOME="${NSC_CACHE_PATH}/nix/xdg-cache"
169172 fi
170- nix build -L --out-link ./new-nix
173+ nix build ${{ inputs.flake }} -L --out-link ./new-nix
171174 export PATH=$(pwd)/new-nix/bin:$PATH
172175 [[ $(type -p nix) = $(pwd)/new-nix/bin/nix ]]
173176
@@ -199,7 +202,7 @@ jobs:
199202 - uses : DeterminateSystems/flakehub-cache-action@main
200203 - name : Build manual
201204 if : inputs.system == 'x86_64-linux'
202- run : nix build . #hydraJobs.manual
205+ run : nix build ${{ inputs.flake }} #hydraJobs.manual
203206204207 if : inputs.publish_manual && inputs.system == 'x86_64-linux'
205208 with :
0 commit comments