From efcfeb4cd9ffc26a5b639be01e027f067bed641a Mon Sep 17 00:00:00 2001 From: sudosubin Date: Sun, 3 Jul 2022 23:49:11 +0900 Subject: [PATCH] check-jsonschema: init at 0.16.2 --- .../tools/check-jsonschema/default.nix | 41 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 2 files changed, 43 insertions(+) create mode 100644 pkgs/development/tools/check-jsonschema/default.nix diff --git a/pkgs/development/tools/check-jsonschema/default.nix b/pkgs/development/tools/check-jsonschema/default.nix new file mode 100644 index 000000000000..068bc752d32c --- /dev/null +++ b/pkgs/development/tools/check-jsonschema/default.nix @@ -0,0 +1,41 @@ +{ lib, fetchFromGitHub, python3 }: + +with python3.pkgs; + +buildPythonApplication rec { + pname = "check-jsonschema"; + version = "0.16.2"; + + src = fetchFromGitHub { + owner = "python-jsonschema"; + repo = "check-jsonschema"; + rev = version; + sha256 = "sha256-rPjXua5kITr+I+jqeAO2iGUFVhjkLnQkXlUzRvkXduA="; + }; + + propagatedBuildInputs = [ + ruamel-yaml + jsonschema + identify + requests + click + ]; + + checkInputs = [ + pytestCheckHook + pytest-xdist + responses + ]; + + preCheck = lib.optionalString (stdenv.isDarwin && stdenv.isAarch64) '' + # https://github.com/python/cpython/issues/74570#issuecomment-1093748531 + export no_proxy='*'; + ''; + + meta = with lib; { + description = "A jsonschema CLI and pre-commit hook"; + homepage = "https://github.com/python-jsonschema/check-jsonschema"; + license = licenses.apsl20; + maintainers = with maintainers; [ sudosubin ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 3ead24e0eabd..396c5c138794 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -14761,6 +14761,8 @@ with pkgs; pythonDocs = recurseIntoAttrs (callPackage ../development/interpreters/python/cpython/docs {}); + check-jsonschema = callPackage ../development/tools/check-jsonschema {}; + pypi2nix = callPackage ../development/tools/pypi2nix {}; pypi-mirror = callPackage ../development/tools/pypi-mirror {};