depot/third_party/nixpkgs/pkgs/development/python-modules/gpapi/default.nix
Default email 657f08b14c Project import generated by Copybara.
GitOrigin-RevId: 807e9154dcb16384b1b765ebe9cd2bba2ac287fd
2024-10-29 11:11:06 +00:00

57 lines
1 KiB
Nix

{
buildPythonPackage,
cryptography,
fetchPypi,
lib,
protobuf,
pycryptodome,
requests,
protobuf_27,
setuptools,
}:
buildPythonPackage rec {
version = "0.4.4";
pname = "gpapi";
pyproject = true;
src = fetchPypi {
inherit version pname;
sha256 = "sha256-HA06ie25ny7AXI7AvZgezvowfZ3ExalY8HDkk7betyo=";
};
postPatch = ''
substituteInPlace setup.py \
--replace-fail 'PROTOC_EXEC = "protoc"' 'PROTOC_EXEC = "${lib.getExe protobuf_27}"'
'';
build-system = [ setuptools ];
buildInputs = [
protobuf_27
];
dependencies = [
cryptography
protobuf
pycryptodome
requests
];
preBuild = ''
export PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION="python"
'';
# package doesn't contain unit tests
# scripts in ./test require networking
doCheck = false;
pythonImportsCheck = [ "gpapi.googleplay" ];
meta = {
homepage = "https://github.com/NoMore201/googleplay-api";
license = lib.licenses.gpl3Only;
description = "Google Play Unofficial Python API";
maintainers = [ ];
};
}