depot/third_party/nixpkgs/pkgs/development/python-modules/pygitguardian/default.nix
Default email b5f92a349c Project import generated by Copybara.
GitOrigin-RevId: 7c9cc5a6e5d38010801741ac830a3f8fd667a7a0
2023-10-19 15:55:26 +02:00

76 lines
1.6 KiB
Nix

{ lib
, buildPythonPackage
, fetchFromGitHub
, marshmallow
, marshmallow-dataclass
, pytestCheckHook
, pythonOlder
, requests
, responses
, setuptools
, typing-extensions
, vcrpy
}:
buildPythonPackage rec {
pname = "pygitguardian";
version = "1.11.0";
format = "pyproject";
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "GitGuardian";
repo = "py-gitguardian";
rev = "refs/tags/v${version}";
hash = "sha256-Vr0+y3Zi7DsXzm2COOlMqUVjlZMRJkaVxT8QpSePhuA=";
};
nativeBuildInputs = [
setuptools
];
propagatedBuildInputs = [
marshmallow
marshmallow-dataclass
requests
typing-extensions
];
nativeCheckInputs = [
pytestCheckHook
vcrpy
responses
];
pythonImportsCheck = [
"pygitguardian"
];
disabledTests = [
# Tests require an API key
"test_compute_sca_files"
"test_content_scan_exceptions"
"test_content_scan"
"test_create_honeytoken"
"test_create_jwt"
"test_extra_headers"
"test_health_check"
"test_multi_content_exceptions"
"test_multi_content_scan"
"test_multiscan_parameters"
"test_quota_overview"
"test_sca_client_scan_diff"
"test_sca_scan_directory_invalid_tar"
"test_sca_scan_directory"
"test_versions_from_headers"
];
meta = with lib; {
description = "Library to access the GitGuardian API";
homepage = "https://github.com/GitGuardian/py-gitguardian";
changelog = "https://github.com/GitGuardian/py-gitguardian/blob/${version}/CHANGELOG.md";
license = licenses.mit;
maintainers = with maintainers; [ fab ];
};
}