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