2007-06-28 22:14:25 +00:00
|
|
|
{stdenv, fetchurl, coreutils, pam}:
|
2007-08-17 13:37:28 +00:00
|
|
|
|
2007-06-20 09:34:42 +00:00
|
|
|
stdenv.mkDerivation {
|
2007-08-17 13:37:28 +00:00
|
|
|
name = "sudo-1.6.9p4";
|
2007-06-20 09:34:42 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2007-08-17 13:37:28 +00:00
|
|
|
url = ftp://sunsite.ualberta.ca/pub/Mirror/sudo/sudo-1.6.9p4.tar.gz;
|
2007-08-17 13:37:53 +00:00
|
|
|
sha256 = "0y65f77wxsl285yr1krfh5djcwm95n39p0yb3r1xgg98gir5z7w4";
|
2007-06-20 09:34:42 +00:00
|
|
|
};
|
|
|
|
|
2007-08-17 13:37:28 +00:00
|
|
|
# `--with-stow' allows /etc/sudoers to be a symlink. Only it
|
|
|
|
# doesn't really help because the target still has to have mode 0440,
|
|
|
|
# while files in the Nix store all have mode 0444.
|
|
|
|
#configureFlags = "--with-stow";
|
2007-06-20 09:34:42 +00:00
|
|
|
|
2007-08-17 13:37:28 +00:00
|
|
|
postConfigure = "
|
|
|
|
sed -e '/_PATH_MV/d; /_PATH_VI/d' -i config.h
|
|
|
|
echo '#define _PATH_MV \"/var/run/current-system/sw/bin/mv\"' >> config.h
|
|
|
|
echo '#define _PATH_VI \"/var/run/current-system/sw/bin/vi\"' >> config.h
|
|
|
|
echo '#define EDITOR _PATH_VI' >>config.h
|
2007-06-20 09:34:42 +00:00
|
|
|
|
2007-08-17 13:37:28 +00:00
|
|
|
makeFlags=\"install_uid=$(id -u) install_gid=$(id -g)\"
|
|
|
|
installFlags=\"sudoers_uid=$(id -u) sudoers_gid=$(id -g) sysconfdir=$out/etc\"
|
|
|
|
";
|
2007-06-20 09:34:42 +00:00
|
|
|
|
2007-06-28 22:14:25 +00:00
|
|
|
buildInputs = [coreutils pam];
|
2007-06-20 09:34:42 +00:00
|
|
|
}
|