mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-20 21:17:46 +00:00
27 lines
713 B
Nix
27 lines
713 B
Nix
|
{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 {
|
||
|
url = ftp://ftp.nluug.nl/pub/gnu/coreutils/coreutils-6.7.tar.bz2;
|
||
|
md5 = "a16465d0856cd011a1acc1c21040b7f4";
|
||
|
};
|
||
|
patches = [
|
||
|
# PAM patch taken from SUSE's coreutils-6.7-5.src.rpm.
|
||
|
./su-pam.patch
|
||
|
];
|
||
|
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
|
||
|
";
|
||
|
}
|