about summary refs log tree commit diff
path: root/pkgs/development/web/mailcatcher/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/web/mailcatcher/default.nix')
-rw-r--r--pkgs/development/web/mailcatcher/default.nix33
1 files changed, 33 insertions, 0 deletions
diff --git a/pkgs/development/web/mailcatcher/default.nix b/pkgs/development/web/mailcatcher/default.nix
new file mode 100644
index 0000000000000..49c5c4d81af1d
--- /dev/null
+++ b/pkgs/development/web/mailcatcher/default.nix
@@ -0,0 +1,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;
+  };
+}