From aa55da38102634ef3874f320ed26e585d5a9dd12 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Wed, 24 Feb 2021 08:37:52 +0100 Subject: [PATCH] python3Packages.jsonpath-ng: init at 1.5.2 --- .../python-modules/jsonpath-ng/default.nix | 42 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 44 insertions(+) create mode 100644 pkgs/development/python-modules/jsonpath-ng/default.nix diff --git a/pkgs/development/python-modules/jsonpath-ng/default.nix b/pkgs/development/python-modules/jsonpath-ng/default.nix new file mode 100644 index 000000000000..a623c859e168 --- /dev/null +++ b/pkgs/development/python-modules/jsonpath-ng/default.nix @@ -0,0 +1,42 @@ +{ lib +, buildPythonPackage +, decorator +, fetchFromGitHub +, ply +, pytestCheckHook +, six +}: + +buildPythonPackage rec { + pname = "jsonpath-ng"; + version = "1.5.2"; + + src = fetchFromGitHub { + owner = "h2non"; + repo = pname; + rev = "v${version}"; + sha256 = "1cxjwhx0nj85a3awnl7j6afnk07awzv45qfwxl5jqbbc9cxh5bd6"; + }; + + propagatedBuildInputs = [ + decorator + ply + six + ]; + + checkInputs = [ pytestCheckHook ]; + + disabledTestFiles = [ + # Exclude tests that require oslotest + "tests/test_jsonpath_rw_ext.py" + ]; + + pythonImportsCheck = [ "jsonpath_ng" ]; + + meta = with lib; { + description = "JSONPath implementation for Python"; + homepage = "https://github.com/h2non/jsonpath-ng"; + license = with licenses; [ asl20 ]; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 4ae605e1d3df..6ea2d8eae4d2 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -3393,6 +3393,8 @@ in { jsonpath_rw = callPackage ../development/python-modules/jsonpath_rw { }; + jsonpath-ng = callPackage ../development/python-modules/jsonpath-ng { }; + jsonpickle = callPackage ../development/python-modules/jsonpickle { }; jsonpointer = callPackage ../development/python-modules/jsonpointer { };