blob: 2afb20377d6bb596eedffa05bf89da052042dec2 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
{
mkDerivation,
openssl,
libradius,
}:
mkDerivation {
path = "lib/libpam/libpam";
extraPaths = [
"lib/libpam"
"contrib/openpam"
"lib/Makefile.inc"
"contrib/pam_modules"
"crypto/openssh"
];
buildInputs = [
libradius
openssl
];
MK_NIS = "no"; # TODO
# TODO
postPatch = ''
sed -E -i -e /pam_tacplus/d $BSDSRCDIR/lib/libpam/modules/modules.inc
sed -E -i -e /pam_krb5/d $BSDSRCDIR/lib/libpam/modules/modules.inc
sed -E -i -e /pam_ksu/d $BSDSRCDIR/lib/libpam/modules/modules.inc
sed -E -i -e /pam_ssh/d $BSDSRCDIR/lib/libpam/modules/modules.inc
'';
preBuild = ''
export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I$BSDSRCDIR/lib/libpam/libpam -DOPENPAM_MODULES_DIRECTORY=\"$out/lib\""
'';
MK_TESTS = "no";
postInstall = ''
make $makeFlags installconfig
export NIX_LDFLAGS="$NIX_LDFLAGS -L$out/lib"
make -C $BSDSRCDIR/lib/libpam/modules $makeFlags
make -C $BSDSRCDIR/lib/libpam/modules $makeFlags install
make -C $BSDSRCDIR/lib/libpam/modules $makeFlags installconfig
'';
}
|