mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-29 14:57:28 +03:00
mdadm: use shared system-sendmail
This commit is contained in:
parent
50bb0afa7c
commit
b074a40f74
@ -1,18 +1,5 @@
|
||||
{ stdenv, writeScript
|
||||
, fetchurl, groff
|
||||
}:
|
||||
{ stdenv, writeScript, fetchurl, groff, system-sendmail }:
|
||||
|
||||
let
|
||||
sendmail-script = writeScript "sendmail-script" ''
|
||||
#!/bin/sh
|
||||
|
||||
if [ -x /run/wrappers/bin/sendmail ]; then
|
||||
/run/wrappers/bin/sendmail "$@"
|
||||
else
|
||||
/run/current-system/sw/bin/sendmail "$@"
|
||||
fi
|
||||
'';
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
name = "mdadm-4.1";
|
||||
|
||||
@ -23,7 +10,7 @@ stdenv.mkDerivation rec {
|
||||
|
||||
# This is to avoid self-references, which causes the initrd to explode
|
||||
# in size and in turn prevents mdraid systems from booting.
|
||||
allowedReferences = [ stdenv.cc.libc.out sendmail-script ];
|
||||
allowedReferences = [ stdenv.cc.libc.out system-sendmail ];
|
||||
|
||||
patches = [ ./no-self-references.patch ];
|
||||
|
||||
@ -40,7 +27,7 @@ stdenv.mkDerivation rec {
|
||||
preConfigure = ''
|
||||
sed -e 's@/lib/udev@''${out}/lib/udev@' \
|
||||
-e 's@ -Werror @ @' \
|
||||
-e 's@/usr/sbin/sendmail@${sendmail-script}@' -i Makefile
|
||||
-e 's@/usr/sbin/sendmail@${system-sendmail}@' -i Makefile
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
|
Loading…
Reference in New Issue
Block a user