Merge pull request #31296 from ryantm/mattermost43

mattermost, nixos/mattermost: update to 4.3.0
This commit is contained in:
Jörg Thalheim 2017-11-08 17:45:42 +00:00 committed by GitHub
commit 999bcd098d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 29 additions and 14 deletions

View File

@ -173,7 +173,7 @@ in
preStart = '' preStart = ''
mkdir -p ${cfg.statePath}/{data,config,logs} mkdir -p ${cfg.statePath}/{data,config,logs}
ln -sf ${pkgs.mattermost}/{bin,fonts,i18n,templates,webapp} ${cfg.statePath} ln -sf ${pkgs.mattermost}/{bin,fonts,i18n,templates,client} ${cfg.statePath}
'' + lib.optionalString (!cfg.mutableConfig) '' '' + lib.optionalString (!cfg.mutableConfig) ''
ln -sf ${mattermostConfJSON} ${cfg.statePath}/config/config.json ln -sf ${mattermostConfJSON} ${cfg.statePath}/config/config.json
'' + lib.optionalString cfg.mutableConfig '' '' + lib.optionalString cfg.mutableConfig ''

View File

@ -1,22 +1,37 @@
{ stdenv, fetchurl }: { stdenv, fetchurl, fetchFromGitHub, buildGoPackage }:
stdenv.mkDerivation rec { buildGoPackage rec {
name = "mattermost-${version}"; name = "mattermost-${version}";
version = "4.1.0"; version = "4.3.0";
src = fetchurl { src = fetchFromGitHub {
url = "https://releases.mattermost.com/${version}/mattermost-team-${version}-linux-amd64.tar.gz"; owner = "mattermost";
sha256 = "0bp56i108pxsqcswxy1hdz3d8wq83lc29wcq6npimwx566rx4xhf"; repo = "mattermost-server";
rev = "v${version}";
sha256 = "05119h3x81p8plfjq99khfywc3plv2zynvf83vkhj48zqk61wvbq";
}; };
installPhase = '' webApp = fetchurl {
mkdir -p $out url = "https://releases.mattermost.com/${version}/mattermost-team-${version}-linux-amd64.tar.gz";
mv * $out/ sha256 = "0d30zj036nz6vwpiv0mn656j5r4br6y4x8iqc5jn785fiwk2pdls";
ln -s ./platform $out/bin/mattermost-platform };
goPackagePath = "github.com/mattermost/mattermost-server";
buildPhase = ''
runHook preBuild
cd go/src/${goPackagePath}/cmd/platform
go install
runHook postBuild
''; '';
postFixup = '' preInstall = ''
patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" $out/bin/platform mkdir -p $bin
tar --strip 1 -C $bin -xf $webApp
'';
postInstall = ''
ln -s $bin/bin/platform $bin/bin/mattermost-platform
''; '';
meta = with stdenv.lib; { meta = with stdenv.lib; {
@ -24,6 +39,6 @@ stdenv.mkDerivation rec {
homepage = https://www.mattermost.org; homepage = https://www.mattermost.org;
license = with licenses; [ agpl3 asl20 ]; license = with licenses; [ agpl3 asl20 ];
maintainers = with maintainers; [ fpletz ]; maintainers = with maintainers; [ fpletz ];
platforms = [ "x86_64-linux" ]; platforms = platforms.unix;
}; };
} }