lol
1{
2 lib,
3 buildGoModule,
4 fetchFromGitHub,
5 nixosTests,
6}:
7
8buildGoModule rec {
9 pname = "MailHog";
10 version = "1.0.1";
11
12 src = fetchFromGitHub {
13 owner = "mailhog";
14 repo = "MailHog";
15 rev = "v${version}";
16 hash = "sha256-flxEp9iXLLm/FPP8udlnpbHQpGnqxAhgyOIUUJAJgog=";
17 };
18
19 patches = [
20 # Generate by go mod init github.com/mailhog/MailHog && go mod tidy && go get github.com/mailhog/mhsendmail@9e70164f299c9e06af61402e636f5bbdf03e7dbb
21 ./0001-Add-go.mod-go.sum.patch
22 ];
23
24 vendorHash = "sha256-YfqC8MEdiLcucOaXOsLI9H4NDQ/4T0newb6q7v0uDbw=";
25
26 deleteVendor = true;
27
28 ldflags = [
29 "-s"
30 "-X main.version=${version}"
31 ];
32
33 passthru.tests = {
34 inherit (nixosTests) mailhog;
35 };
36
37 meta = {
38 description = "Web and API based SMTP testing";
39 mainProgram = "MailHog";
40 homepage = "https://github.com/mailhog/MailHog";
41 changelog = "https://github.com/mailhog/MailHog/releases/tag/v${version}";
42 maintainers = with lib.maintainers; [
43 disassembler
44 jojosch
45 ];
46 license = lib.licenses.mit;
47 };
48}