forked from mirrors/nixpkgs
Merge pull request #97445 from jojosch/mailhog-1.0.1
This commit is contained in:
commit
dd89605050
|
@ -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
nixos/tests/mailhog.nix
Normal file
24
nixos/tests/mailhog.nix
Normal file
|
@ -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"
|
||||
)
|
||||
'';
|
||||
})
|
|
@ -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
pkgs/servers/mail/mailhog/deps.nix
generated
191
pkgs/servers/mail/mailhog/deps.nix
generated
|
@ -1,191 +0,0 @@
|
|||
[
|
||||
{
|
||||
goPackagePath = "github.com/gorilla/pat";
|
||||
fetch = {
|
||||
type = "git";
|
||||
url = "https://github.com/gorilla/pat";
|
||||
rev = "cf955c3d1f2c27ee96f93e9738085c762ff5f49d";
|
||||
sha256 = "1jnhdhba3cwgsgv6qf7shvmk2nbbp8z30n9cimz9w6vd940ipisf";
|
||||
};
|
||||
}
|
||||
{
|
||||
goPackagePath = "github.com/gorilla/context";
|
||||
fetch = {
|
||||
type = "git";
|
||||
url = "https://github.com/gorilla/context";
|
||||
rev = "1ea25387ff6f684839d82767c1733ff4d4d15d0a";
|
||||
sha256 = "1nh1nzxcsgd215x4xn59wc4cbqfa8zvhvnnx5p8fkrn4bj1cgak4";
|
||||
};
|
||||
}
|
||||
{
|
||||
goPackagePath = "github.com/gorilla/mux";
|
||||
fetch = {
|
||||
type = "git";
|
||||
url = "https://github.com/gorilla/mux";
|
||||
rev = "bcd8bc72b08df0f70df986b97f95590779502d31";
|
||||
sha256 = "0majd18zn8v1b1agn015vnk3xk2v8j5nyckczlf72gm3kaq3icga";
|
||||
};
|
||||
}
|
||||
{
|
||||
goPackagePath = "github.com/gorilla/websocket";
|
||||
fetch = {
|
||||
type = "git";
|
||||
url = "https://github.com/gorilla/websocket";
|
||||
rev = "3ab3a8b8831546bd18fd182c20687ca853b2bb13";
|
||||
sha256 = "17y94ngp1yrswq5pxxy97naiw6jgxz2yvm8zydi83gfixdgs99fc";
|
||||
};
|
||||
}
|
||||
{
|
||||
goPackagePath = "github.com/ian-kent/go-log";
|
||||
fetch = {
|
||||
type = "git";
|
||||
url = "https://github.com/ian-kent/go-log";
|
||||
rev = "5731446c36ab9f716106ce0731f484c50fdf1ad1";
|
||||
sha256 = "1qr0myg68r9zq43fnx0rbnxcny2jpyg3gc269pc2riskqk0a731d";
|
||||
};
|
||||
}
|
||||
{
|
||||
goPackagePath = "github.com/ian-kent/envconf";
|
||||
fetch = {
|
||||
type = "git";
|
||||
url = "https://github.com/ian-kent/envconf";
|
||||
rev = "c19809918c02ab33dc8635d68c77649313185275";
|
||||
sha256 = "1085863rnx4h0q9xvg4zlsc7xf7jngfmjrq83cpcv1ayi664mzdx";
|
||||
};
|
||||
}
|
||||
{
|
||||
goPackagePath = "github.com/ian-kent/goose";
|
||||
fetch = {
|
||||
type = "git";
|
||||
url = "https://github.com/ian-kent/goose";
|
||||
rev = "c3541ea826ad9e0f8a4a8c15ca831e8b0adde58c";
|
||||
sha256 = "0v98d2554vlrm8mzk2zx8wj3daq076273w0zs8ww1aa57a1l74qv";
|
||||
};
|
||||
}
|
||||
{
|
||||
goPackagePath = "github.com/ian-kent/linkio";
|
||||
fetch = {
|
||||
type = "git";
|
||||
url = "https://github.com/ian-kent/linkio";
|
||||
rev = "77fb4b01842cb4b019137c0227df9a8f9779d0bd";
|
||||
sha256 = "0fixidplxzmw7aakw19d64nvrykwm5xk55fj1q74n70s8j5d8hiq";
|
||||
};
|
||||
}
|
||||
{
|
||||
goPackagePath = "github.com/mailhog/MailHog-Server";
|
||||
fetch = {
|
||||
type = "git";
|
||||
url = "https://github.com/mailhog/MailHog-Server";
|
||||
rev = "50f74a1aa2991b96313144d1ac718ce4d6739dfd";
|
||||
sha256 = "1h0qs66bvgygpq0sz3w6y445vm3pvlrljr5x7xr13y0087mrpjla";
|
||||
};
|
||||
}
|
||||
{
|
||||
goPackagePath = "github.com/mailhog/MailHog-UI";
|
||||
fetch = {
|
||||
type = "git";
|
||||
url = "https://github.com/mailhog/MailHog-UI";
|
||||
rev = "24b31a47cc5b65d23576bb9884c941d2b88381f7";
|
||||
sha256 = "0309jmryhx3n0yksssk2j4xkh1xb01468i5f2sy3a83xkz9p3d54";
|
||||
};
|
||||
}
|
||||
{
|
||||
goPackagePath = "github.com/mailhog/http";
|
||||
fetch = {
|
||||
type = "git";
|
||||
url = "https://github.com/mailhog/http";
|
||||
rev = "2e653938bf190d0e2fbe4825ce74e5bc149a62f2";
|
||||
sha256 = "18j03lvyis7z0mv3fym3j9a7pi2qvnhggmhpxnjbwvwb86dhxjm8";
|
||||
};
|
||||
}
|
||||
{
|
||||
goPackagePath = "github.com/mailhog/mhsendmail";
|
||||
fetch = {
|
||||
type = "git";
|
||||
url = "https://github.com/mailhog/mhsendmail";
|
||||
rev = "002527025ef50364446d7560600aedc5daaa1997";
|
||||
sha256 = "11l2y0xb7hwk0zs7pwif3xkclhz32sc0jff3jkaxi3jdf3q3kz91";
|
||||
};
|
||||
}
|
||||
{
|
||||
goPackagePath = "github.com/mailhog/data";
|
||||
fetch = {
|
||||
type = "git";
|
||||
url = "https://github.com/mailhog/data";
|
||||
rev = "024d554958b5bea5db220bfd84922a584d878ded";
|
||||
sha256 = "0dgh0pcsn0xrxsn1qlxgdssaimch57kxj5vyvhqjnsdnh814g9vf";
|
||||
};
|
||||
}
|
||||
{
|
||||
goPackagePath = "github.com/mailhog/smtp";
|
||||
fetch = {
|
||||
type = "git";
|
||||
url = "https://github.com/mailhog/smtp";
|
||||
rev = "0c4e9b7e0625fec61d0c30d7b2f6c62852be6c54";
|
||||
sha256 = "1w46w3asdxsgzyall16hi2s4jvkka1k3a1l52ryfhrzg187krir6";
|
||||
};
|
||||
}
|
||||
{
|
||||
goPackagePath = "github.com/mailhog/storage";
|
||||
fetch = {
|
||||
type = "git";
|
||||
url = "https://github.com/mailhog/storage";
|
||||
rev = "6d871fb23ecd873cb10cdfc3a8dec5f50d2af8fa";
|
||||
sha256 = "1ya0xigm2xysin59zlp2sbqncnmw9h77r9dn9k7vxhf0z8vvbibk";
|
||||
};
|
||||
}
|
||||
{
|
||||
goPackagePath = "github.com/ogier/pflag";
|
||||
fetch = {
|
||||
type = "git";
|
||||
url = "https://github.com/ogier/pflag";
|
||||
rev = "32a05c62658bd1d7c7e75cbc8195de5d585fde0f";
|
||||
sha256 = "1lyrr9wx0j087mnpsxcbspjcgh9a5c6bqwrasd8s237jlyc50qmj";
|
||||
};
|
||||
}
|
||||
{
|
||||
goPackagePath = "github.com/tinylib/msgp";
|
||||
fetch = {
|
||||
type = "git";
|
||||
url = "https://github.com/tinylib/msgp";
|
||||
rev = "02d047e07459c5a7b02b1244161d0f2f6d8f660d";
|
||||
sha256 = "12y7qz1x266m0a0w3zwd49achxbh036yhkmx93xfs2283xh70q1r";
|
||||
};
|
||||
}
|
||||
{
|
||||
goPackagePath = "github.com/philhofer/fwd";
|
||||
fetch = {
|
||||
type = "git";
|
||||
url = "https://github.com/philhofer/fwd";
|
||||
rev = "1612a298117663d7bc9a760ae20d383413859798";
|
||||
sha256 = "155l0nvvblpx0fy683q6bzins7csh8fw7yf64hbia8hc7wh0gjdl";
|
||||
};
|
||||
}
|
||||
{
|
||||
goPackagePath = "github.com/t-k/fluent-logger-golang";
|
||||
fetch = {
|
||||
type = "git";
|
||||
url = "https://github.com/t-k/fluent-logger-golang";
|
||||
rev = "0f8ec08f2057a61574b6943e75045fffbeae894e";
|
||||
sha256 = "0ic5bj87wpq1kncixd5mklwqn1jjwqfqfvkyl0mrnwp3p5p24v5c";
|
||||
};
|
||||
}
|
||||
{
|
||||
goPackagePath = "golang.org/x/crypto";
|
||||
fetch = {
|
||||
type = "git";
|
||||
url = "https://go.googlesource.com/crypto";
|
||||
rev = "c197bcf24cde29d3f73c7b4ac6fd41f4384e8af6";
|
||||
sha256 = "1y2bbghi594m8p4pcm9pwrzql06179xj6zvhaghwcc6y0l48rbgp";
|
||||
};
|
||||
}
|
||||
{
|
||||
goPackagePath = "gopkg.in/mgo.v2";
|
||||
fetch = {
|
||||
type = "git";
|
||||
url = "https://gopkg.in/mgo.v2";
|
||||
rev = "d90005c5262a3463800497ea5a89aed5fe22c886";
|
||||
sha256 = "1z81k6mnfk07hkrkw31l16qycyiwa6wzyhysmywgkh58sm5dc9m7";
|
||||
};
|
||||
}
|
||||
]
|
Loading…
Reference in a new issue