about summary refs log tree commit diff
path: root/nixpkgs/pkgs/applications/networking/mailreaders/notmuch
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2019-01-07 02:18:36 +0000
committerAlyssa Ross <hi@alyssa.is>2019-01-07 02:18:47 +0000
commit36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2 (patch)
treeb3faaf573407b32aa645237a4d16b82778a39a92 /nixpkgs/pkgs/applications/networking/mailreaders/notmuch
parent4e31070265257dc67d120c27e0f75c2344fdfa9a (diff)
parentabf060725d7614bd3b9f96764262dfbc2f9c2199 (diff)
downloadnixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar
nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.gz
nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.bz2
nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.lz
nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.xz
nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.zst
nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.zip
Add 'nixpkgs/' from commit 'abf060725d7614bd3b9f96764262dfbc2f9c2199'
git-subtree-dir: nixpkgs
git-subtree-mainline: 4e31070265257dc67d120c27e0f75c2344fdfa9a
git-subtree-split: abf060725d7614bd3b9f96764262dfbc2f9c2199
Diffstat (limited to 'nixpkgs/pkgs/applications/networking/mailreaders/notmuch')
-rw-r--r--nixpkgs/pkgs/applications/networking/mailreaders/notmuch/default.nix89
-rw-r--r--nixpkgs/pkgs/applications/networking/mailreaders/notmuch/muchsync.nix23
-rw-r--r--nixpkgs/pkgs/applications/networking/mailreaders/notmuch/mutt.nix46
3 files changed, 158 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/applications/networking/mailreaders/notmuch/default.nix b/nixpkgs/pkgs/applications/networking/mailreaders/notmuch/default.nix
new file mode 100644
index 000000000000..69de3ef5d51c
--- /dev/null
+++ b/nixpkgs/pkgs/applications/networking/mailreaders/notmuch/default.nix
@@ -0,0 +1,89 @@
+{ fetchurl, stdenv
+, pkgconfig, gnupg
+, xapian, gmime, talloc, zlib
+, doxygen, perl
+, pythonPackages
+, bash-completion
+, emacs
+, ruby
+, which, dtach, openssl, bash, gdb, man
+}:
+
+with stdenv.lib;
+
+stdenv.mkDerivation rec {
+  version = "0.28";
+  name = "notmuch-${version}";
+
+  passthru = {
+    pythonSourceRoot = "${name}/bindings/python";
+    inherit version;
+  };
+
+  src = fetchurl {
+    url = "https://notmuchmail.org/releases/${name}.tar.gz";
+    sha256 = "0dqarmjc8544m2w7bqrqmvsfy55fw82707z3lz9cql8nr777bjmc";
+  };
+
+  nativeBuildInputs = [ pkgconfig ];
+  buildInputs = [
+    gnupg # undefined dependencies
+    xapian gmime talloc zlib  # dependencies described in INSTALL
+    doxygen perl  # (optional) api docs
+    pythonPackages.sphinx pythonPackages.python  # (optional) documentation -> doc/INSTALL
+    bash-completion  # (optional) dependency to install bash completion
+    emacs  # (optional) to byte compile emacs code, also needed for tests
+    ruby  # (optional) ruby bindings
+  ];
+
+  postPatch = ''
+    patchShebangs configure
+    patchShebangs test/
+
+    for src in \
+      util/crypto.c \
+      notmuch-config.c
+    do
+      substituteInPlace "$src" \
+        --replace \"gpg\" \"${gnupg}/bin/gpg\"
+    done
+
+    substituteInPlace lib/Makefile.local \
+      --replace '-install_name $(libdir)' "-install_name $out/lib"
+  '';
+
+  configureFlags = [ "--zshcompletiondir=$(out)/share/zsh/site-functions" ];
+
+  # Notmuch doesn't use autoconf and consequently doesn't tag --bindir and
+  # friends
+  setOutputFlags = false;
+  enableParallelBuilding = true;
+  makeFlags = "V=1";
+
+  preCheck = let
+    test-database = fetchurl {
+      url = "https://notmuchmail.org/releases/test-databases/database-v1.tar.xz";
+      sha256 = "1lk91s00y4qy4pjh8638b5lfkgwyl282g1m27srsf7qfn58y16a2";
+    };
+  in ''
+    ln -s ${test-database} test/test-databases/database-v1.tar.xz
+  '';
+  doCheck = !stdenv.hostPlatform.isDarwin && (versionAtLeast gmime.version "3.0");
+  checkTarget = "test";
+  checkInputs = [
+    which dtach openssl bash
+    gdb man
+  ];
+
+  installTargets = "install install-man";
+
+  dontGzipMan = true; # already compressed
+
+  meta = {
+    description = "Mail indexer";
+    homepage    = https://notmuchmail.org/;
+    license     = licenses.gpl3;
+    maintainers = with maintainers; [ chaoflow flokli garbas the-kenny ];
+    platforms   = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/networking/mailreaders/notmuch/muchsync.nix b/nixpkgs/pkgs/applications/networking/mailreaders/notmuch/muchsync.nix
new file mode 100644
index 000000000000..e25dfe834f65
--- /dev/null
+++ b/nixpkgs/pkgs/applications/networking/mailreaders/notmuch/muchsync.nix
@@ -0,0 +1,23 @@
+{ stdenv, fetchurl
+, notmuch, openssl, pkgconfig, sqlite, xapian, zlib
+}:
+stdenv.mkDerivation rec {
+  version = "5";
+  name = "muchsync-${version}";
+  passthru = {
+    inherit version;
+  };
+  src = fetchurl {
+    url = "http://www.muchsync.org/src/${name}.tar.gz";
+    sha256 = "1k2m44pj5i6vfhp9icdqs42chsp208llanc666p3d9nww8ngq2lb";
+  };
+  nativeBuildInputs = [ pkgconfig ];
+  buildInputs = [ notmuch openssl sqlite xapian zlib ];
+  meta = {
+    description = "Synchronize maildirs and notmuch databases";
+    homepage = "http://www.muchsync.org/";
+    platforms = stdenv.lib.platforms.unix;
+    maintainers = with stdenv.lib.maintainers; [ ocharles ];
+    license = stdenv.lib.licenses.gpl2Plus;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/networking/mailreaders/notmuch/mutt.nix b/nixpkgs/pkgs/applications/networking/mailreaders/notmuch/mutt.nix
new file mode 100644
index 000000000000..410e5e10ceb6
--- /dev/null
+++ b/nixpkgs/pkgs/applications/networking/mailreaders/notmuch/mutt.nix
@@ -0,0 +1,46 @@
+{ stdenv, lib, perl, perlPackages, makeWrapper, coreutils, notmuch }:
+
+stdenv.mkDerivation rec {
+  name = "notmuch-mutt-${version}";
+  version = notmuch.version;
+
+  outputs = [ "out" ];
+
+  dontStrip = true;
+
+  buildInputs = [
+    perl
+    makeWrapper
+  ] ++ (with perlPackages; [
+    FileRemove
+    DigestSHA1
+    Later
+    MailBox
+    MailMaildir
+    MailTools
+    StringShellQuote
+    TermReadLineGnu
+  ]);
+
+  src = notmuch.src;
+
+  phases = [ "unpackPhase" "installPhase" "fixupPhase" ];
+
+  installPhase = ''
+    ${coreutils}/bin/install -Dm755 \
+      ./contrib/notmuch-mutt/notmuch-mutt \
+      $out/bin/notmuch-mutt
+
+    wrapProgram $out/bin/notmuch-mutt \
+      --prefix PERL5LIB : $PERL5LIB
+  '';
+
+  meta = with lib; {
+    inherit version;
+    description = "Mutt support for notmuch";
+    homepage    = https://notmuchmail.org/;
+    license     = with licenses; gpl3;
+    maintainers = with maintainers; [ peterhoeg ];
+    platforms   = platforms.unix;
+  };
+}