mail2-nixos-config/nixos-mailserver/sieve-after.nix
2024-05-20 20:59:26 +02:00

21 lines
417 B
Nix

{ stdenv, dovecot_pigeonhole}:
stdenv.mkDerivation rec {
name = "sieve-after";
src = ./sieve-after;
phases = [ "copyPhase" "compilePhase" ];
copyPhase = ''
cd $src
mkdir $out
cp -Rv $src/. $out/
find $out -type d -exec chmod -c 0755 {} \;
set +x
'';
compilePhase = ''
find $out -iname '*.sieve' -print0 | xargs -t -0 -n1 ${dovecot_pigeonhole}/bin/sievec -c /dev/null
'';
}