mirror of
https://github.com/SebastianWendel/nixpkgs.git
synced 2024-09-20 04:19:00 +02:00
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
|
||||
# builting both static and shared, see below.
|
||||
, staticOnly ? false
|
||||
, withLdap ? false
|
||||
, withVerto ? false
|
||||
}:
|
||||
|
||||
|
@ -25,6 +26,9 @@
|
|||
let
|
||||
libOnly = type == "lib";
|
||||
in
|
||||
|
||||
assert withLdap -> !libOnly;
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "${type}krb5";
|
||||
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.
|
||||
# See https://bbs.archlinux.org/viewtopic.php?pid=1576737#p1576737
|
||||
++ lib.optionals staticOnly [ "--enable-static" "--disable-shared" ]
|
||||
++ lib.optional withLdap "--with-ldap"
|
||||
++ lib.optional withVerto "--with-system-verto"
|
||||
++ lib.optional stdenv.isFreeBSD ''WARN_CFLAGS=""''
|
||||
++ lib.optionals (stdenv.buildPlatform != stdenv.hostPlatform)
|
||||
|
@ -55,7 +60,8 @@ stdenv.mkDerivation rec {
|
|||
|
||||
buildInputs = [ openssl ]
|
||||
++ 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 ];
|
||||
|
||||
propagatedBuildInputs = lib.optionals stdenv.isDarwin (with darwin.apple_sdk; [
|
||||
|
|
Loading…
Reference in a new issue