krb5: add support for building with LDAP database
This commit is contained in:
parent
e718d5841a
commit
7cfa2e6f77
@ -14,6 +14,7 @@
|
|||||||
# This is called "staticOnly" because krb5 does not support
|
# This is called "staticOnly" because krb5 does not support
|
||||||
# builting both static and shared, see below.
|
# builting both static and shared, see below.
|
||||||
, staticOnly ? false
|
, staticOnly ? false
|
||||||
|
, withLdap ? false
|
||||||
, withVerto ? false
|
, withVerto ? false
|
||||||
}:
|
}:
|
||||||
|
|
||||||
@ -25,6 +26,9 @@
|
|||||||
let
|
let
|
||||||
libOnly = type == "lib";
|
libOnly = type == "lib";
|
||||||
in
|
in
|
||||||
|
|
||||||
|
assert withLdap -> !libOnly;
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "${type}krb5";
|
pname = "${type}krb5";
|
||||||
version = "1.21.2";
|
version = "1.21.2";
|
||||||
@ -40,6 +44,7 @@ stdenv.mkDerivation rec {
|
|||||||
# krb5's ./configure does not allow passing --enable-shared and --enable-static at the same time.
|
# krb5's ./configure does not allow passing --enable-shared and --enable-static at the same time.
|
||||||
# See https://bbs.archlinux.org/viewtopic.php?pid=1576737#p1576737
|
# See https://bbs.archlinux.org/viewtopic.php?pid=1576737#p1576737
|
||||||
++ lib.optionals staticOnly [ "--enable-static" "--disable-shared" ]
|
++ lib.optionals staticOnly [ "--enable-static" "--disable-shared" ]
|
||||||
|
++ lib.optional withLdap "--with-ldap"
|
||||||
++ lib.optional withVerto "--with-system-verto"
|
++ lib.optional withVerto "--with-system-verto"
|
||||||
++ lib.optional stdenv.isFreeBSD ''WARN_CFLAGS=""''
|
++ lib.optional stdenv.isFreeBSD ''WARN_CFLAGS=""''
|
||||||
++ lib.optionals (stdenv.buildPlatform != stdenv.hostPlatform)
|
++ lib.optionals (stdenv.buildPlatform != stdenv.hostPlatform)
|
||||||
@ -55,7 +60,8 @@ stdenv.mkDerivation rec {
|
|||||||
|
|
||||||
buildInputs = [ openssl ]
|
buildInputs = [ openssl ]
|
||||||
++ lib.optionals (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.libc != "bionic" && !(stdenv.hostPlatform.useLLVM or false)) [ keyutils ]
|
++ lib.optionals (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.libc != "bionic" && !(stdenv.hostPlatform.useLLVM or false)) [ keyutils ]
|
||||||
++ lib.optionals (!libOnly) [ openldap libedit ]
|
++ lib.optionals (!libOnly) [ libedit ]
|
||||||
|
++ lib.optionals withLdap [ openldap ]
|
||||||
++ lib.optionals withVerto [ libverto ];
|
++ lib.optionals withVerto [ libverto ];
|
||||||
|
|
||||||
propagatedBuildInputs = lib.optionals stdenv.isDarwin (with darwin.apple_sdk; [
|
propagatedBuildInputs = lib.optionals stdenv.isDarwin (with darwin.apple_sdk; [
|
||||||
|
Loading…
Reference in New Issue
Block a user