mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-15 02:03:01 +00:00
51 lines
1.3 KiB
Nix
51 lines
1.3 KiB
Nix
{ lib
|
|
, buildGoModule
|
|
, fetchFromGitHub
|
|
, fetchurl
|
|
, nixosTests
|
|
}:
|
|
|
|
buildGoModule rec {
|
|
pname = "mattermost";
|
|
version = "7.4.0";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "mattermost";
|
|
repo = "mattermost-server";
|
|
rev = "v${version}";
|
|
sha256 = "sha256-GgspsSzfr1DKcSaLO6tDguCTQlK1c9SuTzRZmTvoNG4=";
|
|
};
|
|
|
|
webapp = fetchurl {
|
|
url = "https://releases.mattermost.com/${version}/mattermost-${version}-linux-amd64.tar.gz";
|
|
sha256 = "sha256-N4wvgrTmg1J06IPmpLlPHOHNNB+bH2BBQgEsv9GWCN0=";
|
|
};
|
|
|
|
vendorSha256 = "sha256-qZQXNVbJZDddVE+xk6F8XJCEg5dhhuXz68wcn2Uvmxk=";
|
|
|
|
subPackages = [ "cmd/mattermost" ];
|
|
|
|
ldflags = [
|
|
"-s"
|
|
"-w"
|
|
"-X github.com/mattermost/mattermost-server/v6/model.Version=${version}"
|
|
];
|
|
|
|
postInstall = ''
|
|
tar --strip 1 --directory $out -xf $webapp \
|
|
mattermost/{client,i18n,fonts,templates,config}
|
|
|
|
# For some reason a bunch of these files are executable
|
|
find $out/{client,i18n,fonts,templates,config} -type f -exec chmod -x {} \;
|
|
'';
|
|
|
|
passthru.tests.mattermost = nixosTests.mattermost;
|
|
|
|
meta = with lib; {
|
|
description = "Mattermost is an open source platform for secure collaboration across the entire software development lifecycle";
|
|
homepage = "https://www.mattermost.org";
|
|
license = with licenses; [ agpl3 asl20 ];
|
|
maintainers = with maintainers; [ ryantm numinit kranzes ];
|
|
};
|
|
}
|