Merge branch 'mattermost-upgrade'
This commit is contained in:
commit
5b37fde996
3 changed files with 63 additions and 2 deletions
|
@ -55,6 +55,7 @@
|
|||
EnableSVGs = true;
|
||||
EnableLaTeX = true;
|
||||
ThreadAutoFollow = true;
|
||||
EnableSecurityFixAlert = false;
|
||||
};
|
||||
TeamSettings = {
|
||||
EnableTeamCreation = true;
|
||||
|
@ -67,8 +68,8 @@
|
|||
LogSettings = {
|
||||
EnableConsole = true;
|
||||
ConsoleLevel = "ERROR";
|
||||
EnableDiagnostics = true;
|
||||
EnableWebhookDebugging = true;
|
||||
EnableDiagnostics = false;
|
||||
EnableWebhookDebugging = false;
|
||||
};
|
||||
NotificationLogSettings = {
|
||||
EnableConsole = true;
|
||||
|
|
|
@ -40,6 +40,8 @@ let
|
|||
'';
|
||||
});
|
||||
|
||||
mattermost = callPackage ./mattermost {};
|
||||
|
||||
inherit (unstable) bottom;
|
||||
};
|
||||
|
||||
|
|
58
pkgs/mattermost/default.nix
Normal file
58
pkgs/mattermost/default.nix
Normal file
|
@ -0,0 +1,58 @@
|
|||
{ stdenv, fetchurl, fetchFromGitHub, buildGoPackage, buildEnv }:
|
||||
|
||||
let
|
||||
version = "5.30.3";
|
||||
|
||||
mattermost-server = buildGoPackage rec {
|
||||
pname = "mattermost-server";
|
||||
inherit version;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "mattermost";
|
||||
repo = "mattermost-server";
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-cqP2gHv3v49EsAp0xVteKeSRSknchclmUV+9d8WN/18=";
|
||||
};
|
||||
|
||||
goPackagePath = "github.com/mattermost/mattermost-server";
|
||||
|
||||
buildFlagsArray = ''
|
||||
-ldflags=
|
||||
-X ${goPackagePath}/model.BuildNumber=nixpkgs-${version}
|
||||
'';
|
||||
|
||||
};
|
||||
|
||||
mattermost-webapp = stdenv.mkDerivation {
|
||||
pname = "mattermost-webapp";
|
||||
inherit version;
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://releases.mattermost.com/${version}/mattermost-${version}-linux-amd64.tar.gz";
|
||||
sha256 = "sha256-ZQKwHZZtyhJEPk05eGZlHSNiQTc/LD+2+4zjfvE278A=";
|
||||
};
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out
|
||||
tar --strip 1 --directory $out -xf $src \
|
||||
mattermost/client \
|
||||
mattermost/i18n \
|
||||
mattermost/fonts \
|
||||
mattermost/templates \
|
||||
mattermost/config
|
||||
'';
|
||||
};
|
||||
|
||||
in
|
||||
buildEnv {
|
||||
name = "mattermost-${version}";
|
||||
paths = [ mattermost-server mattermost-webapp ];
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
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;
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue