Given the current state of the repository, you can add this derivation
to `services.mattermost.plugins` array (but modify as needed):
.. codeblock:: nix
pkgs.buildGoModule {
name = "mattermost-plugin-unifiedpush";
src = pkgs.fetchFromSourcehut {
owner = "~thejonny";
repo = "mattermost-plugin-unifiedpush";
rev = "dc177958d1a79b3846fb99c53878e1798e11960a";
hash = "sha256-ptc2nTN06BE1H4jSkX7+UDe/Xm2ryqDp5ZevbOu/SMU=";
};
overrideModAttrs = _: {
preBuild = ''
substituteInPlace go.mod --replace 'go 1.21.1' 'go 1.21'
go mod tidy
'';
};
postBuild = ''
make
'';
installPhase = ''
cp unifiedpush.tar.gz $out
'';
vendorHash = "sha256-S0Lub8wQrpBH9ISpsdR50I/gGmSDWo6Xi5Kl8etGffs=";
};
Nix cannot parse the patch versions of go.mod files so the patch is
needed at present. go mod tidy is needed due to something about a go.sum
and resolving the Mattermost code (I don’t understand it, but it we go
from errors to working).
--
toastal ไข่ดาว | https://toast.al
PGP: 7944 74B7 D236 DAB9 C9EF E7F9 5CCE 6F14 66D4 7C9E
This could be as simple as a fetchTarball, if the CI artifacts had a tag
to attach to tho :P I’m sure this is in the works, but I want to use the
plugin now!