From 1451a58a57e1bd1592460268bdde30cf72923010 Mon Sep 17 00:00:00 2001 From: Morgan Jones Date: Sun, 2 Jun 2024 23:34:48 -0700 Subject: [PATCH] mattermost: fix version-regex and support webapp update The version-regex was incorrect, and we need to update the Mattermost webapp in tandem with the git repository. nix-update-script looks at the `offlineCache` attribute for yarn apps. Bit of a hack, but this lets nix-update pull the webapp at the same time it pulls the git repository and go module hash. --- pkgs/servers/mattermost/default.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkgs/servers/mattermost/default.nix b/pkgs/servers/mattermost/default.nix index 12be474fa5ae..786b0e294739 100644 --- a/pkgs/servers/mattermost/default.nix +++ b/pkgs/servers/mattermost/default.nix @@ -37,6 +37,10 @@ buildGoModule rec { hash = "sha256-ZlvO/7kdMopIHBDdFp6wSQCR+NobGdDC6PcVd1iG16E="; }; + # Makes nix-update-script pick up the fetchurl for the webapp. + # https://github.com/Mic92/nix-update/blob/1.3.1/nix_update/eval.py#L179 + offlineCache = webapp; + vendorHash = "sha256-TJCtgNf56A1U0EbV5gXjTro+YudVBRWiSZoBC3nJxnE="; modRoot = "./server"; @@ -69,7 +73,7 @@ buildGoModule rec { passthru = { updateScript = nix-update-script { - extraArgs = [ "--version-regex" "v(9\.5\.[0-9]+)" ]; + extraArgs = [ "--version-regex" "^v(9\.5\.[0-9]+)$" ]; }; tests.mattermost = nixosTests.mattermost; };