2023-10-07 20:27:23 +00:00
|
|
|
{ stdenv, fetchurl, fetchFromGitHub, buildGoModule, buildEnv, lib, sources }:
|
2021-03-25 13:59:59 +00:00
|
|
|
|
|
|
|
let
|
2024-01-18 23:58:12 +00:00
|
|
|
version = "8.1.8";
|
2021-03-25 13:59:59 +00:00
|
|
|
|
2023-10-07 20:27:23 +00:00
|
|
|
mattermost-server = buildGoModule rec {
|
2021-03-25 13:59:59 +00:00
|
|
|
pname = "mattermost-server";
|
|
|
|
inherit version;
|
|
|
|
|
2023-10-07 20:27:23 +00:00
|
|
|
src = "${sources.mattermost-server}/server";
|
2021-03-25 13:59:59 +00:00
|
|
|
|
2024-01-18 23:58:12 +00:00
|
|
|
vendorHash = "sha256-a2C+q24+UI0ZgSVI2JcsVDcNaSDLa4yckYqRVxbAl8M=";
|
2022-11-26 15:02:57 +00:00
|
|
|
|
|
|
|
subPackages = [ "cmd/mattermost" ];
|
2021-03-25 13:59:59 +00:00
|
|
|
|
2021-12-01 11:22:20 +00:00
|
|
|
ldflags = [
|
2023-10-07 20:27:23 +00:00
|
|
|
"-s"
|
|
|
|
"-w"
|
|
|
|
"-X github.com/mattermost/mattermost/server/public/model.Version=${version}"
|
|
|
|
"-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.BuildEnterpriseReady=false"
|
2021-12-01 11:22:20 +00:00
|
|
|
];
|
2021-03-25 13:59:59 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
mattermost-webapp = stdenv.mkDerivation {
|
|
|
|
pname = "mattermost-webapp";
|
|
|
|
inherit version;
|
|
|
|
|
2021-04-28 20:24:35 +00:00
|
|
|
src = sources.mattermost-webapp;
|
2021-03-25 13:59:59 +00:00
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out
|
2021-04-28 20:24:35 +00:00
|
|
|
cp -r client $out
|
|
|
|
cp -r i18n $out
|
|
|
|
cp -r fonts $out
|
|
|
|
cp -r templates $out
|
|
|
|
cp -r config $out
|
2021-03-25 13:59:59 +00:00
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
|
|
|
in
|
|
|
|
buildEnv {
|
|
|
|
name = "mattermost-${version}";
|
|
|
|
paths = [ mattermost-server mattermost-webapp ];
|
|
|
|
|
2021-11-19 18:53:06 +00:00
|
|
|
meta = with lib; {
|
2021-03-25 13:59:59 +00:00
|
|
|
description = "Open-source, self-hosted Slack-alternative";
|
|
|
|
homepage = "https://www.mattermost.org";
|
|
|
|
license = with licenses; [ agpl3 asl20 ];
|
|
|
|
maintainers = with maintainers; [ fpletz ryantm ];
|
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
}
|