diff --git a/nix/sourcemod/plugins/steamworks.nix b/nix/sourcemod/plugins/steamworks.nix index 34930e3..122a13b 100644 --- a/nix/sourcemod/plugins/steamworks.nix +++ b/nix/sourcemod/plugins/steamworks.nix @@ -1,6 +1,7 @@ { fetchurl, stdenvNoCC, + nix-update-script, }: stdenvNoCC.mkDerivation (finalAttrs: { pname = "sourcemod-plugin-steamworks"; @@ -18,4 +19,13 @@ stdenvNoCC.mkDerivation (finalAttrs: { runHook postInstall ''; + + passthru = { + updateScript = nix-update-script { + extraArgs = [ + "--flake" + "--version=1.2.3c" # https://github.com/Mic92/nix-update/issues/435 + ]; + }; + }; }) diff --git a/update-all.nu b/update-all.nu index 6958038..05a1001 100755 --- a/update-all.nu +++ b/update-all.nu @@ -1,7 +1,7 @@ #! /usr/bin/env nu def main [] { - update_all_depots + # update_all_depots # nix-update --flake --use-update-script 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-includes + list_plugins | each {|plugin| nix-update --flake --use-update-script $"sourcemod-plugin-($plugin)"} + nix fmt } @@ -93,3 +95,7 @@ def get_manifest_hash [manifest: record] { def extract_hash [] { parse -r "got: (?Psha256-[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 +}