2007-01-11 15:22:59 +00:00
|
|
|
{stdenv, fetchurl, pam}:
|
|
|
|
|
|
|
|
# This is just coreutils, except that we only build su, with the PAM
|
|
|
|
# patch. We build su separately because we don't want to give all of
|
|
|
|
# coreutils a dependency on PAM.
|
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
|
|
|
name = "su-6.7";
|
|
|
|
src = fetchurl {
|
2007-08-27 14:42:00 +01:00
|
|
|
url = mirror://gnu/coreutils/coreutils-6.7.tar.bz2;
|
2007-01-11 15:22:59 +00:00
|
|
|
md5 = "a16465d0856cd011a1acc1c21040b7f4";
|
|
|
|
};
|
|
|
|
patches = [
|
|
|
|
# PAM patch taken from SUSE's coreutils-6.7-5.src.rpm.
|
|
|
|
./su-pam.patch
|
2007-10-11 04:41:29 +01:00
|
|
|
../coreutils/gnulib-futimens.patch
|
2007-01-11 15:22:59 +00:00
|
|
|
];
|
|
|
|
buildInputs = [pam];
|
|
|
|
buildPhase = "
|
|
|
|
make -C lib
|
|
|
|
make -C src su su_OBJECTS=\"su.o getdef.o\" CFLAGS=\"-DUSE_PAM\" LDFLAGS=\"-lpam -lpam_misc -ldl\"
|
|
|
|
";
|
|
|
|
installPhase = "
|
|
|
|
ensureDir $out/bin
|
|
|
|
cp src/su $out/bin
|
|
|
|
";
|
|
|
|
}
|