about summary refs log tree commit diff
path: root/pkgs/applications/networking/mailreaders
diff options
context:
space:
mode:
authorpacien <pacien.trangirard@pacien.net>2023-09-17 19:43:11 +0200
committerpacien <pacien.trangirard@pacien.net>2023-09-18 00:19:45 +0200
commit527e3dc045f4e5e2da8ef092cb39e389201e888a (patch)
tree9147fd848ae3d6e0152059b27751932894e59308 /pkgs/applications/networking/mailreaders
parent5cbbc68e1ba223349a7e0126e03107c1e28b6030 (diff)
meli: re-introduce at 0.8.1
This package had been dropped in ac019b9 because it required an
insecure version of openssl. This is no longer the case with this
update.

This new version also enables notmuch support by default in upstream,
detecting the presence of the binary purely at runtime. Therefore,
the matching package build switch has been removed.
Diffstat (limited to 'pkgs/applications/networking/mailreaders')
-rw-r--r--pkgs/applications/networking/mailreaders/meli/default.nix79
1 files changed, 79 insertions, 0 deletions
diff --git a/pkgs/applications/networking/mailreaders/meli/default.nix b/pkgs/applications/networking/mailreaders/meli/default.nix
new file mode 100644
index 0000000000000..82bc21bc6f7cc
--- /dev/null
+++ b/pkgs/applications/networking/mailreaders/meli/default.nix
@@ -0,0 +1,79 @@
+{ stdenv
+, lib
+, fetchgit
+, rustPlatform
+
+# native build inputs
+, pkg-config
+, installShellFiles
+, makeWrapper
+, mandoc
+, rustfmt
+, file
+
+# build inputs
+, openssl
+, dbus
+, sqlite
+
+# runtime deps
+, gnum4
+}:
+
+rustPlatform.buildRustPackage rec {
+  pname = "meli";
+  version = "0.8.1";
+
+  src = fetchgit {
+    url = "https://git.meli.delivery/meli/meli.git";
+    rev = "v${version}";
+    hash = "sha256-sHpW2yjqYz4ePR6aQFUBD6BZwgDt3DT22/kWuKr9fAc=";
+  };
+
+  cargoSha256 = "sha256-Pg3V6Bd+drFPiJtUwsoKxu6snN88KvM+lsvnWBK/rvk=";
+
+  nativeBuildInputs = [
+    pkg-config
+    installShellFiles
+    makeWrapper
+    mandoc
+    (rustfmt.override { asNightly = true; })
+  ];
+
+  buildInputs = [
+    openssl
+    dbus
+    sqlite
+  ];
+
+  nativeCheckInputs = [
+    file
+  ];
+
+  postInstall = ''
+    installManPage meli/docs/*.{1,5,7}
+
+    wrapProgram $out/bin/meli \
+      --prefix PATH : ${lib.makeBinPath [ gnum4 ]}
+  '';
+
+  preCheck = ''
+    export HOME=$(mktemp -d)
+  '';
+
+  checkFlags = [
+    "--skip=conf::test_config_parse"        # panicking due to sandbox
+    "--skip=smtp::test::test_smtp"          # requiring network
+    "--skip=utils::xdg::query_default_app"  # doesn't build
+    "--skip=utils::xdg::query_mime_info"    # doesn't build
+  ];
+
+  meta = with lib; {
+    broken = (stdenv.isLinux && stdenv.isAarch64);
+    description = "Terminal e-mail client and e-mail client library";
+    homepage = "https://meli.delivery";
+    license = licenses.gpl3;
+    maintainers = with maintainers; [ _0x4A6F matthiasbeyer ];
+    platforms = platforms.linux;
+  };
+}