summary refs log tree commit diff
path: root/pkgs/applications/networking/sieve-connect/default.nix
diff options
context:
space:
mode:
authorLluís Batlle i Rossell <viric@viric.name>2018-07-28 19:25:14 +0200
committerLluís Batlle i Rossell <viric@viric.name>2018-07-28 19:25:14 +0200
commitf54b387b63299245092d9bbf09cb562bac125461 (patch)
tree0c09809c0964d7bd931c6c8d1a7d19dcac342abd /pkgs/applications/networking/sieve-connect/default.nix
parent66d7126255b96a3d9c1cc0cdd7c2cd79d1789758 (diff)
parent0fa2cbf59f7f68a8b9213a9cf9d2cd6dd2e518cc (diff)
downloadnixpkgs-f54b387b63299245092d9bbf09cb562bac125461.tar
nixpkgs-f54b387b63299245092d9bbf09cb562bac125461.tar.gz
nixpkgs-f54b387b63299245092d9bbf09cb562bac125461.tar.bz2
nixpkgs-f54b387b63299245092d9bbf09cb562bac125461.tar.lz
nixpkgs-f54b387b63299245092d9bbf09cb562bac125461.tar.xz
nixpkgs-f54b387b63299245092d9bbf09cb562bac125461.tar.zst
nixpkgs-f54b387b63299245092d9bbf09cb562bac125461.zip
Merge remote-tracking branch 'central/master' into viric_clean
Diffstat (limited to 'pkgs/applications/networking/sieve-connect/default.nix')
-rw-r--r--pkgs/applications/networking/sieve-connect/default.nix48
1 files changed, 48 insertions, 0 deletions
diff --git a/pkgs/applications/networking/sieve-connect/default.nix b/pkgs/applications/networking/sieve-connect/default.nix
new file mode 100644
index 00000000000..78910d1ecf6
--- /dev/null
+++ b/pkgs/applications/networking/sieve-connect/default.nix
@@ -0,0 +1,48 @@
+{ stdenv, fetchFromGitHub, makeWrapper, perl, perlPackages }: stdenv.mkDerivation rec {
+  name = "sieve-connect-${version}";
+  version = "0.89";
+
+  src = fetchFromGitHub {
+    owner = "philpennock";
+    repo = "sieve-connect";
+    rev = "v${version}";
+    sha256 = "0g7cv29wd5673inl4c87xb802k86bj6gcwh131xrbbg0a0g1c8fp";
+  };
+
+  buildInputs = [ perl ];
+  nativeBuildInputs = [ makeWrapper ];
+
+  preBuild = ''
+    # Fixes failing build when not building in git repo
+    mkdir .git
+    touch .git/HEAD
+    echo "${version}" > versionfile
+    echo "$(date +%Y-%m-%d)" > datefile
+  '';
+
+  buildFlags = [ "PERL5LIB=${stdenv.lib.makePerlPath [ perlPackages.FileSlurp ]}" "bin" "man" ];
+
+  installPhase = ''
+    mkdir -p $out/bin $out/share/man/man1
+    install -m 755 sieve-connect $out/bin
+    gzip -c sieve-connect.1 > $out/share/man/man1/sieve-connect.1.gz
+
+    wrapProgram $out/bin/sieve-connect \
+      --prefix PERL5LIB : "${stdenv.lib.makePerlPath (with perlPackages; [
+        AuthenSASL Socket6 IOSocketInet6 IOSocketSSL NetSSLeay NetDNS PodUsage
+        TermReadKey TermReadLineGnu ])}"
+  '';
+
+  meta = with stdenv.lib; {
+    description = "A client for the MANAGESIEVE Protocol";
+    longDescription = ''
+      This is sieve-connect. A client for the ManageSieve protocol,
+      as specifed in RFC 5804. Historically, this was MANAGESIEVE as
+      implemented by timsieved in Cyrus IMAP.
+    '';
+    homepage = https://github.com/philpennock/sieve-connect;
+    license = licenses.bsd3;
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ das_j ];
+  };
+}