update all plugins with script

This commit is contained in:
Robin Appelman 2026-07-09 19:33:45 +02:00
commit efc66e4155
2 changed files with 17 additions and 1 deletions

View file

@ -1,6 +1,7 @@
{ {
fetchurl, fetchurl,
stdenvNoCC, stdenvNoCC,
nix-update-script,
}: }:
stdenvNoCC.mkDerivation (finalAttrs: { stdenvNoCC.mkDerivation (finalAttrs: {
pname = "sourcemod-plugin-steamworks"; pname = "sourcemod-plugin-steamworks";
@ -18,4 +19,13 @@ stdenvNoCC.mkDerivation (finalAttrs: {
runHook postInstall runHook postInstall
''; '';
passthru = {
updateScript = nix-update-script {
extraArgs = [
"--flake"
"--version=1.2.3c" # https://github.com/Mic92/nix-update/issues/435
];
};
};
}) })

View file

@ -1,7 +1,7 @@
#! /usr/bin/env nu #! /usr/bin/env nu
def main [] { def main [] {
update_all_depots # update_all_depots
# nix-update --flake --use-update-script ambuild # nix-update --flake --use-update-script ambuild
# nix build .#ambuild # nix build .#ambuild
@ -20,6 +20,8 @@ def main [] {
# nix-update --flake --use-update-script sourcemod-include-steamworks # nix-update --flake --use-update-script sourcemod-include-steamworks
# nix-update --flake --use-update-script sourcemod-includes # nix-update --flake --use-update-script sourcemod-includes
list_plugins | each {|plugin| nix-update --flake --use-update-script $"sourcemod-plugin-($plugin)"}
nix fmt nix fmt
} }
@ -93,3 +95,7 @@ def get_manifest_hash [manifest: record] {
def extract_hash [] { def extract_hash [] {
parse -r "got: (?P<hash>sha256-[A-Za-z0-9+\/=]+)" | first | get 'hash' parse -r "got: (?P<hash>sha256-[A-Za-z0-9+\/=]+)" | first | get 'hash'
} }
def list_plugins [] {
ls -s nix/sourcemod/plugins/ | where type == file and ($it.name | str ends-with '.nix') and ($it.name != 'overlay.nix') | get name | str substring 0..-5
}