2021-03-25 13:59:59 +00:00
|
|
|
{ stdenv, fetchurl, fetchFromGitHub, buildGoPackage, buildEnv }:
|
|
|
|
|
|
|
|
let
|
2021-04-28 20:24:35 +00:00
|
|
|
sources = import ../../nix/sources.nix;
|
|
|
|
version = sources.mattermost-webapp.version;
|
2021-03-25 13:59:59 +00:00
|
|
|
|
|
|
|
mattermost-server = buildGoPackage rec {
|
|
|
|
pname = "mattermost-server";
|
|
|
|
inherit version;
|
|
|
|
|
2021-04-28 20:24:35 +00:00
|
|
|
src = sources.mattermost-server.outPath;
|
2021-03-25 13:59:59 +00:00
|
|
|
|
|
|
|
goPackagePath = "github.com/mattermost/mattermost-server";
|
|
|
|
|
|
|
|
buildFlagsArray = ''
|
|
|
|
-ldflags=
|
|
|
|
-X ${goPackagePath}/model.BuildNumber=nixpkgs-${version}
|
|
|
|
'';
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
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 ];
|
|
|
|
|
|
|
|
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;
|
|
|
|
};
|
|
|
|
}
|