Skip to content

Commit

Permalink
python3Packages.oscrypto: patch ctypes call
Browse files Browse the repository at this point in the history
The ctypes call did not work, because it requires binutils.bintools to
be available in every downstream dependency.

Fixes #176917.
  • Loading branch information
sbruder committed Aug 17, 2022
1 parent 3820a02 commit c400724
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion pkgs/development/python-modules/oscrypto/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,16 @@ buildPythonPackage rec {
hash = "sha256-CmDypmlc/kb6ONCUggjT1Iqd29xNSLRaGh5Hz36dvOw=";
};

postPatch = ''
for file in oscrypto/_openssl/_lib{crypto,ssl}_c{ffi,types}.py; do
substituteInPlace $file \
--replace "get_library('crypto', 'libcrypto.dylib', '42')" "'${openssl.out}/lib/libcrypto${stdenv.hostPlatform.extensions.sharedLibrary}'" \
--replace "get_library('ssl', 'libssl', '44')" "'${openssl.out}/lib/libssl${stdenv.hostPlatform.extensions.sharedLibrary}'"
done
'';

propagatedBuildInputs = [
asn1crypto
openssl
];

checkInputs = [
Expand Down

0 comments on commit c400724

Please sign in to comment.