forked from mirrors/nixpkgs
mattermost: add build number
This commit is contained in:
parent
54371a78f4
commit
ac782ae4e0
|
@ -1,8 +1,13 @@
|
||||||
{ stdenv, fetchurl, fetchFromGitHub, buildGoPackage }:
|
{ stdenv, fetchurl, fetchFromGitHub, buildGoPackage }:
|
||||||
|
|
||||||
|
let
|
||||||
|
version = "4.7.2";
|
||||||
|
goPackagePath = "github.com/mattermost/mattermost-server";
|
||||||
|
buildFlags = "-ldflags \"-X '${goPackagePath}/model.BuildNumber=nixpkgs-${version}'\"";
|
||||||
|
in
|
||||||
|
|
||||||
buildGoPackage rec {
|
buildGoPackage rec {
|
||||||
name = "mattermost-${version}";
|
name = "mattermost-${version}";
|
||||||
version = "4.7.2";
|
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "mattermost";
|
owner = "mattermost";
|
||||||
|
@ -16,12 +21,12 @@ buildGoPackage rec {
|
||||||
sha256 = "14gr7zzx77q862qccjcdwrzd6n8g2z8yngw8aa4g3q6hypsqi4v3";
|
sha256 = "14gr7zzx77q862qccjcdwrzd6n8g2z8yngw8aa4g3q6hypsqi4v3";
|
||||||
};
|
};
|
||||||
|
|
||||||
goPackagePath = "github.com/mattermost/mattermost-server";
|
inherit goPackagePath;
|
||||||
|
|
||||||
buildPhase = ''
|
buildPhase = ''
|
||||||
runHook preBuild
|
runHook preBuild
|
||||||
cd go/src/${goPackagePath}/cmd/platform
|
cd go/src/${goPackagePath}/cmd/platform
|
||||||
go install
|
go install ${buildFlags}
|
||||||
runHook postBuild
|
runHook postBuild
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
@ -35,7 +40,7 @@ buildGoPackage rec {
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
description = "Open-Source, self-hosted Slack-alternative";
|
description = "Open-source, self-hosted Slack-alternative";
|
||||||
homepage = https://www.mattermost.org;
|
homepage = https://www.mattermost.org;
|
||||||
license = with licenses; [ agpl3 asl20 ];
|
license = with licenses; [ agpl3 asl20 ];
|
||||||
maintainers = with maintainers; [ fpletz ryantm ];
|
maintainers = with maintainers; [ fpletz ryantm ];
|
||||||
|
|
Loading…
Reference in a new issue