nixpkgs/pkgs/tools/misc/mmctl/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

44 lines
1.3 KiB
Nix
Raw Normal View History

2022-06-21 00:10:26 +00:00
{ lib
, fetchFromGitHub
, buildGoModule
}:
2021-12-22 11:12:27 +00:00
buildGoModule rec {
pname = "mmctl";
2023-11-30 03:30:28 +00:00
version = "9.2.2";
2021-12-22 11:12:27 +00:00
src = fetchFromGitHub {
owner = "mattermost";
2023-11-30 03:30:28 +00:00
repo = "mattermost";
2021-12-22 11:12:27 +00:00
rev = "v${version}";
2023-11-30 03:30:28 +00:00
hash = "sha256-53L2F20vaLLxtQS3DP/u0ZxLtnXHmjfcOMbXd4i+A6Y=";
} + "/server";
vendorHash = "sha256-v8aKZyb4emrwuIgSBDgla5wzwyt6PVGakbXjB9JVaCk=";
patches = [ ./0001-module-replace-public.patch ];
2021-12-22 11:12:27 +00:00
2023-11-30 03:30:28 +00:00
subPackages = [ "cmd/mmctl" ];
2021-12-22 11:12:27 +00:00
2023-11-30 03:30:28 +00:00
checkPhase = "go test -tags unit -timeout 30m ./cmd/mmctl/...";
2021-12-22 11:12:27 +00:00
2022-06-21 00:10:26 +00:00
ldflags = [
"-s"
"-w"
2023-11-30 03:30:28 +00:00
"-X github.com/mattermost/mattermost/server/public/model.Version=${version}"
"-X github.com/mattermost/mattermost/server/public/model.BuildNumber=${version}-nixpkgs"
"-X github.com/mattermost/mattermost/server/public/model.BuildDate=1970-01-01"
"-X github.com/mattermost/mattermost/server/public/model.BuildHash=v${version}"
"-X github.com/mattermost/mattermost/server/public/model.BuildHashEnterprise=none"
"-X github.com/mattermost/mattermost/server/public/model.BuildEnterpriseReady=false"
2022-06-21 00:10:26 +00:00
];
2021-12-22 11:12:27 +00:00
meta = with lib; {
description = "A remote CLI tool for Mattermost";
homepage = "https://github.com/mattermost/mmctl";
license = licenses.asl20;
2023-11-30 03:30:28 +00:00
maintainers = with maintainers; [ ppom mgdelacroix ];
2023-11-27 01:17:53 +00:00
mainProgram = "mmctl";
2021-12-22 11:12:27 +00:00
};
}