Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: f5944b74e670
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: dd8960505054
Choose a head ref
  • 3 commits
  • 4 files changed
  • 2 contributors

Commits on Dec 17, 2020

  1. mailhog: 1.0.0 -> 1.0.1

    jojosch committed Dec 17, 2020
    Copy the full SHA
    d0ec6db View commit details
  2. mailhog: add simple test

    jojosch committed Dec 17, 2020
    Copy the full SHA
    df7a435 View commit details
  3. Copy the full SHA
    dd89605 View commit details
Showing with 30 additions and 198 deletions.
  1. +1 −0 nixos/tests/all-tests.nix
  2. +24 −0 nixos/tests/mailhog.nix
  3. +5 −7 pkgs/servers/mail/mailhog/default.nix
  4. +0 −191 pkgs/servers/mail/mailhog/deps.nix
1 change: 1 addition & 0 deletions nixos/tests/all-tests.nix
Original file line number Diff line number Diff line change
@@ -210,6 +210,7 @@ in
magic-wormhole-mailbox-server = handleTest ./magic-wormhole-mailbox-server.nix {};
magnetico = handleTest ./magnetico.nix {};
mailcatcher = handleTest ./mailcatcher.nix {};
mailhog = handleTest ./mailhog.nix {};
mariadb-galera-mariabackup = handleTest ./mysql/mariadb-galera-mariabackup.nix {};
mariadb-galera-rsync = handleTest ./mysql/mariadb-galera-rsync.nix {};
matomo = handleTest ./matomo.nix {};
24 changes: 24 additions & 0 deletions nixos/tests/mailhog.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import ./make-test-python.nix ({ lib, ... }: {
name = "mailhog";
meta.maintainers = with lib.maintainers; [ jojosch ];

machine = { pkgs, ... }: {
services.mailhog.enable = true;

environment.systemPackages = with pkgs; [ swaks ];
};

testScript = ''
start_all()
machine.wait_for_unit("mailhog.service")
machine.wait_for_open_port("1025")
machine.wait_for_open_port("8025")
machine.succeed(
'echo "this is the body of the email" | swaks --to root@example.org --body - --server localhost:1025'
)
assert "this is the body of the email" in machine.succeed(
"curl --fail http://localhost:8025/api/v2/messages"
)
'';
})
12 changes: 5 additions & 7 deletions pkgs/servers/mail/mailhog/default.nix
Original file line number Diff line number Diff line change
@@ -2,24 +2,22 @@

buildGoPackage rec {
pname = "MailHog";
version = "1.0.0";
rev = "v${version}";
version = "1.0.1";

goPackagePath = "github.com/mailhog/MailHog";

src = fetchFromGitHub {
inherit rev;
owner = "mailhog";
repo = "MailHog";
sha256 = "0r6zidkffb8q12zyxd063jy0ig2x93llna4zb5i2qjh9gb971i83";
rev = "v${version}";
sha256 = "124216850572r1h0ii7ad6jd1cd5czcvkz7k2jzvjb4pv2kl8p3y";
};

goDeps = ./deps.nix;

meta = with stdenv.lib; {
description = "Web and API based SMTP testing";
homepage = "https://github.com/mailhog/MailHog";
maintainers = with maintainers; [ disassembler ];
changelog = "https://github.com/mailhog/MailHog/releases/tag/v${version}";
maintainers = with maintainers; [ disassembler jojosch ];
license = licenses.mit;
};
}
191 changes: 0 additions & 191 deletions pkgs/servers/mail/mailhog/deps.nix

This file was deleted.