From 2988939be048484745d458fe25741cfae62557a4 Mon Sep 17 00:00:00 2001 From: stuebinm Date: Fri, 16 Feb 2024 19:32:28 +0100 Subject: [PATCH] =?UTF-8?q?mattermost=208.1.9=20=E2=86=92=208.1.10=20(curs?= =?UTF-8?q?ed)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit see the comment in pkgs/mattermost.nix --- flake.lock | 16 ++++++++-------- flake.nix | 4 ++-- pkgs/mattermost.nix | 19 ++++++++++++++++--- 3 files changed, 26 insertions(+), 13 deletions(-) diff --git a/flake.lock b/flake.lock index 4c74b74..28331ea 100644 --- a/flake.lock +++ b/flake.lock @@ -257,16 +257,16 @@ "mattermost-server": { "flake": false, "locked": { - "lastModified": 1706285139, - "narHash": "sha256-7VjwJpzn0nl9QHWhqdjkhXKymutbwsagGSSZ4Si76bI=", + "lastModified": 1707502341, + "narHash": "sha256-eloO83koCNZOR/NYzUCdKOtVdF7rk+VrZ9U2bKWkxNU=", "owner": "mattermost", "repo": "mattermost-server", - "rev": "4c83724516242843802cc75840b08ead6afbd37b", + "rev": "674f549daf0e74933845be0ae32827e498137b63", "type": "github" }, "original": { "owner": "mattermost", - "ref": "v8.1.9", + "ref": "v8.1.10", "repo": "mattermost-server", "type": "github" } @@ -274,14 +274,14 @@ "mattermost-webapp": { "flake": false, "locked": { - "lastModified": 1706286055, - "narHash": "sha256-lnOz/XGGNqpJyQpWLOJ12cQpzfaZ0GfWNWwqy9spf3o=", + "lastModified": 1707771700, + "narHash": "sha256-5PYPNcUGcQmn9RgUbtv3U/s+pRB1a2CgZwxDnunuToA=", "type": "tarball", - "url": "https://releases.mattermost.com/8.1.9/mattermost-8.1.9-linux-amd64.tar.gz" + "url": "https://releases.mattermost.com/8.1.10/mattermost-8.1.10-linux-amd64.tar.gz" }, "original": { "type": "tarball", - "url": "https://releases.mattermost.com/8.1.9/mattermost-8.1.9-linux-amd64.tar.gz" + "url": "https://releases.mattermost.com/8.1.10/mattermost-8.1.10-linux-amd64.tar.gz" } }, "napalm": { diff --git a/flake.nix b/flake.nix index 28d79f4..c1d7b35 100644 --- a/flake.nix +++ b/flake.nix @@ -2,9 +2,9 @@ description = "hacc infra stuff"; inputs = { - mattermost-webapp.url = "https://releases.mattermost.com/8.1.9/mattermost-8.1.9-linux-amd64.tar.gz"; + mattermost-webapp.url = "https://releases.mattermost.com/8.1.10/mattermost-8.1.10-linux-amd64.tar.gz"; mattermost-webapp.flake = false; - mattermost-server.url = "github:mattermost/mattermost-server?ref=v8.1.9"; + mattermost-server.url = "github:mattermost/mattermost-server?ref=v8.1.10"; mattermost-server.flake = false; nixpkgs.url = "nixpkgs/nixos-23.11"; diff --git a/pkgs/mattermost.nix b/pkgs/mattermost.nix index 35bacca..ffdb52c 100644 --- a/pkgs/mattermost.nix +++ b/pkgs/mattermost.nix @@ -1,7 +1,7 @@ { stdenv, fetchurl, fetchFromGitHub, buildGoModule, buildEnv, lib, sources }: let - version = "8.1.9"; + version = "8.1.10"; mattermost-server = buildGoModule rec { pname = "mattermost-server"; @@ -9,7 +9,19 @@ let src = "${sources.mattermost-server}/server"; - vendorHash = "sha256-E5hW2/TlyE6Qnw50AQYUxOttW1FUPMCB6Ok0fQIqbUE="; + # this is a hack. with it uncommented, the dependencies as specified by the vendor + # hash can be built, but not the package itself. without it, the package itself + # can be built, but not its dependencies. Thus the only way to build this package + # for now is to run it twice, and rely on the nix store's caching + # + # this bit is cursed, and i am too tired to try and fix it now + # ~terru + + # preBuild = '' + # go mod tidy + # ''; + + vendorHash = "sha256-ZbLSxG9Gyhk7PBC2V6sMtrQNXvm+ugMfliFIHWO1VLs="; subPackages = [ "cmd/mattermost" ]; @@ -20,8 +32,9 @@ let "-X github.com/mattermost/mattermost/server/public/model.BuildNumber=${version}-haccfiles" "-X github.com/mattermost/mattermost/server/public/model.BuildDate=1970-01-01" "-X github.com/mattermost/mattermost/server/public/model.BuildHash=v${version}" - "-X github.com/mattermost/mattermost/server/public/model.BuildHashEnterprise=v${version}" + "-X github.com/mattermost/mattermost/server/public/model.BuildHashEnterprise=none" "-X github.com/mattermost/mattermost/server/public/model.BuildEnterpriseReady=false" + "-X github.com/mattermost/mattermost/server/public/model.MockCWS=false" ]; };