nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at 17.09-beta 54 lines 1.8 kB view raw
1{ stdenv, fetchurl, openssl, cyrus_sasl, db, groff, libtool }: 2 3stdenv.mkDerivation rec { 4 name = "openldap-2.4.45"; 5 6 src = fetchurl { 7 url = "http://www.openldap.org/software/download/OpenLDAP/openldap-release/${name}.tgz"; 8 sha256 = "091qvwk5dkcpp17ziabcnh3rg3m7qwzw2pihfcd1d5fdxgywzmnd"; 9 }; 10 11 # TODO: separate "out" and "bin" 12 outputs = [ "out" "dev" "man" "devdoc" ]; 13 14 enableParallelBuilding = true; 15 16 buildInputs = [ openssl cyrus_sasl db groff libtool ]; 17 18 configureFlags = 19 [ "--enable-overlays" 20 "--disable-dependency-tracking" # speeds up one-time build 21 "--enable-modules" 22 "--sysconfdir=/etc" 23 "--enable-crypt" 24 ] ++ stdenv.lib.optional (openssl == null) "--without-tls" 25 ++ stdenv.lib.optional (cyrus_sasl == null) "--without-cyrus-sasl" 26 ++ stdenv.lib.optional stdenv.isFreeBSD "--with-pic"; 27 28 installFlags = [ "sysconfdir=$(out)/etc" ]; 29 30 # 1. Fixup broken libtool 31 # 2. Libraries left in the build location confuse `patchelf --shrink-rpath` 32 # Delete these to let patchelf discover the right path instead. 33 # FIXME: that one can be removed when https://github.com/NixOS/patchelf/pull/98 34 # is in Nixpkgs patchelf. 35 preFixup = '' 36 sed -e 's,-lsasl2,-L${cyrus_sasl.out}/lib -lsasl2,' \ 37 -e 's,-lssl,-L${openssl.out}/lib -lssl,' \ 38 -i $out/lib/libldap.la -i $out/lib/libldap_r.la 39 40 rm -rf $out/var 41 rm -r libraries/*/.libs 42 ''; 43 44 postInstall = '' 45 chmod +x "$out"/lib/*.{so,dylib} 46 ''; 47 48 meta = with stdenv.lib; { 49 homepage = http://www.openldap.org/; 50 description = "An open source implementation of the Lightweight Directory Access Protocol"; 51 maintainers = with maintainers; [ lovek323 mornfall ]; 52 platforms = platforms.unix; 53 }; 54}