2021-08-13 21:22:20 +01:00
|
|
|
{ lib, stdenv, fetchFromGitHub, makeWrapper, perlPackages, installShellFiles }:
|
2018-12-15 03:50:31 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "sieve-connect";
|
2019-06-18 13:08:32 +01:00
|
|
|
version = "0.90";
|
2018-07-22 19:49:28 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "philpennock";
|
|
|
|
repo = "sieve-connect";
|
|
|
|
rev = "v${version}";
|
2019-06-18 13:08:32 +01:00
|
|
|
sha256 = "1ghvfa5ifa68b6imh85bkmy00r93c5f9hs6d039axb73gmma580p";
|
2018-07-22 19:49:28 +01:00
|
|
|
};
|
|
|
|
|
2018-12-15 03:50:31 +00:00
|
|
|
buildInputs = [ perlPackages.perl ];
|
2021-08-13 21:22:20 +01:00
|
|
|
nativeBuildInputs = [ makeWrapper installShellFiles ];
|
2018-07-22 19:49:28 +01:00
|
|
|
|
|
|
|
preBuild = ''
|
|
|
|
# Fixes failing build when not building in git repo
|
|
|
|
mkdir .git
|
|
|
|
touch .git/HEAD
|
|
|
|
echo "${version}" > versionfile
|
|
|
|
echo "$(date +%Y-%m-%d)" > datefile
|
|
|
|
'';
|
|
|
|
|
2018-12-15 03:50:31 +00:00
|
|
|
buildFlags = [ "PERL5LIB=${perlPackages.makePerlPath [ perlPackages.FileSlurp ]}" "bin" "man" ];
|
2018-07-22 19:49:28 +01:00
|
|
|
|
|
|
|
installPhase = ''
|
2021-08-13 21:22:20 +01:00
|
|
|
mkdir -p $out/bin
|
2018-07-22 19:49:28 +01:00
|
|
|
install -m 755 sieve-connect $out/bin
|
2021-08-13 21:22:20 +01:00
|
|
|
installManPage sieve-connect.1
|
2018-07-22 19:49:28 +01:00
|
|
|
|
|
|
|
wrapProgram $out/bin/sieve-connect \
|
2018-12-15 03:50:31 +00:00
|
|
|
--prefix PERL5LIB : "${with perlPackages; makePerlPath [
|
2018-12-14 15:40:36 +00:00
|
|
|
AuthenSASL Socket6 IOSocketInet6 IOSocketSSL NetSSLeay NetDNS
|
2018-12-15 03:50:31 +00:00
|
|
|
TermReadKey TermReadLineGnu ]}"
|
2018-07-22 19:49:28 +01:00
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2018-07-22 19:49:28 +01:00
|
|
|
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.
|
|
|
|
'';
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://github.com/philpennock/sieve-connect";
|
2018-07-22 19:49:28 +01:00
|
|
|
license = licenses.bsd3;
|
|
|
|
platforms = platforms.unix;
|
|
|
|
maintainers = with maintainers; [ das_j ];
|
|
|
|
};
|
|
|
|
}
|