python3Packages.gpapi: Fix build

This commit is contained in:
Pyrox 2024-10-24 18:26:17 -04:00
parent c53bacfb59
commit 83cdd624e4
No known key found for this signature in database
GPG Key ID: 8CDF3F7CAA53A0F5

View File

@ -6,6 +6,7 @@
protobuf, protobuf,
pycryptodome, pycryptodome,
requests, requests,
protobuf_27,
}: }:
buildPythonPackage rec { buildPythonPackage rec {
@ -18,12 +19,25 @@ buildPythonPackage rec {
sha256 = "0ampvsv97r3hy1cakif4kmyk1ynf3scbvh4fbk02x7xrxn4kl38w"; sha256 = "0ampvsv97r3hy1cakif4kmyk1ynf3scbvh4fbk02x7xrxn4kl38w";
}; };
postPatch = ''
substituteInPlace setup.py \
--replace-fail 'PROTOC_EXEC = "protoc"' 'PROTOC_EXEC = "${lib.getExe protobuf_27}"'
'';
# package doesn't contain unit tests # package doesn't contain unit tests
# scripts in ./test require networking # scripts in ./test require networking
doCheck = false; doCheck = false;
pythonImportsCheck = [ "gpapi.googleplay" ]; pythonImportsCheck = [ "gpapi.googleplay" ];
preBuild = ''
export PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION="python"
'';
buildInputs = [
protobuf_27
];
propagatedBuildInputs = [ propagatedBuildInputs = [
cryptography cryptography
protobuf protobuf