mailhog: init at 1.0.0 (#26821)

* mailhog: init at 1.0.0

* formatting nitpicks

authored by

Samuel Leathers and committed by
Jörg Thalheim
5d7fd7e7 da152526

+263
+1
lib/maintainers.nix
··· 141 dfoxfranke = "Daniel Fox Franke <dfoxfranke@gmail.com>"; 142 dgonyeo = "Derek Gonyeo <derek@gonyeo.com>"; 143 dipinhora = "Dipin Hora <dipinhora+github@gmail.com>"; 144 dmalikov = "Dmitry Malikov <malikov.d.y@gmail.com>"; 145 DmitryTsygankov = "Dmitry Tsygankov <dmitry.tsygankov@gmail.com>"; 146 dmjio = "David Johnson <djohnson.m@gmail.com>";
··· 141 dfoxfranke = "Daniel Fox Franke <dfoxfranke@gmail.com>"; 142 dgonyeo = "Derek Gonyeo <derek@gonyeo.com>"; 143 dipinhora = "Dipin Hora <dipinhora+github@gmail.com>"; 144 + disassembler = "Samuel Leathers <disasm@gmail.com>"; 145 dmalikov = "Dmitry Malikov <malikov.d.y@gmail.com>"; 146 DmitryTsygankov = "Dmitry Tsygankov <dmitry.tsygankov@gmail.com>"; 147 dmjio = "David Johnson <djohnson.m@gmail.com>";
+1
nixos/modules/module-list.nix
··· 252 ./services/mail/exim.nix 253 ./services/mail/freepops.nix 254 ./services/mail/mail.nix 255 ./services/mail/mlmmj.nix 256 ./services/mail/offlineimap.nix 257 ./services/mail/opendkim.nix
··· 252 ./services/mail/exim.nix 253 ./services/mail/freepops.nix 254 ./services/mail/mail.nix 255 + ./services/mail/mailhog.nix 256 ./services/mail/mlmmj.nix 257 ./services/mail/offlineimap.nix 258 ./services/mail/opendkim.nix
+43
nixos/modules/services/mail/mailhog.nix
···
··· 1 + { config, lib, pkgs, ... }: 2 + 3 + with lib; 4 + 5 + let 6 + cfg = config.services.mailhog; 7 + in { 8 + ###### interface 9 + 10 + options = { 11 + 12 + services.mailhog = { 13 + enable = mkEnableOption "MailHog"; 14 + user = mkOption { 15 + type = types.str; 16 + default = "mailhog"; 17 + description = "User account under which mailhog runs."; 18 + }; 19 + }; 20 + }; 21 + 22 + 23 + ###### implementation 24 + 25 + config = mkIf cfg.enable { 26 + 27 + users.extraUsers.mailhog = { 28 + name = cfg.user; 29 + description = "MailHog service user"; 30 + }; 31 + 32 + systemd.services.mailhog = { 33 + description = "MailHog service"; 34 + after = [ "network.target" ]; 35 + wantedBy = [ "multi-user.target" ]; 36 + serviceConfig = { 37 + Type = "simple"; 38 + ExecStart = "${pkgs.mailhog}/bin/MailHog"; 39 + User = cfg.user; 40 + }; 41 + }; 42 + }; 43 + }
+25
pkgs/servers/mail/mailhog/default.nix
···
··· 1 + { stdenv, buildGoPackage, fetchFromGitHub }: 2 + 3 + buildGoPackage rec { 4 + name = "MailHog-${version}"; 5 + version = "1.0.0"; 6 + rev = "v${version}"; 7 + 8 + goPackagePath = "github.com/mailhog/MailHog"; 9 + 10 + src = fetchFromGitHub { 11 + inherit rev; 12 + owner = "mailhog"; 13 + repo = "MailHog"; 14 + sha256 = "0r6zidkffb8q12zyxd063jy0ig2x93llna4zb5i2qjh9gb971i83"; 15 + }; 16 + 17 + goDeps = ./deps.nix; 18 + 19 + meta = with stdenv.lib; { 20 + description = "Web and API based SMTP testing"; 21 + homepage = "https://github.com/mailhog/MailHog"; 22 + maintainers = with maintainers; [ disassembler ]; 23 + license = licenses.mit; 24 + }; 25 + }
+191
pkgs/servers/mail/mailhog/deps.nix
···
··· 1 + [ 2 + { 3 + goPackagePath = "github.com/gorilla/pat"; 4 + fetch = { 5 + type = "git"; 6 + url = "https://github.com/gorilla/pat"; 7 + rev = "cf955c3d1f2c27ee96f93e9738085c762ff5f49d"; 8 + sha256 = "1jnhdhba3cwgsgv6qf7shvmk2nbbp8z30n9cimz9w6vd940ipisf"; 9 + }; 10 + } 11 + { 12 + goPackagePath = "github.com/gorilla/context"; 13 + fetch = { 14 + type = "git"; 15 + url = "https://github.com/gorilla/context"; 16 + rev = "1ea25387ff6f684839d82767c1733ff4d4d15d0a"; 17 + sha256 = "1nh1nzxcsgd215x4xn59wc4cbqfa8zvhvnnx5p8fkrn4bj1cgak4"; 18 + }; 19 + } 20 + { 21 + goPackagePath = "github.com/gorilla/mux"; 22 + fetch = { 23 + type = "git"; 24 + url = "https://github.com/gorilla/mux"; 25 + rev = "bcd8bc72b08df0f70df986b97f95590779502d31"; 26 + sha256 = "0majd18zn8v1b1agn015vnk3xk2v8j5nyckczlf72gm3kaq3icga"; 27 + }; 28 + } 29 + { 30 + goPackagePath = "github.com/gorilla/websocket"; 31 + fetch = { 32 + type = "git"; 33 + url = "https://github.com/gorilla/websocket"; 34 + rev = "3ab3a8b8831546bd18fd182c20687ca853b2bb13"; 35 + sha256 = "17y94ngp1yrswq5pxxy97naiw6jgxz2yvm8zydi83gfixdgs99fc"; 36 + }; 37 + } 38 + { 39 + goPackagePath = "github.com/ian-kent/go-log"; 40 + fetch = { 41 + type = "git"; 42 + url = "https://github.com/ian-kent/go-log"; 43 + rev = "5731446c36ab9f716106ce0731f484c50fdf1ad1"; 44 + sha256 = "1qr0myg68r9zq43fnx0rbnxcny2jpyg3gc269pc2riskqk0a731d"; 45 + }; 46 + } 47 + { 48 + goPackagePath = "github.com/ian-kent/envconf"; 49 + fetch = { 50 + type = "git"; 51 + url = "https://github.com/ian-kent/envconf"; 52 + rev = "c19809918c02ab33dc8635d68c77649313185275"; 53 + sha256 = "1085863rnx4h0q9xvg4zlsc7xf7jngfmjrq83cpcv1ayi664mzdx"; 54 + }; 55 + } 56 + { 57 + goPackagePath = "github.com/ian-kent/goose"; 58 + fetch = { 59 + type = "git"; 60 + url = "https://github.com/ian-kent/goose"; 61 + rev = "c3541ea826ad9e0f8a4a8c15ca831e8b0adde58c"; 62 + sha256 = "0v98d2554vlrm8mzk2zx8wj3daq076273w0zs8ww1aa57a1l74qv"; 63 + }; 64 + } 65 + { 66 + goPackagePath = "github.com/ian-kent/linkio"; 67 + fetch = { 68 + type = "git"; 69 + url = "https://github.com/ian-kent/linkio"; 70 + rev = "77fb4b01842cb4b019137c0227df9a8f9779d0bd"; 71 + sha256 = "0fixidplxzmw7aakw19d64nvrykwm5xk55fj1q74n70s8j5d8hiq"; 72 + }; 73 + } 74 + { 75 + goPackagePath = "github.com/mailhog/MailHog-Server"; 76 + fetch = { 77 + type = "git"; 78 + url = "https://github.com/mailhog/MailHog-Server"; 79 + rev = "50f74a1aa2991b96313144d1ac718ce4d6739dfd"; 80 + sha256 = "1h0qs66bvgygpq0sz3w6y445vm3pvlrljr5x7xr13y0087mrpjla"; 81 + }; 82 + } 83 + { 84 + goPackagePath = "github.com/mailhog/MailHog-UI"; 85 + fetch = { 86 + type = "git"; 87 + url = "https://github.com/mailhog/MailHog-UI"; 88 + rev = "24b31a47cc5b65d23576bb9884c941d2b88381f7"; 89 + sha256 = "0309jmryhx3n0yksssk2j4xkh1xb01468i5f2sy3a83xkz9p3d54"; 90 + }; 91 + } 92 + { 93 + goPackagePath = "github.com/mailhog/http"; 94 + fetch = { 95 + type = "git"; 96 + url = "https://github.com/mailhog/http"; 97 + rev = "2e653938bf190d0e2fbe4825ce74e5bc149a62f2"; 98 + sha256 = "18j03lvyis7z0mv3fym3j9a7pi2qvnhggmhpxnjbwvwb86dhxjm8"; 99 + }; 100 + } 101 + { 102 + goPackagePath = "github.com/mailhog/mhsendmail"; 103 + fetch = { 104 + type = "git"; 105 + url = "https://github.com/mailhog/mhsendmail"; 106 + rev = "002527025ef50364446d7560600aedc5daaa1997"; 107 + sha256 = "11l2y0xb7hwk0zs7pwif3xkclhz32sc0jff3jkaxi3jdf3q3kz91"; 108 + }; 109 + } 110 + { 111 + goPackagePath = "github.com/mailhog/data"; 112 + fetch = { 113 + type = "git"; 114 + url = "https://github.com/mailhog/data"; 115 + rev = "024d554958b5bea5db220bfd84922a584d878ded"; 116 + sha256 = "0dgh0pcsn0xrxsn1qlxgdssaimch57kxj5vyvhqjnsdnh814g9vf"; 117 + }; 118 + } 119 + { 120 + goPackagePath = "github.com/mailhog/smtp"; 121 + fetch = { 122 + type = "git"; 123 + url = "https://github.com/mailhog/smtp"; 124 + rev = "0c4e9b7e0625fec61d0c30d7b2f6c62852be6c54"; 125 + sha256 = "1w46w3asdxsgzyall16hi2s4jvkka1k3a1l52ryfhrzg187krir6"; 126 + }; 127 + } 128 + { 129 + goPackagePath = "github.com/mailhog/storage"; 130 + fetch = { 131 + type = "git"; 132 + url = "https://github.com/mailhog/storage"; 133 + rev = "6d871fb23ecd873cb10cdfc3a8dec5f50d2af8fa"; 134 + sha256 = "1ya0xigm2xysin59zlp2sbqncnmw9h77r9dn9k7vxhf0z8vvbibk"; 135 + }; 136 + } 137 + { 138 + goPackagePath = "github.com/ogier/pflag"; 139 + fetch = { 140 + type = "git"; 141 + url = "https://github.com/ogier/pflag"; 142 + rev = "32a05c62658bd1d7c7e75cbc8195de5d585fde0f"; 143 + sha256 = "1lyrr9wx0j087mnpsxcbspjcgh9a5c6bqwrasd8s237jlyc50qmj"; 144 + }; 145 + } 146 + { 147 + goPackagePath = "github.com/tinylib/msgp"; 148 + fetch = { 149 + type = "git"; 150 + url = "https://github.com/tinylib/msgp"; 151 + rev = "02d047e07459c5a7b02b1244161d0f2f6d8f660d"; 152 + sha256 = "12y7qz1x266m0a0w3zwd49achxbh036yhkmx93xfs2283xh70q1r"; 153 + }; 154 + } 155 + { 156 + goPackagePath = "github.com/philhofer/fwd"; 157 + fetch = { 158 + type = "git"; 159 + url = "https://github.com/philhofer/fwd"; 160 + rev = "1612a298117663d7bc9a760ae20d383413859798"; 161 + sha256 = "155l0nvvblpx0fy683q6bzins7csh8fw7yf64hbia8hc7wh0gjdl"; 162 + }; 163 + } 164 + { 165 + goPackagePath = "github.com/t-k/fluent-logger-golang"; 166 + fetch = { 167 + type = "git"; 168 + url = "https://github.com/t-k/fluent-logger-golang"; 169 + rev = "0f8ec08f2057a61574b6943e75045fffbeae894e"; 170 + sha256 = "0ic5bj87wpq1kncixd5mklwqn1jjwqfqfvkyl0mrnwp3p5p24v5c"; 171 + }; 172 + } 173 + { 174 + goPackagePath = "golang.org/x/crypto"; 175 + fetch = { 176 + type = "git"; 177 + url = "https://go.googlesource.com/crypto"; 178 + rev = "c197bcf24cde29d3f73c7b4ac6fd41f4384e8af6"; 179 + sha256 = "1y2bbghi594m8p4pcm9pwrzql06179xj6zvhaghwcc6y0l48rbgp"; 180 + }; 181 + } 182 + { 183 + goPackagePath = "gopkg.in/mgo.v2"; 184 + fetch = { 185 + type = "git"; 186 + url = "https://gopkg.in/mgo.v2"; 187 + rev = "d90005c5262a3463800497ea5a89aed5fe22c886"; 188 + sha256 = "1z81k6mnfk07hkrkw31l16qycyiwa6wzyhysmywgkh58sm5dc9m7"; 189 + }; 190 + } 191 + ]
+2
pkgs/top-level/all-packages.nix
··· 2994 2995 maildrop = callPackage ../tools/networking/maildrop { }; 2996 2997 mailnag = callPackage ../applications/networking/mailreaders/mailnag { }; 2998 2999 mailsend = callPackage ../tools/networking/mailsend { };
··· 2994 2995 maildrop = callPackage ../tools/networking/maildrop { }; 2996 2997 + mailhog = callPackage ../servers/mail/mailhog {}; 2998 + 2999 mailnag = callPackage ../applications/networking/mailreaders/mailnag { }; 3000 3001 mailsend = callPackage ../tools/networking/mailsend { };