From f90c30a761306393cbc4255fb2a1a5a1ff470587 Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Wed, 8 Jul 2026 22:49:35 +0200 Subject: [PATCH] update script for ambuild --- nix/sourcemod/ambuild.nix | 15 ++++++++++++--- update-all.nu | 13 +++++++------ 2 files changed, 19 insertions(+), 9 deletions(-) diff --git a/nix/sourcemod/ambuild.nix b/nix/sourcemod/ambuild.nix index c91ba75..5c204f0 100644 --- a/nix/sourcemod/ambuild.nix +++ b/nix/sourcemod/ambuild.nix @@ -3,16 +3,17 @@ buildPythonPackage, fetchFromGitHub, setuptools, + nix-update-script, }: buildPythonPackage rec { pname = "ambuild"; - version = "2.2.3-dev"; + version = "2.2-unstable-2026-06-06"; src = fetchFromGitHub { owner = "alliedmodders"; repo = pname; - rev = "341e8be03aad91b7b81774fdcd7ffa1f34452552"; - hash = "sha256-ZDDeFzWvVSnovr6rDZOk+7BdzyUGe+7yEwE0cecsNps="; + rev = "d89ec91a7ac2607da07b50bb62346f9a10e9a998"; + hash = "sha256-AO9n+YaVaV9h2JNeaNKlLLPdXyA6HwQpcHCt0UCVIII="; }; pyproject = true; @@ -20,6 +21,14 @@ buildPythonPackage rec { doCheck = false; + passthru = { + updateScript = nix-update-script { + extraArgs = [ + "--flake" + ]; + }; + }; + meta = with lib; { homepage = "https://github.com/alliedmodders/ambuild"; description = "AMBuild is a lightweight build system designed for performance and accuracy"; diff --git a/update-all.nu b/update-all.nu index 6010f4e..54e9a16 100755 --- a/update-all.nu +++ b/update-all.nu @@ -1,9 +1,13 @@ #! /usr/bin/env nu def main [] { - update_metamod + nix-update --flake --version=branch --build ambuild + + nix-update --flake --version=$"(get_metamod_version)" metamod-source + nom build .#metamods.x86_64-linux.tf2 nix-update --flake --use-update-script sourcemod + nom build .#sourcemods.x86_64-linux.tf2 let sdks = open nix/sourcemod/hl2sdks.json | columns $sdks | each {|sdk| update_sdk $sdk} @@ -20,12 +24,9 @@ def update_sdk [sdk: string] { nix build .#sourcemods.x86_64-linux.tf2 } -def update_metamod [] { +def get_metamod_version [] { let html = http get https://www.metamodsource.net/downloads.php/?branch=stable let branch = $html | query web --query h3 | first | first | parse --regex "from (?P[0-9.]+) Branch" | get branch | first let build = $html | query web --as-table [Build] | get Build | first - print $"Updating metamod-source to ($branch).0.($build)" - nix-update --flake --version=$"($branch).0.($build)" metamod-source - - nom build .#metamods.x86_64-linux.tf2 + $"($branch).0.($build)" }