diff options
author | Alyssa Ross <hi@alyssa.is> | 2021-04-09 18:28:16 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2021-04-12 18:46:15 +0000 |
commit | fd2e737e0678ee7d8081baef05b305146a2c0034 (patch) | |
tree | ac3e9b27576a0382335532d126f9a66d486bc638 /nixpkgs/pkgs/development/libraries/openldap/default.nix | |
parent | cc207d720b6aa836e256c1ee9842bc739e630a8a (diff) | |
parent | 9e377a6ce42dccd9b624ae4ce8f978dc892ba0e2 (diff) | |
download | nixlib-fd2e737e0678ee7d8081baef05b305146a2c0034.tar nixlib-fd2e737e0678ee7d8081baef05b305146a2c0034.tar.gz nixlib-fd2e737e0678ee7d8081baef05b305146a2c0034.tar.bz2 nixlib-fd2e737e0678ee7d8081baef05b305146a2c0034.tar.lz nixlib-fd2e737e0678ee7d8081baef05b305146a2c0034.tar.xz nixlib-fd2e737e0678ee7d8081baef05b305146a2c0034.tar.zst nixlib-fd2e737e0678ee7d8081baef05b305146a2c0034.zip |
Merge remote-tracking branch 'nixpkgs/nixos-unstable'
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/openldap/default.nix')
-rw-r--r-- | nixpkgs/pkgs/development/libraries/openldap/default.nix | 28 |
1 files changed, 16 insertions, 12 deletions
diff --git a/nixpkgs/pkgs/development/libraries/openldap/default.nix b/nixpkgs/pkgs/development/libraries/openldap/default.nix index a71b2a61910e..39831a3baf08 100644 --- a/nixpkgs/pkgs/development/libraries/openldap/default.nix +++ b/nixpkgs/pkgs/development/libraries/openldap/default.nix @@ -1,12 +1,15 @@ -{ lib, stdenv, fetchurl, openssl, cyrus_sasl, db, groff, libtool }: +{ lib, stdenv, fetchurl, openssl, db, groff, libtool +, withCyrusSasl ? true +, cyrus_sasl +}: stdenv.mkDerivation rec { pname = "openldap"; - version = "2.4.57"; + version = "2.4.58"; src = fetchurl { url = "https://www.openldap.org/software/download/OpenLDAP/openldap-release/${pname}-${version}.tgz"; - sha256 = "sha256-x7pH4ebstbQ289Qygd9Xq+/6mSYhQa7IImKLwiD2tFo="; + sha256 = "sha256-V7WSVL4V0L9qmrPVFMHAV3ewISMpFTMTSofJRGj49Hs="; }; # TODO: separate "out" and "bin" @@ -37,8 +40,7 @@ stdenv.mkDerivation rec { ] ++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [ "--with-yielding_select=yes" "ac_cv_func_memcmp_working=yes" - ] ++ lib.optional (openssl == null) "--without-tls" - ++ lib.optional (cyrus_sasl == null) "--without-cyrus-sasl" + ] ++ lib.optional (!withCyrusSasl) "--without-cyrus-sasl" ++ lib.optional stdenv.isFreeBSD "--with-pic"; postBuild = '' @@ -54,19 +56,21 @@ stdenv.mkDerivation rec { "moduledir=$(out)/lib/modules" ]; - # 1. Fixup broken libtool - # 2. Libraries left in the build location confuse `patchelf --shrink-rpath` + # 1. Libraries left in the build location confuse `patchelf --shrink-rpath` # Delete these to let patchelf discover the right path instead. # FIXME: that one can be removed when https://github.com/NixOS/patchelf/pull/98 # is in Nixpkgs patchelf. + # 2. Fixup broken libtool for openssl and cyrus_sasl (if it is not disabled) preFixup = '' - sed -e 's,-lsasl2,-L${cyrus_sasl.out}/lib -lsasl2,' \ - -e 's,-lssl,-L${openssl.out}/lib -lssl,' \ - -i $out/lib/libldap.la -i $out/lib/libldap_r.la - - rm -rf $out/var + rm -r $out/var rm -r libraries/*/.libs rm -r contrib/slapd-modules/passwd/*/.libs + for f in $out/lib/libldap.la $out/lib/libldap_r.la; do + substituteInPlace "$f" --replace '-lssl' '-L${openssl.out}/lib -lssl' + '' + lib.optionalString withCyrusSasl '' + substituteInPlace "$f" --replace '-lsasl2' '-L${cyrus_sasl.out}/lib -lsasl2' + '' + '' + done ''; postInstall = '' |