procmail: minor cleanup

This commit is contained in:
Sandro Jäckel 2021-11-08 20:33:30 +01:00 committed by Sandro Jäckel
parent 4ee38da0c6
commit 3b30539c81
No known key found for this signature in database
GPG key ID: B1763F8651144063

View file

@ -4,6 +4,11 @@ stdenv.mkDerivation rec {
pname = "procmail";
version = "3.22";
src = fetchurl {
url = "ftp://ftp.fu-berlin.de/pub/unix/mail/procmail/procmail-${version}.tar.gz";
sha256 = "05z1c803n5cppkcq99vkyd5myff904lf9sdgynfqngfk9nrpaz08";
};
patches = [
./CVE-2014-3618.patch
(fetchurl {
@ -16,20 +21,16 @@ stdenv.mkDerivation rec {
# getline is defined differently in glibc now. So rename it.
# Without the .PHONY target "make install" won't install anything on Darwin.
postPatch = ''
sed -e "s%^RM.*$%#%" -i Makefile
sed -e "s%^BASENAME.*%\BASENAME=$out%" -i Makefile
sed -e "s%^LIBS=.*%LIBS=-lm%" -i Makefile
sed -e "s%getline%thisgetline%g" -i src/*.c src/*.h
sed -e "3i\
sed -i Makefile \
-e "s%^RM.*$%#%" \
-e "s%^BASENAME.*%\BASENAME=$out%" \
-e "s%^LIBS=.*%LIBS=-lm%"
sed -e "s%getline%thisgetline%g" -i src/*.c src/*.h
sed -e "3i\
.PHONY: install
" -i Makefile
'';
src = fetchurl {
url = "ftp://ftp.fu-berlin.de/pub/unix/mail/procmail/procmail-${version}.tar.gz";
sha256 = "05z1c803n5cppkcq99vkyd5myff904lf9sdgynfqngfk9nrpaz08";
};
meta = with lib; {
description = "Mail processing and filtering utility";
homepage = "http://www.procmail.org/";