Winter a19cd4ffb1 Revert "treewide: replace rev with tag"
This reverts commit 65a333600d5c88a98d674f637d092807cfc12253.

This wasn't tested for correctness with something like fodwatch [0],
and should not have been (self-)merged so quickly, especially without
further review.

It also resulted in the breakage of at least one package [1] (and that's
the one we know of and was caught).

A few packages that were updated in between this commit and this revert
were not reverted back to using `rev`, but other than that, this is a
1:1 revert.

[0]: https://codeberg.org/raphaelr/fodwatch
[1]: https://github.com/NixOS/nixpkgs/pull/396904 / 758551e4587d75882aebc21a04bee960418f8ce9
2025-04-08 02:57:25 -04:00

76 lines
1.7 KiB
Nix

{
lib,
stdenv,
fetchFromGitHub,
makeWrapper,
perlPackages,
installShellFiles,
}:
stdenv.mkDerivation rec {
pname = "sieve-connect";
version = "0.90";
src = fetchFromGitHub {
owner = "philpennock";
repo = "sieve-connect";
rev = "v${version}";
sha256 = "1ghvfa5ifa68b6imh85bkmy00r93c5f9hs6d039axb73gmma580p";
};
buildInputs = [ perlPackages.perl ];
nativeBuildInputs = [
makeWrapper
installShellFiles
];
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=${perlPackages.makePerlPath [ perlPackages.FileSlurp ]}"
"bin"
"man"
];
installPhase = ''
mkdir -p $out/bin
install -m 755 sieve-connect $out/bin
installManPage sieve-connect.1
wrapProgram $out/bin/sieve-connect \
--prefix PERL5LIB : "${
with perlPackages;
makePerlPath [
AuthenSASL
Socket6
IOSocketINET6
IOSocketSSL
NetSSLeay
NetDNS
TermReadKey
TermReadLineGnu
]
}"
'';
meta = with lib; {
description = "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 ];
mainProgram = "sieve-connect";
};
}