mirror of
https://github.com/SebastianWendel/nixpkgs.git
synced 2024-09-20 20:39:04 +02:00
aprutil: fix build with libxcrypt
This commit is contained in:
parent
ae4e703c17
commit
77a7b43e62
|
@ -2,7 +2,7 @@
|
|||
, sslSupport ? true, openssl
|
||||
, bdbSupport ? true, db
|
||||
, ldapSupport ? !stdenv.isCygwin, openldap
|
||||
, libiconv
|
||||
, libiconv, libxcrypt
|
||||
, cyrus_sasl, autoreconfHook
|
||||
}:
|
||||
|
||||
|
@ -21,7 +21,10 @@ stdenv.mkDerivation rec {
|
|||
sha256 = "0nq3s1yn13vplgl6qfm09f7n0wm08malff9s59bqf9nid9xjzqfk";
|
||||
};
|
||||
|
||||
patches = optional stdenv.isFreeBSD ./include-static-dependencies.patch;
|
||||
patches = [ ./fix-libxcrypt-build.patch ]
|
||||
++ optional stdenv.isFreeBSD ./include-static-dependencies.patch;
|
||||
|
||||
NIX_CFLAGS_LINK = [ "-lcrypt" ];
|
||||
|
||||
outputs = [ "out" "dev" ];
|
||||
outputBin = "dev";
|
||||
|
@ -38,15 +41,18 @@ stdenv.mkDerivation rec {
|
|||
"--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"
|
||||
'';
|
||||
|
||||
propagatedBuildInputs = [ apr expat libiconv ]
|
||||
propagatedBuildInputs = [ apr expat libiconv libxcrypt ]
|
||||
++ optional sslSupport openssl
|
||||
++ optional bdbSupport db
|
||||
++ optional ldapSupport openldap
|
||||
|
|
|
@ -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
|
Loading…
Reference in a new issue