mirror of
https://codeberg.org/icewind/attic-action.git
synced 2026-06-03 17:44:07 +02:00
nix: only use stable commands
Avoid the following error when installing nix-unstable:
experimental Nix feature 'nix-command' is disabled; use '--experimental-features nix-command' to override
This commit is contained in:
parent
6e4751ed42
commit
9831d0f47e
4 changed files with 22 additions and 3 deletions
2
dist/main/index.js
vendored
2
dist/main/index.js
vendored
|
|
@ -1072,7 +1072,7 @@ function setup() {
|
||||||
core.exportVariable('CACHIX_SIGNING_KEY', signingKey);
|
core.exportVariable('CACHIX_SIGNING_KEY', signingKey);
|
||||||
}
|
}
|
||||||
// Remember existing store paths
|
// Remember existing store paths
|
||||||
yield exec.exec("sh", ["-c", `nix path-info --all | grep -v '\.drv$' > /tmp/store-path-pre-build`]);
|
yield exec.exec("sh", ["-c", `${__dirname}/list-nix-store.sh > /tmp/store-path-pre-build`]);
|
||||||
}
|
}
|
||||||
catch (error) {
|
catch (error) {
|
||||||
core.setFailed(`Action failed with error: ${error}`);
|
core.setFailed(`Action failed with error: ${error}`);
|
||||||
|
|
|
||||||
19
dist/main/list-nix-store.sh
vendored
Executable file
19
dist/main/list-nix-store.sh
vendored
Executable file
|
|
@ -0,0 +1,19 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
# Small utility to replace `nix path-info --all`
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
for file in /nix/store/*; do
|
||||||
|
case "$file" in
|
||||||
|
*.drv)
|
||||||
|
# Avoid .drv as they are not generally useful
|
||||||
|
continue
|
||||||
|
;;
|
||||||
|
*.check)
|
||||||
|
# Skip .check file produced by --keep-failed
|
||||||
|
continue
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "$file"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
2
dist/main/push-paths.sh
vendored
2
dist/main/push-paths.sh
vendored
|
|
@ -1,4 +1,4 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
comm -13 <(sort /tmp/store-path-pre-build) <(nix path-info --all | grep -v '\.drv$' | sort) | $1 push -j8 $2
|
comm -13 <(sort /tmp/store-path-pre-build) <("$(dirname "$0")"/list-nix-store.sh) | "$1" push -j8 "$2"
|
||||||
|
|
|
||||||
|
|
@ -45,7 +45,7 @@ async function setup() {
|
||||||
core.exportVariable('CACHIX_SIGNING_KEY', signingKey);
|
core.exportVariable('CACHIX_SIGNING_KEY', signingKey);
|
||||||
}
|
}
|
||||||
// Remember existing store paths
|
// Remember existing store paths
|
||||||
await exec.exec("sh", ["-c", `nix path-info --all | grep -v '\.drv$' > /tmp/store-path-pre-build`]);
|
await exec.exec("sh", ["-c", `${__dirname}/list-nix-store.sh > /tmp/store-path-pre-build`]);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
core.setFailed(`Action failed with error: ${error}`);
|
core.setFailed(`Action failed with error: ${error}`);
|
||||||
throw (error);
|
throw (error);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue