2021-01-15 22:18:51 +00:00
|
|
|
{ lib, stdenv, fetchurl }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "procmail";
|
2023-01-11 07:51:40 +00:00
|
|
|
version = "3.24";
|
2021-12-06 16:07:01 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2023-01-11 07:51:40 +00:00
|
|
|
url = "https://github.com/BuGlessRB/procmail/archive/refs/tags/v${version}.tar.gz";
|
|
|
|
sha256 = "UU6kMzOXg+ld+TIeeUdx5Ih7mCOsVf2yRpcCz2m9OYk=";
|
2021-12-06 16:07:01 +00:00
|
|
|
};
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
# getline is defined differently in glibc now. So rename it.
|
|
|
|
# Without the .PHONY target "make install" won't install anything on Darwin.
|
|
|
|
postPatch = ''
|
2021-12-06 16:07:01 +00:00
|
|
|
sed -i Makefile \
|
|
|
|
-e "s%^RM.*$%#%" \
|
|
|
|
-e "s%^BASENAME.*%\BASENAME=$out%" \
|
|
|
|
-e "s%^LIBS=.*%LIBS=-lm%"
|
2020-04-24 23:36:52 +00:00
|
|
|
sed -e "s%getline%thisgetline%g" -i src/*.c src/*.h
|
|
|
|
sed -e "3i\
|
2021-12-06 16:07:01 +00:00
|
|
|
.PHONY: install
|
|
|
|
" -i Makefile
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Mail processing and filtering utility";
|
2023-01-11 07:51:40 +00:00
|
|
|
homepage = "https://github.com/BuGlessRB/procmail/";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.gpl2;
|
|
|
|
platforms = platforms.unix;
|
|
|
|
maintainers = with maintainers; [ gebner ];
|
|
|
|
};
|
|
|
|
}
|