diff options
author | Alyssa Ross <hi@alyssa.is> | 2023-06-16 06:56:35 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2023-06-16 06:56:35 +0000 |
commit | 99fcaeccb89621dd492203ce1f2d551c06f228ed (patch) | |
tree | 41cb730ae07383004789779b0f6e11cb3f4642a3 /nixpkgs/pkgs/development/libraries/apr-util | |
parent | 59c5f5ac8682acc13bb22bc29c7cf02f7d75f01f (diff) | |
parent | 75a5ebf473cd60148ba9aec0d219f72e5cf52519 (diff) | |
download | nixlib-99fcaeccb89621dd492203ce1f2d551c06f228ed.tar nixlib-99fcaeccb89621dd492203ce1f2d551c06f228ed.tar.gz nixlib-99fcaeccb89621dd492203ce1f2d551c06f228ed.tar.bz2 nixlib-99fcaeccb89621dd492203ce1f2d551c06f228ed.tar.lz nixlib-99fcaeccb89621dd492203ce1f2d551c06f228ed.tar.xz nixlib-99fcaeccb89621dd492203ce1f2d551c06f228ed.tar.zst nixlib-99fcaeccb89621dd492203ce1f2d551c06f228ed.zip |
Merge branch 'nixos-unstable' of https://github.com/NixOS/nixpkgs
Conflicts: nixpkgs/nixos/modules/config/console.nix nixpkgs/nixos/modules/services/mail/mailman.nix nixpkgs/nixos/modules/services/mail/public-inbox.nix nixpkgs/nixos/modules/services/mail/rss2email.nix nixpkgs/nixos/modules/services/networking/ssh/sshd.nix nixpkgs/pkgs/applications/networking/instant-messengers/dino/default.nix nixpkgs/pkgs/applications/networking/irc/weechat/default.nix nixpkgs/pkgs/applications/window-managers/sway/default.nix nixpkgs/pkgs/build-support/go/module.nix nixpkgs/pkgs/build-support/rust/build-rust-package/default.nix nixpkgs/pkgs/development/interpreters/python/default.nix nixpkgs/pkgs/development/node-packages/overrides.nix nixpkgs/pkgs/development/tools/b4/default.nix nixpkgs/pkgs/servers/dict/dictd-db.nix nixpkgs/pkgs/servers/mail/public-inbox/default.nix nixpkgs/pkgs/tools/security/pinentry/default.nix nixpkgs/pkgs/tools/text/unoconv/default.nix nixpkgs/pkgs/top-level/all-packages.nix
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/apr-util')
-rw-r--r-- | nixpkgs/pkgs/development/libraries/apr-util/default.nix | 49 | ||||
-rw-r--r-- | nixpkgs/pkgs/development/libraries/apr-util/fix-libxcrypt-build.patch | 14 |
2 files changed, 41 insertions, 22 deletions
diff --git a/nixpkgs/pkgs/development/libraries/apr-util/default.nix b/nixpkgs/pkgs/development/libraries/apr-util/default.nix index b9756e0e1a1a..dd4b157d7a23 100644 --- a/nixpkgs/pkgs/development/libraries/apr-util/default.nix +++ b/nixpkgs/pkgs/development/libraries/apr-util/default.nix @@ -2,7 +2,7 @@ , sslSupport ? true, openssl , bdbSupport ? true, db , ldapSupport ? !stdenv.isCygwin, openldap -, libiconv +, libiconv, libxcrypt , cyrus_sasl, autoreconfHook }: @@ -10,8 +10,6 @@ assert sslSupport -> openssl != null; assert bdbSupport -> db != null; assert ldapSupport -> openldap != null; -with lib; - stdenv.mkDerivation rec { pname = "apr-util"; version = "1.6.1"; @@ -21,37 +19,44 @@ stdenv.mkDerivation rec { sha256 = "0nq3s1yn13vplgl6qfm09f7n0wm08malff9s59bqf9nid9xjzqfk"; }; - patches = optional stdenv.isFreeBSD ./include-static-dependencies.patch; + patches = [ ./fix-libxcrypt-build.patch ] + ++ lib.optional stdenv.isFreeBSD ./include-static-dependencies.patch; + + NIX_CFLAGS_LINK = [ "-lcrypt" ]; outputs = [ "out" "dev" ]; outputBin = "dev"; - nativeBuildInputs = [ makeWrapper ]; - buildInputs = optional stdenv.isFreeBSD autoreconfHook; + nativeBuildInputs = [ makeWrapper ] ++ lib.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 + ++ lib.optional (!stdenv.isCygwin) "--with-crypto" + ++ lib.optional sslSupport "--with-openssl=${openssl.dev}" + ++ lib.optional bdbSupport "--with-berkeley-db=${db.dev}" + ++ lib.optional ldapSupport "--with-ldap=ldap" + ++ lib.optionals stdenv.isCygwin [ "--without-pgsql" "--without-sqlite2" "--without-sqlite3" "--without-freetds" "--without-berkeley-db" "--without-crypto" ] ; - # For some reason, db version 6.9 is selected when cross-compiling. - # It's unclear as to why, it requires someone with more autotools / configure knowledge to go deeper into that. - # Always replacing the link flag with a generic link flag seems to help though, so let's do that for now. - postConfigure = lib.optionalString (stdenv.buildPlatform != stdenv.hostPlatform) '' - substituteInPlace Makefile \ - --replace "-ldb-6.9" "-ldb" + postConfigure = '' + echo '#define APR_HAVE_CRYPT_H 1' >> confdefs.h + '' + + # For some reason, db version 6.9 is selected when cross-compiling. + # It's unclear as to why, it requires someone with more autotools / configure knowledge to go deeper into that. + # Always replacing the link flag with a generic link flag seems to help though, so let's do that for now. + lib.optionalString (stdenv.buildPlatform != stdenv.hostPlatform) '' + substituteInPlace Makefile \ + --replace "-ldb-6.9" "-ldb" + substituteInPlace apu-1-config \ + --replace "-ldb-6.9" "-ldb" ''; - propagatedBuildInputs = [ apr expat libiconv ] - ++ optional sslSupport openssl - ++ optional bdbSupport db - ++ optional ldapSupport openldap - ++ optional stdenv.isFreeBSD cyrus_sasl; + propagatedBuildInputs = [ apr expat libiconv libxcrypt ] + ++ lib.optional sslSupport openssl + ++ lib.optional bdbSupport db + ++ lib.optional ldapSupport openldap + ++ lib.optional stdenv.isFreeBSD cyrus_sasl; postInstall = '' for f in $out/lib/*.la $out/lib/apr-util-1/*.la $dev/bin/apu-1-config; do diff --git a/nixpkgs/pkgs/development/libraries/apr-util/fix-libxcrypt-build.patch b/nixpkgs/pkgs/development/libraries/apr-util/fix-libxcrypt-build.patch new file mode 100644 index 000000000000..2994e5de0f78 --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/apr-util/fix-libxcrypt-build.patch @@ -0,0 +1,14 @@ +diff --git a/crypto/apr_passwd.c b/crypto/apr_passwd.c +index c961de2..a397f27 100644 +--- a/crypto/apr_passwd.c ++++ b/crypto/apr_passwd.c +@@ -24,9 +24,7 @@ + #if APR_HAVE_STRING_H + #include <string.h> + #endif +-#if APR_HAVE_CRYPT_H + #include <crypt.h> +-#endif + #if APR_HAVE_UNISTD_H + #include <unistd.h> + #endif |