mirror of
https://codeberg.org/spire/nix.git
synced 2026-11-30 03:20:47 +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 }}
|
||||
if: inputs.group != ''
|
||||
run: |
|
||||
./update.nu ${{ inputs.group }}
|
||||
nix run .#update -- ${{ inputs.group }}
|
||||
|
||||
- id: check_changed
|
||||
name: Check any file has changed
|
||||
|
|
|
|||
14
flake.nix
14
flake.nix
|
|
@ -113,6 +113,20 @@
|
|||
sourcemod-includes
|
||||
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 = {
|
||||
|
|
|
|||
|
|
@ -16,6 +16,9 @@ def main [what: string = "all"] {
|
|||
"addons" => update_addons,
|
||||
"includes" => update_includes,
|
||||
"plugins" => update_plugins,
|
||||
_ => {
|
||||
print $"Unknown argument ($what)"
|
||||
}
|
||||
}
|
||||
|
||||
nix fmt
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue