about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/kerberos
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2024-02-26 16:20:28 +0100
committerAlyssa Ross <hi@alyssa.is>2024-02-26 16:20:28 +0100
commit647438344bfc1f77791391e2b4f98eef865c63dc (patch)
treeef580867fc6cc413940e4330d939cf1afda082cb /nixpkgs/pkgs/development/libraries/kerberos
parentb084c6a0fab7f32c904c5c8e8db8dddcefbe507f (diff)
parente3474e1d1e53b70e2b2af73ea26d6340e82f6b8b (diff)
downloadnixlib-647438344bfc1f77791391e2b4f98eef865c63dc.tar
nixlib-647438344bfc1f77791391e2b4f98eef865c63dc.tar.gz
nixlib-647438344bfc1f77791391e2b4f98eef865c63dc.tar.bz2
nixlib-647438344bfc1f77791391e2b4f98eef865c63dc.tar.lz
nixlib-647438344bfc1f77791391e2b4f98eef865c63dc.tar.xz
nixlib-647438344bfc1f77791391e2b4f98eef865c63dc.tar.zst
nixlib-647438344bfc1f77791391e2b4f98eef865c63dc.zip
Merge commit 'e3474e1d1e53'
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/kerberos')
-rw-r--r--nixpkgs/pkgs/development/libraries/kerberos/krb5.nix8
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; [