summary refs log tree commit diff
path: root/pkgs/development/web/mailcatcher/default.nix
blob: 49c5c4d81af1da03b2c7aed18e1bd47f7a1890d6 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
{ stdenv, bundlerEnv, ruby, makeWrapper }:

stdenv.mkDerivation rec {
  name = "mailcatcher-${version}";

  version = (import ./gemset.nix).mailcatcher.version;

  env = bundlerEnv {
    name = "${name}-gems";

    inherit ruby;

    gemdir = ./.;
  };

  buildInputs = [ makeWrapper ];

  unpackPhase = ":";

  installPhase = ''
    mkdir -p $out/bin
    makeWrapper ${env}/bin/mailcatcher $out/bin/mailcatcher
    makeWrapper ${env}/bin/catchmail $out/bin/catchmail
  '';

  meta = with stdenv.lib; {
    description = "SMTP server and web interface to locally test outbound emails";
    homepage    = https://mailcatcher.me/;
    license     = licenses.mit;
    maintainers = [ maintainers.zarelit ];
    platforms   = platforms.unix;
  };
}