3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/os-specific/darwin/apple-source-releases/libsecurity_apple_csp/default.nix

32 lines
1.3 KiB
Nix
Raw Normal View History

{ appleDerivation, apple_sdk, libsecurity_asn1, libsecurity_cdsa_plugin, libsecurity_cdsa_utilities, libsecurity_cdsa_utils, libsecurity_utilities, CommonCrypto, stdenv }:
2015-06-22 04:29:33 +01:00
appleDerivation {
buildInputs = [
libsecurity_cdsa_utilities
libsecurity_utilities
libsecurity_cdsa_plugin
libsecurity_asn1
libsecurity_cdsa_utils
];
NIX_CFLAGS_COMPILE = "-Iopen_ssl";
patchPhase = ''
for file in lib/BlockCryptor.h lib/RSA_DSA_signature.h lib/castContext.h \
lib/RawSigner.h lib/MD2Object.h lib/HMACSHA1.h lib/bfContext.h lib/rc4Context.h; do
substituteInPlace ''$file --replace \
'"CoreServices/../Frameworks/CarbonCore.framework/Headers/MacTypes.h"' \
'"${apple_sdk.sdk}/include/MacTypes.h"'
done
for file in lib/castContext.h lib/gladmanContext.h lib/desContext.h lib/rc4Context.h; do
substituteInPlace ''$file --replace \
'/usr/local/include/CommonCrypto/CommonCryptorSPI.h' \
'${CommonCrypto}/include/CommonCrypto/CommonCryptorSPI.h'
2015-06-22 04:29:33 +01:00
done
substituteInPlace lib/opensshWrap.cpp --replace RSA_DSA_Keys.h RSA_DSA_keys.h
'' + stdenv.lib.optionalString (!stdenv.cc.nativeLibc) ''
substituteInPlace lib/pbkdf2.c --replace \
'<CoreServices/../Frameworks/CarbonCore.framework/Headers/ConditionalMacros.h>' \
'"${stdenv.libc}/include/ConditionalMacros.h"'
'';
}