diff options
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/openldap/default.nix')
-rw-r--r-- | nixpkgs/pkgs/development/libraries/openldap/default.nix | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/nixpkgs/pkgs/development/libraries/openldap/default.nix b/nixpkgs/pkgs/development/libraries/openldap/default.nix index 39831a3baf08..f9e2b3c0b3fc 100644 --- a/nixpkgs/pkgs/development/libraries/openldap/default.nix +++ b/nixpkgs/pkgs/development/libraries/openldap/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchurl, openssl, db, groff, libtool +{ lib, stdenv, fetchurl, openssl, db, groff, libtool, libsodium , withCyrusSasl ? true , cyrus_sasl }: @@ -19,7 +19,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ groff ]; - buildInputs = [ openssl cyrus_sasl db libtool ]; + buildInputs = [ openssl cyrus_sasl db libsodium libtool ]; # Disable install stripping as it breaks cross-compiling. # We strip binaries anyway in fixupPhase. @@ -30,6 +30,10 @@ stdenv.mkDerivation rec { "CC=${stdenv.cc.targetPrefix}cc" ]; + preConfigure = lib.optionalString (lib.versionAtLeast stdenv.hostPlatform.darwinMinVersion "11") '' + MACOSX_DEPLOYMENT_TARGET=10.16 + ''; + configureFlags = [ "--enable-overlays" "--disable-dependency-tracking" # speeds up one-time build @@ -46,6 +50,7 @@ stdenv.mkDerivation rec { postBuild = '' make $makeFlags CC=$CC -C contrib/slapd-modules/passwd/sha2 make $makeFlags CC=$CC -C contrib/slapd-modules/passwd/pbkdf2 + make $makeFlags CC=$CC -C contrib/slapd-modules/passwd/argon2 ''; doCheck = false; # needs a running LDAP server @@ -54,6 +59,9 @@ stdenv.mkDerivation rec { "sysconfdir=$(out)/etc" "localstatedir=$(out)/var" "moduledir=$(out)/lib/modules" + # The argon2 module hardcodes /usr/bin/install as the path for the + # `install` binary, which is overridden here. + "INSTALL=install" ]; # 1. Libraries left in the build location confuse `patchelf --shrink-rpath` @@ -76,6 +84,7 @@ stdenv.mkDerivation rec { postInstall = '' make $installFlags install -C contrib/slapd-modules/passwd/sha2 make $installFlags install -C contrib/slapd-modules/passwd/pbkdf2 + make $installFlags install-lib -C contrib/slapd-modules/passwd/argon2 chmod +x "$out"/lib/*.{so,dylib} ''; |