diff --git a/pkgs/tools/security/clairvoyance/default.nix b/pkgs/tools/security/clairvoyance/default.nix new file mode 100644 index 000000000000..6d4fc13ed468 --- /dev/null +++ b/pkgs/tools/security/clairvoyance/default.nix @@ -0,0 +1,51 @@ +{ lib +, fetchFromGitHub +, python3 +}: + +python3.pkgs.buildPythonApplication rec { + pname = "clairvoyance"; + version = "2.0.4"; + format = "pyproject"; + + src = fetchFromGitHub { + owner = "nikitastupin"; + repo = pname; + rev = "v${version}"; + hash = "sha256-b69a3UTRt5axTSjLcEYkqGe7bFlQKCiMzoNtw91HCyI="; + }; + + nativeBuildInputs = with python3.pkgs; [ + poetry-core + ]; + + propagatedBuildInputs = with python3.pkgs; [ + aiohttp + ]; + + checkInputs = with python3.pkgs; [ + aiounittest + pytestCheckHook + ]; + + postPatch = '' + substituteInPlace pyproject.toml \ + --replace 'asyncio = "^3.4.3"' "" + ''; + + pythonImportsCheck = [ + "clairvoyance" + ]; + + disabledTests = [ + # KeyError + "test_probe_typename" + ]; + + meta = with lib; { + description = "Tool to obtain GraphQL API schemas"; + homepage = "https://github.com/nikitastupin/clairvoyance"; + license = with licenses; [ asl20 ]; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 5a1f9f0d7966..427ead7f76b3 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -2376,6 +2376,8 @@ with pkgs; clair = callPackage ../tools/admin/clair { }; + clairvoyance = callPackage ../tools/security/clairvoyance { }; + cloud-sql-proxy = callPackage ../tools/misc/cloud-sql-proxy { }; cloudfox = callPackage ../tools/security/cloudfox { };