mirror of
https://codeberg.org/spire/nix.git
synced 2026-11-30 19:30:46 +01:00
nix wrapper for update script
This commit is contained in:
parent
e18cde41b1
commit
fec9876ae0
3 changed files with 18 additions and 1 deletions
|
|
@ -33,7 +33,7 @@ jobs:
|
||||||
- name: Update group ${{ inputs.group }}
|
- name: Update group ${{ inputs.group }}
|
||||||
if: inputs.group != ''
|
if: inputs.group != ''
|
||||||
run: |
|
run: |
|
||||||
./update.nu ${{ inputs.group }}
|
nix run .#update -- ${{ inputs.group }}
|
||||||
|
|
||||||
- id: check_changed
|
- id: check_changed
|
||||||
name: Check any file has changed
|
name: Check any file has changed
|
||||||
|
|
|
||||||
14
flake.nix
14
flake.nix
|
|
@ -113,6 +113,20 @@
|
||||||
sourcemod-includes
|
sourcemod-includes
|
||||||
sourcemod-addon-socket
|
sourcemod-addon-socket
|
||||||
]);
|
]);
|
||||||
|
update = pkgs:
|
||||||
|
pkgs.writeShellApplication {
|
||||||
|
name = "update";
|
||||||
|
runtimeInputs = with pkgs; lib.optionals (stdenv.system == "x86_64-linux") [nushell depotdownloader];
|
||||||
|
checkPhase = "";
|
||||||
|
text =
|
||||||
|
if (pkgs.stdenv.system == "x86_64-linux")
|
||||||
|
then ''
|
||||||
|
nu ${./update.nu} "$@"
|
||||||
|
''
|
||||||
|
else ''
|
||||||
|
echo "Update script only supports x86_64-linux"
|
||||||
|
'';
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
checks = {
|
checks = {
|
||||||
|
|
|
||||||
|
|
@ -16,6 +16,9 @@ def main [what: string = "all"] {
|
||||||
"addons" => update_addons,
|
"addons" => update_addons,
|
||||||
"includes" => update_includes,
|
"includes" => update_includes,
|
||||||
"plugins" => update_plugins,
|
"plugins" => update_plugins,
|
||||||
|
_ => {
|
||||||
|
print $"Unknown argument ($what)"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
nix fmt
|
nix fmt
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue