diff options
author | Alyssa Ross <hi@alyssa.is> | 2019-01-07 02:18:36 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2019-01-07 02:18:47 +0000 |
commit | 36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2 (patch) | |
tree | b3faaf573407b32aa645237a4d16b82778a39a92 /nixpkgs/pkgs/development/libraries/apr-util/default.nix | |
parent | 4e31070265257dc67d120c27e0f75c2344fdfa9a (diff) | |
parent | abf060725d7614bd3b9f96764262dfbc2f9c2199 (diff) | |
download | nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.gz nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.bz2 nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.lz nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.xz nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.zst nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.zip |
Add 'nixpkgs/' from commit 'abf060725d7614bd3b9f96764262dfbc2f9c2199'
git-subtree-dir: nixpkgs git-subtree-mainline: 4e31070265257dc67d120c27e0f75c2344fdfa9a git-subtree-split: abf060725d7614bd3b9f96764262dfbc2f9c2199
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/apr-util/default.nix')
-rw-r--r-- | nixpkgs/pkgs/development/libraries/apr-util/default.nix | 71 |
1 files changed, 71 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/libraries/apr-util/default.nix b/nixpkgs/pkgs/development/libraries/apr-util/default.nix new file mode 100644 index 000000000000..fe159afe6854 --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/apr-util/default.nix @@ -0,0 +1,71 @@ +{ stdenv, fetchurl, makeWrapper, apr, expat, gnused +, sslSupport ? true, openssl +, bdbSupport ? false, db +, ldapSupport ? !stdenv.isCygwin, openldap +, libiconv +, cyrus_sasl, autoreconfHook +}: + +assert sslSupport -> openssl != null; +assert bdbSupport -> db != null; +assert ldapSupport -> openldap != null; + +with stdenv.lib; + +stdenv.mkDerivation rec { + name = "apr-util-1.6.1"; + + src = fetchurl { + url = "mirror://apache/apr/${name}.tar.bz2"; + sha256 = "0nq3s1yn13vplgl6qfm09f7n0wm08malff9s59bqf9nid9xjzqfk"; + }; + + patches = optional stdenv.isFreeBSD ./include-static-dependencies.patch; + + outputs = [ "out" "dev" ]; + outputBin = "dev"; + + buildInputs = optional stdenv.isFreeBSD autoreconfHook; + + configureFlags = [ "--with-apr=${apr.dev}" "--with-expat=${expat.dev}" ] + ++ optional (!stdenv.isCygwin) "--with-crypto" + ++ optional sslSupport "--with-openssl=${openssl.dev}" + ++ optional bdbSupport "--with-berkeley-db=${db.dev}" + ++ optional ldapSupport "--with-ldap=ldap" + ++ optionals stdenv.isCygwin + [ "--without-pgsql" "--without-sqlite2" "--without-sqlite3" + "--without-freetds" "--without-berkeley-db" "--without-crypto" ] + ; + + propagatedBuildInputs = [ makeWrapper apr expat libiconv ] + ++ optional sslSupport openssl + ++ optional bdbSupport db + ++ optional ldapSupport openldap + ++ optional stdenv.isFreeBSD cyrus_sasl; + + postInstall = '' + for f in $out/lib/*.la $out/lib/apr-util-1/*.la $dev/bin/apu-1-config; do + substituteInPlace $f \ + --replace "${expat.dev}/lib" "${expat.out}/lib" \ + --replace "${db.dev}/lib" "${db.out}/lib" \ + --replace "${openssl.dev}/lib" "${openssl.out}/lib" + done + + # Give apr1 access to sed for runtime invocations. + wrapProgram $dev/bin/apu-1-config --prefix PATH : "${gnused}/bin" + ''; + + enableParallelBuilding = true; + + passthru = { + inherit sslSupport bdbSupport ldapSupport; + }; + + meta = with stdenv.lib; { + homepage = http://apr.apache.org/; + description = "A companion library to APR, the Apache Portable Runtime"; + maintainers = [ maintainers.eelco ]; + platforms = platforms.unix; + license = licenses.asl20; + }; +} |