sources: manage mattermost with niv

also reenables mattermost
also updated to version 5.34.2
This commit is contained in:
schweby 2021-04-28 22:24:35 +02:00
parent 148741f4c3
commit ae8bf7c8f6
No known key found for this signature in database
GPG key ID: B880491D046E2F87
3 changed files with 30 additions and 18 deletions

View file

@ -19,7 +19,7 @@
./services/monitoring.nix
./services/workadventure.nix
./services/minecraft.nix
# ./services/mattermost.nix
./services/mattermost.nix
];
boot.loader.grub.enable = true;
boot.loader.grub.version = 2;

View file

@ -17,6 +17,26 @@
"url": "https://github.com/nix-community/home-manager/archive/2aa20ae969f2597c4df10a094440a66e9d7f8c86.tar.gz",
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
},
"mattermost-server": {
"branch": "release-5.31",
"description": "Open source Slack-alternative in Golang and React - Mattermost",
"homepage": "https://mattermost.com",
"owner": "mattermost",
"repo": "mattermost-server",
"rev": "7d89f8bc6ef757877572ef12f3c3c018858318d6",
"sha256": "18ip32asar8c34zhnf29v3a66a433443pz7rxa2f4vnp0ri1jil6",
"type": "tarball",
"url": "https://github.com/mattermost/mattermost-server/archive/7d89f8bc6ef757877572ef12f3c3c018858318d6.tar.gz",
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz",
"version": "5.34.2"
},
"mattermost-webapp": {
"sha256": "1a1z3p166bs7ygnnbhm8b556wxmljnk2sj4q527jpr437f02fl6z",
"type": "tarball",
"url": "https://releases.mattermost.com/5.34.2/mattermost-5.34.2-linux-amd64.tar.gz",
"url_template": "https://releases.mattermost.com/<version>/mattermost-<version>-linux-amd64.tar.gz",
"version": "5.34.2"
},
"mumble-website": {
"branch": "master",
"repo": "https://gitlab.infra4future.de/hacc/infra4future/mumble.infra4future.de.git",

View file

@ -1,18 +1,14 @@
{ stdenv, fetchurl, fetchFromGitHub, buildGoPackage, buildEnv }:
let
version = "5.30.3";
sources = import ../../nix/sources.nix;
version = sources.mattermost-webapp.version;
mattermost-server = buildGoPackage rec {
pname = "mattermost-server";
inherit version;
src = fetchFromGitHub {
owner = "mattermost";
repo = "mattermost-server";
rev = "v${version}";
sha256 = "sha256-cqP2gHv3v49EsAp0xVteKeSRSknchclmUV+9d8WN/18=";
};
src = sources.mattermost-server.outPath;
goPackagePath = "github.com/mattermost/mattermost-server";
@ -27,19 +23,15 @@ let
pname = "mattermost-webapp";
inherit version;
src = fetchurl {
url = "https://releases.mattermost.com/${version}/mattermost-${version}-linux-amd64.tar.gz";
sha256 = "sha256-ZQKwHZZtyhJEPk05eGZlHSNiQTc/LD+2+4zjfvE278A=";
};
src = sources.mattermost-webapp;
installPhase = ''
mkdir -p $out
tar --strip 1 --directory $out -xf $src \
mattermost/client \
mattermost/i18n \
mattermost/fonts \
mattermost/templates \
mattermost/config
cp -r client $out
cp -r i18n $out
cp -r fonts $out
cp -r templates $out
cp -r config $out
'';
};