nix wrapper for update script

This commit is contained in:
Robin Appelman 2026-11-24 14:11:43 +01:00
commit fec9876ae0
3 changed files with 18 additions and 1 deletions

View file

@ -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

View file

@ -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 = {

View file

@ -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