forked from hacc/haccfiles
mattermost: remove flake inputs, copy nixpkgs package
this copies the current mattermost package definition from upstream nixpkgs into our repo as-is (that definition itself being a modified version of our definition that I upstreamed recently). Since apparently no one else is maintaining the nixpkgs package and I am apparently maintaining a mattermost package mostly on my own anyways, this should make upstreaming future changes easier.
This commit is contained in:
parent
8f7f5448a3
commit
8283162109
4 changed files with 15 additions and 43 deletions
32
flake.lock
32
flake.lock
|
@ -54,36 +54,6 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"mattermost-server": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1709319070,
|
||||
"narHash": "sha256-NYP0mhON+TCvNTSx4I4hddFGF9TWtnMAwyJvX8sEdWU=",
|
||||
"owner": "mattermost",
|
||||
"repo": "mattermost",
|
||||
"rev": "9a5b3d30495cb878328cf459850e334b592b3ab8",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "mattermost",
|
||||
"ref": "v9.5.2",
|
||||
"repo": "mattermost",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"mattermost-webapp": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1709319782,
|
||||
"narHash": "sha256-F7WzEe+3pEK8FyB3T58cJo8uB2zFZg6tZsmrUE1ZqzA=",
|
||||
"type": "tarball",
|
||||
"url": "https://releases.mattermost.com/9.5.2/mattermost-9.5.2-linux-amd64.tar.gz"
|
||||
},
|
||||
"original": {
|
||||
"type": "tarball",
|
||||
"url": "https://releases.mattermost.com/9.5.2/mattermost-9.5.2-linux-amd64.tar.gz"
|
||||
}
|
||||
},
|
||||
"nixos-mailserver": {
|
||||
"inputs": {
|
||||
"blobs": "blobs",
|
||||
|
@ -211,8 +181,6 @@
|
|||
"root": {
|
||||
"inputs": {
|
||||
"deploy-rs": "deploy-rs",
|
||||
"mattermost-server": "mattermost-server",
|
||||
"mattermost-webapp": "mattermost-webapp",
|
||||
"nixos-mailserver": "nixos-mailserver",
|
||||
"nixpkgs": "nixpkgs_2",
|
||||
"nixpkgs-oldstable": "nixpkgs-oldstable",
|
||||
|
|
|
@ -2,11 +2,6 @@
|
|||
description = "hacc infra stuff";
|
||||
|
||||
inputs = {
|
||||
mattermost-webapp.url = "https://releases.mattermost.com/9.5.2/mattermost-9.5.2-linux-amd64.tar.gz";
|
||||
mattermost-webapp.flake = false;
|
||||
mattermost-server.url = "github:mattermost/mattermost?ref=v9.5.2";
|
||||
mattermost-server.flake = false;
|
||||
|
||||
nixpkgs.url = "nixpkgs/nixos-23.11";
|
||||
nixpkgs-unstable.url = "nixpkgs/nixos-unstable";
|
||||
nixpkgs-oldstable.url = "github:/NixOS/nixpkgs?rev=c4aec3c021620d98861639946123214207e98344";
|
||||
|
|
|
@ -10,7 +10,6 @@ let
|
|||
newpkgs = {
|
||||
|
||||
mattermost = callPackage ./mattermost.nix {
|
||||
inherit sources;
|
||||
buildGoModule = unstable.buildGo122Module;
|
||||
};
|
||||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
{ lib
|
||||
, sources
|
||||
, buildGoModule
|
||||
, fetchFromGitHub
|
||||
, nix-update-script
|
||||
|
@ -15,8 +14,12 @@ buildGoModule rec {
|
|||
# the version regex in passthru.updateScript as well.
|
||||
version = "9.5.2";
|
||||
|
||||
src = sources.mattermost-server;
|
||||
webapp = sources.mattermost-webapp;
|
||||
src = fetchFromGitHub {
|
||||
owner = "mattermost";
|
||||
repo = "mattermost";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-NYP0mhON+TCvNTSx4I4hddFGF9TWtnMAwyJvX8sEdWU=";
|
||||
};
|
||||
|
||||
# Needed because buildGoModule does not support go workspaces yet.
|
||||
# We use go 1.22's workspace vendor command, which is not yet available
|
||||
|
@ -29,6 +32,11 @@ buildGoModule rec {
|
|||
'';
|
||||
});
|
||||
|
||||
webapp = fetchurl {
|
||||
url = "https://releases.mattermost.com/${version}/mattermost-${version}-linux-amd64.tar.gz";
|
||||
hash = "sha256-ogiowbNYHo9NTQLAg1OKXp8pV1Zn7kPcZR9ukaKvpKA=";
|
||||
};
|
||||
|
||||
vendorHash = "sha256-TJCtgNf56A1U0EbV5gXjTro+YudVBRWiSZoBC3nJxnE=";
|
||||
|
||||
modRoot = "./server";
|
||||
|
@ -36,7 +44,7 @@ buildGoModule rec {
|
|||
make setup-go-work
|
||||
'';
|
||||
|
||||
subPackages = [ "cmd/mattermost" "cmd/mmctl" ];
|
||||
subPackages = [ "cmd/mattermost" ];
|
||||
|
||||
tags = [ "production" ];
|
||||
|
||||
|
@ -52,7 +60,9 @@ buildGoModule rec {
|
|||
];
|
||||
|
||||
postInstall = ''
|
||||
cp -r $webapp/{client,i18n,fonts,templates,config} $out
|
||||
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 {} \;
|
||||
'';
|
||||
|
|
Loading…
Reference in a new issue