mirror of
https://github.com/nix-community/nixvim.git
synced 2025-07-09 00:34:34 +02:00
ci/version-info: create temp files in a temp directory
Some checks are pending
Publish every Git push to main to FlakeHub / flakehub-publish (push) Waiting to run
Publish every git push to Flakestry / publish-flake (push) Waiting to run
Documentation / Version info (push) Waiting to run
Documentation / Build (push) Blocked by required conditions
Documentation / Combine builds (push) Blocked by required conditions
Documentation / Deploy (push) Blocked by required conditions
Some checks are pending
Publish every Git push to main to FlakeHub / flakehub-publish (push) Waiting to run
Publish every git push to Flakestry / publish-flake (push) Waiting to run
Documentation / Version info (push) Waiting to run
Documentation / Build (push) Blocked by required conditions
Documentation / Combine builds (push) Blocked by required conditions
Documentation / Deploy (push) Blocked by required conditions
Avoid polluting the repo with temporary `channels.{nix,json,toml}` files. Write them to a temporary working directory instead.
This commit is contained in:
parent
2369b7fc4f
commit
bc997a2409
1 changed files with 19 additions and 12 deletions
|
@ -20,6 +20,10 @@ writeShellApplication {
|
||||||
};
|
};
|
||||||
|
|
||||||
text = ''
|
text = ''
|
||||||
|
work=$(mktemp -d)
|
||||||
|
(
|
||||||
|
cd "$work"
|
||||||
|
|
||||||
# Download channel info from NixOS/infra
|
# Download channel info from NixOS/infra
|
||||||
curl ${channelsURL} | nix eval --file - --json > channels.json
|
curl ${channelsURL} | nix eval --file - --json > channels.json
|
||||||
|
|
||||||
|
@ -29,15 +33,18 @@ writeShellApplication {
|
||||||
--argstr system ${stdenv.hostPlatform.system} \
|
--argstr system ${stdenv.hostPlatform.system} \
|
||||||
--arg-from-file channelsJSON channels.json \
|
--arg-from-file channelsJSON channels.json \
|
||||||
--out-link channels.toml
|
--out-link channels.toml
|
||||||
|
)
|
||||||
|
|
||||||
(
|
{
|
||||||
echo "# DO NOT MODIFY!"
|
echo "# DO NOT MODIFY!"
|
||||||
echo "# This file was generated by ${
|
echo "# This file was generated by ${
|
||||||
lib.strings.removePrefix (toString ../.. + "/") (toString ./default.nix)
|
lib.strings.removePrefix (toString ../.. + "/") (toString ./default.nix)
|
||||||
}"
|
}"
|
||||||
cat ${mainInfo}
|
cat ${mainInfo}
|
||||||
echo
|
echo
|
||||||
cat channels.toml
|
cat "$work/channels.toml"
|
||||||
) > version-info.toml
|
} > version-info.toml
|
||||||
|
|
||||||
|
rm -rf "$work"
|
||||||
'';
|
'';
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue