about summary refs log tree commit diff
path: root/pkgs/applications/networking/msmtp
diff options
context:
space:
mode:
authorPeter Hoeg <peter@hoeg.com>2017-10-14 14:40:29 +0800
committerPeter Hoeg <peter@hoeg.com>2017-10-14 14:42:48 +0800
commitd81601065d57965767dd87590d93295e13e8fa49 (patch)
treebe510af2afb4a66e76b8dd2da6d3c50c756e4664 /pkgs/applications/networking/msmtp
parentff3fd1027c276d54215986cd7e82b3a2037df6f3 (diff)
Revert "msmtp: add nonblocking support"
This reverts commit 5f29e9fdbfe0ac069c0348084ca169c59cda3ddc.
Diffstat (limited to 'pkgs/applications/networking/msmtp')
-rw-r--r--pkgs/applications/networking/msmtp/default.nix37
1 files changed, 3 insertions, 34 deletions
diff --git a/pkgs/applications/networking/msmtp/default.nix b/pkgs/applications/networking/msmtp/default.nix
index 74beba7be49ec..85e5abdc9b6ee 100644
--- a/pkgs/applications/networking/msmtp/default.nix
+++ b/pkgs/applications/networking/msmtp/default.nix
@@ -1,21 +1,11 @@
-{ stdenv, lib, fetchurl, fetchFromGitHub, autoreconfHook, pkgconfig
+{ stdenv, lib, fetchurl, autoreconfHook, pkgconfig
 , openssl, netcat-gnu, gnutls, gsasl, libidn, Security
-, systemd ? null, eject ? null }:
+, systemd ? null }:
 
 let
   tester = "n"; # {x| |p|P|n|s}
   journal = if stdenv.isLinux then "y" else "n";
 
-  # preferNonBlock = stdenv.isLinux;
-  preferNonBlock = false;
-
-  nonblock = fetchFromGitHub {
-    owner  = "Stebalien";
-    repo   = "msmtp-queue";
-    rev    = "07032a4e4c8ea0d2364641c959db0c60f52423c7";
-    sha256 = "0g2aph30007spkdwxljrlr2bliivf9nrdis3d3jvjpx8l6k60rr9";
-  };
-
 in stdenv.mkDerivation rec {
   name = "msmtp-${version}";
   version = "1.6.6";
@@ -30,17 +20,13 @@ in stdenv.mkDerivation rec {
   ];
 
   buildInputs = [ openssl gnutls gsasl libidn ]
-    ++ lib.optional stdenv.isDarwin Security
-    ++ lib.optionals preferNonBlock [ nonblock eject ];
+    ++ stdenv.lib.optional stdenv.isDarwin Security;
   nativeBuildInputs = [ autoreconfHook pkgconfig ];
 
-  enableParallelBuilding = true;
-
   configureFlags =
     stdenv.lib.optional stdenv.isDarwin [ "--with-macosx-keyring" ];
 
   postInstall = ''
-    ${lib.optionalString (!preferNonBlock) ''
     substitute scripts/msmtpq/msmtpq $out/bin/msmtpq \
       --replace @msmtp@      $out/bin/msmtp \
       --replace @nc@         ${netcat-gnu}/bin/nc \
@@ -50,23 +36,6 @@ in stdenv.mkDerivation rec {
 
     substitute scripts/msmtpq/msmtp-queue $out/bin/msmtp-queue \
       --replace @msmtpq@ $out/bin/msmtpq
-    ''}
-    ${lib.optionalString preferNonBlock ''
-    mkdir -p $out/lib/systemd/user
-    cp ${nonblock}/msmtp* $out/bin/
-    cp ${nonblock}/systemd/* $out/lib/systemd/user
-    for f in $out/bin/msmtpq* ; do
-      sed $f -i -r \
-        -e 's|^QUEUE_DIR.*|QUEUE_DIR="''${MSMTP_QUEUE:-''${XDG_DATA_HOME:-$HOME/.local/share}/mail.queue}"|' \
-        -e 's|^CONFIG.*|CONFIG="''${XDG_CONFIG_HOME:-$HOME/.config}/msmtprc"|' \
-        -e 's| flock | ${eject}/bin/flock |'
-    done
-    for f in $out/lib/systemd/user/* ; do
-      substituteInPlace $f \
-        --replace /usr/local               $out \
-        --replace .local/share/mail.queue  .cache/msmtp/queue
-    done
-    ''}
 
     chmod +x $out/bin/*
   '';