diff options
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/kerberos')
-rw-r--r-- | nixpkgs/pkgs/development/libraries/kerberos/krb5.nix | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/nixpkgs/pkgs/development/libraries/kerberos/krb5.nix b/nixpkgs/pkgs/development/libraries/kerberos/krb5.nix index fdf01c195af5..bfa2974bdc5b 100644 --- a/nixpkgs/pkgs/development/libraries/kerberos/krb5.nix +++ b/nixpkgs/pkgs/development/libraries/kerberos/krb5.nix @@ -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; [ |