security-workarounds exim: make nixos-unstable compatible

This commit is contained in:
lassulus 2022-11-01 14:20:37 +01:00
parent c60093ed87
commit 6435c2452b

View File

@ -4,10 +4,15 @@
nixpkgs.overlays = [ nixpkgs.overlays = [
(self: super: { (self: super: {
exim = exim =
super.exim.overrideAttrs (old: { super.exim.overrideAttrs (old: let
key = if builtins.hasAttr "preBuild" old then
"preBuild"
else
"configurePhase";
in {
buildInputs = old.buildInputs ++ [ self.gnutls ]; buildInputs = old.buildInputs ++ [ self.gnutls ];
preBuild = /* sh */ '' ${key} = /* sh */ ''
${old.preBuild} ${old.${key}}
sed -Ei ' sed -Ei '
s:^USE_OPENSSL=.*:# &: s:^USE_OPENSSL=.*:# &:
s:^# (USE_GNUTLS)=.*:\1=yes: s:^# (USE_GNUTLS)=.*:\1=yes: