about summary refs log tree commit diff
path: root/pkgs/servers/mail/mox/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/servers/mail/mox/default.nix')
-rw-r--r--pkgs/servers/mail/mox/default.nix34
1 files changed, 34 insertions, 0 deletions
diff --git a/pkgs/servers/mail/mox/default.nix b/pkgs/servers/mail/mox/default.nix
new file mode 100644
index 0000000000000..2dd7712c2c887
--- /dev/null
+++ b/pkgs/servers/mail/mox/default.nix
@@ -0,0 +1,34 @@
+{ lib
+, buildGoModule
+, fetchFromGitHub
+}:
+
+buildGoModule rec {
+  pname = "mox";
+  version = "0.0.5";
+
+  src = fetchFromGitHub {
+    owner = "mjl-";
+    repo = "mox";
+    rev = "v${version}";
+    hash = "sha256-f5/K6cPqJJkbdiVCNGOTd9Fjx2/gvSZCxeR6nnEaeJw=";
+  };
+
+  # set the version during buildtime
+  patches = [ ./version.patch ];
+
+  vendorHash = null;
+
+  ldflags = [
+    "-s"
+    "-w"
+    "-X github.com/mjl-/mox/moxvar.Version=${version}"
+  ];
+
+  meta = {
+    description = "Modern full-featured open source secure mail server for low-maintenance self-hosted email";
+    homepage = "https://github.com/mjl-/mox";
+    license = lib.licenses.mit;
+    maintainers = with lib.maintainers; [ dit7ya ];
+  };
+}