mmctl: 9.2.2 → 9.5.1, use override on mattermost

This makes the mmctl package be an override on the mattermost package,
as these were both moved by upstream into the same monorepo and use the
same build system. Nevertheless, it makes sense to keep them in separate
packages, as the mmctl utility is usually used on a different machine
than the mattermost server.

The meta information is retained as it was before (via an override).

stuebinm 221d194c 923c6a8b

+5 -48
-8
pkgs/tools/misc/mmctl/0001-module-replace-public.patch
··· 1 - --- a/go.mod 2 - +++ b/go.mod 3 - @@ -218,3 +218,5 @@ exclude ( 4 - github.com/dyatlov/go-opengraph v0.0.0-20210112100619-dae8665a5b09 5 - github.com/willf/bitset v1.2.0 6 - ) 7 - + 8 - +replace github.com/mattermost/mattermost/server/public => ./public
+4 -35
pkgs/tools/misc/mmctl/default.nix
··· 1 - { lib 2 - , fetchFromGitHub 3 - , buildGoModule 1 + { mattermost 4 2 }: 5 3 6 - buildGoModule rec { 4 + mattermost.overrideAttrs (o: { 7 5 pname = "mmctl"; 8 - version = "9.2.2"; 9 - 10 - src = fetchFromGitHub { 11 - owner = "mattermost"; 12 - repo = "mattermost"; 13 - rev = "v${version}"; 14 - hash = "sha256-53L2F20vaLLxtQS3DP/u0ZxLtnXHmjfcOMbXd4i+A6Y="; 15 - } + "/server"; 16 - 17 - vendorHash = "sha256-v8aKZyb4emrwuIgSBDgla5wzwyt6PVGakbXjB9JVaCk="; 18 - 19 - patches = [ ./0001-module-replace-public.patch ]; 20 - 21 6 subPackages = [ "cmd/mmctl" ]; 22 7 23 - checkPhase = "go test -tags unit -timeout 30m ./cmd/mmctl/..."; 24 - 25 - ldflags = [ 26 - "-s" 27 - "-w" 28 - "-X github.com/mattermost/mattermost/server/public/model.Version=${version}" 29 - "-X github.com/mattermost/mattermost/server/public/model.BuildNumber=${version}-nixpkgs" 30 - "-X github.com/mattermost/mattermost/server/public/model.BuildDate=1970-01-01" 31 - "-X github.com/mattermost/mattermost/server/public/model.BuildHash=v${version}" 32 - "-X github.com/mattermost/mattermost/server/public/model.BuildHashEnterprise=none" 33 - "-X github.com/mattermost/mattermost/server/public/model.BuildEnterpriseReady=false" 34 - ]; 35 - 36 - meta = with lib; { 8 + meta = o.meta // { 37 9 description = "A remote CLI tool for Mattermost"; 38 - homepage = "https://github.com/mattermost/mmctl"; 39 - license = licenses.asl20; 40 - maintainers = with maintainers; [ ppom mgdelacroix ]; 41 10 mainProgram = "mmctl"; 42 11 }; 43 - } 12 + })
+1 -5
pkgs/top-level/all-packages.nix
··· 5986 5986 5987 5987 mlarchive2maildir = callPackage ../applications/networking/mailreaders/mlarchive2maildir { }; 5988 5988 5989 - mmctl = callPackage ../tools/misc/mmctl { 5990 - # mmctl tests currently fail with go1.21. See 5991 - # https://mattermost.atlassian.net/browse/MM-55465 5992 - buildGoModule = buildGo120Module; 5993 - }; 5989 + mmctl = callPackage ../tools/misc/mmctl { }; 5994 5990 5995 5991 moar = callPackage ../tools/misc/moar { }; 5996 5992