stuebinm
c09337c973
this replaces niv with nix flakes, attempting to preserve the old structure as much as possible. Notable caveats: - I'm not sure if flake inputs expose version information anywhere, so the version in pkgs/mattermost/default.nix is now hardcoded. Confusingly, this appears to trigger a rebuild. Maybe I've missed something. - a lot of the old-style host.nix & deploy.nix machinery in nix-hexchen does not work with flakes, and their newer replacements are not exposed by upstream; I've put basic imitations of the relevant parts in this repo - (in particular, directories in hosts/ won't become deployable configs automatically) - parts of the code are now probably more complicated than they'd have to be - old variables names were preserved; confusingly, this means the flake inputs are still called "sources"
48 lines
1.1 KiB
Nix
48 lines
1.1 KiB
Nix
{ stdenv, fetchurl, fetchFromGitHub, buildGoPackage, buildEnv, lib, sources }:
|
|
|
|
let
|
|
version = "6.7.2";
|
|
|
|
mattermost-server = buildGoPackage rec {
|
|
pname = "mattermost-server";
|
|
inherit version;
|
|
|
|
src = sources.mattermost-server.outPath;
|
|
|
|
goPackagePath = "github.com/mattermost/mattermost-server";
|
|
|
|
ldflags = [
|
|
"-X ${goPackagePath}/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;
|
|
};
|
|
}
|