haccfiles/pkgs/mattermost/default.nix

53 lines
1.2 KiB
Nix
Raw Normal View History

2022-11-26 15:02:57 +00:00
{ stdenv, fetchurl, fetchFromGitHub, buildGo118Module, buildEnv, lib, sources }:
let
2023-09-06 15:02:46 +00:00
version = "7.8.10";
2022-11-26 15:02:57 +00:00
mattermost-server = buildGo118Module rec {
pname = "mattermost-server";
inherit version;
src = sources.mattermost-server.outPath;
2023-05-19 21:06:15 +00:00
vendorSha256 = "sha256-VvGLYOESyoBpFmIibHWxazliHcscMxf3KcQ46NQ4syk=";
2022-11-26 15:02:57 +00:00
subPackages = [ "cmd/mattermost" ];
ldflags = [
2022-11-26 15:02:57 +00:00
"-s"
"-w"
"-X github.com/mattermost/mattermost-server/model.BuildNumber=nixpkgs-${version}"
];
};
mattermost-webapp = stdenv.mkDerivation {
pname = "mattermost-webapp";
inherit version;
src = sources.mattermost-webapp;
installPhase = ''
mkdir -p $out
cp -r client $out
cp -r i18n $out
cp -r fonts $out
cp -r templates $out
cp -r config $out
'';
};
in
buildEnv {
name = "mattermost-${version}";
paths = [ mattermost-server mattermost-webapp ];
meta = with 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;
};
}