1{
2 lib,
3 buildGoModule,
4 fetchFromGitHub,
5 nix-update-script,
6}:
7
8buildGoModule (finalAttrs: {
9 pname = "mox";
10 version = "0.0.15";
11
12 src = fetchFromGitHub {
13 owner = "mjl-";
14 repo = "mox";
15 tag = "v${finalAttrs.version}";
16 hash = "sha256-apIV+nClXTUbmCssnvgG9UwpTNTHTe6FgLCxp14/s0A=";
17 };
18
19 # set the version during buildtime
20 patches = [ ./version.patch ];
21
22 vendorHash = null;
23
24 ldflags = [
25 "-s"
26 "-w"
27 "-X github.com/mjl-/mox/moxvar.Version=${finalAttrs.version}"
28 "-X github.com/mjl-/mox/moxvar.VersionBare=${finalAttrs.version}"
29 ];
30
31 passthru.updateScript = nix-update-script { };
32
33 meta = {
34 description = "Modern full-featured open source secure mail server for low-maintenance self-hosted email";
35 mainProgram = "mox";
36 homepage = "https://github.com/mjl-/mox";
37 license = lib.licenses.mit;
38 maintainers = with lib.maintainers; [
39 dit7ya
40 kotatsuyaki
41 ];
42 teams = with lib.teams; [ ngi ];
43 };
44})