Author: viric
Date: Sun Oct 10 11:07:15 2010
New Revision: 24196
URL: https://svn.nixos.org/websvn/nix/?rev=24196&sc=1
Log:
Making the vixie cron have a configurable sendmail path (for nixos)
Modified:
nixpkgs/trunk/pkgs/tools/system/cron/default.nix
Modified: nixpkgs/trunk/pkgs/tools/system/cron/default.nix
==============================================================================
--- nixpkgs/trunk/pkgs/tools/system/cron/default.nix Sun Oct 10 11:07:04
2010 (r24195)
+++ nixpkgs/trunk/pkgs/tools/system/cron/default.nix Sun Oct 10 11:07:15
2010 (r24196)
@@ -1,4 +1,4 @@
-{stdenv, fetchurl}:
+{stdenv, fetchurl, sendmailPath ? "/usr/sbin/sendmail"}:
stdenv.mkDerivation {
name = "cron-4.1";
@@ -9,10 +9,15 @@
unpackCmd = "(mkdir cron && cd cron && sh $curSrc)";
- preBuild = "
+ preBuild = ''
substituteInPlace Makefile --replace ' -o root' ' ' --replace 111 755
- makeFlags=\"DESTROOT=$out\"
- ";
+ makeFlags="DESTROOT=$out"
+
+ # We want to ignore the $glibc/include/paths.h definition of
+ # sendmail path
+ echo "#undef _PATH_SENDMAIL" >> pathnames.h
+ echo '#define _PATH_SENDMAIL "${sendmailPath}"' >> pathnames.h
+ '';
preInstall = "ensureDir $out/bin $out/sbin $out/share/man/man1
$out/share/man/man5 $out/share/man/man8";
_______________________________________________
nix-commits mailing list
[email protected]
http://mail.cs.uu.nl/mailman/listinfo/nix-commits