diff --git a/pkgs/development/python-modules/jsonwatch/default.nix b/pkgs/tools/misc/jsonwatch/default.nix similarity index 51% rename from pkgs/development/python-modules/jsonwatch/default.nix rename to pkgs/tools/misc/jsonwatch/default.nix index aec66d4ec4b..3fe4f5008fd 100644 --- a/pkgs/development/python-modules/jsonwatch/default.nix +++ b/pkgs/tools/misc/jsonwatch/default.nix @@ -1,37 +1,38 @@ { lib -, buildPythonPackage +, stdenv , fetchFromGitHub -, six -, isPyPy +, rustPlatform +, Security }: -buildPythonPackage rec { +rustPlatform.buildRustPackage rec { pname = "jsonwatch"; - version = "0.2.0"; - disabled = isPyPy; # doesn't find setuptools + version = "0.6.0"; src = fetchFromGitHub { owner = "dbohdan"; - repo = "jsonwatch"; + repo = pname; rev = "v${version}"; - sha256 = "sha256-yLN6jOxAz+B7zvV3tGT6Nxi17v9ZOtWpbtSi0o1h48U="; + sha256 = "sha256-TGW04P8t0mAXza7I7qp6QRXA/MDE3m1dlRC7bMf2dSk="; }; - propagatedBuildInputs = [ six ]; + cargoSha256 = "sha256-Gjb7v3kz11iOml3Ykxhy43KNxzaprgMbb5DpPNChLTc="; + + buildInputs = lib.optional stdenv.isDarwin [ + Security + ]; meta = with lib; { description = "Like watch -d but for JSON"; longDescription = '' jsonwatch is a command line utility with which you can track changes in JSON data delivered by a shell command or a web - (HTTP/HTTPS) API. jsonwatch requests data from the designated + (HTTP/HTTPS) API. jsonwatch requests data from the designated source repeatedly at a set interval and displays the - differences when the data changes. It is similar in its - behavior to how watch(1) with the -d switch works for - plain-text data. + differences when the data changes. ''; homepage = "https://github.com/dbohdan/jsonwatch"; license = licenses.mit; - platforms = platforms.all; + maintainers = with maintainers; [ fab ]; }; } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 5a2a34d6727..9d455fa1b07 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -6724,6 +6724,10 @@ with pkgs; json-schema-for-humans = with python3Packages; toPythonApplication json-schema-for-humans; + jsonwatch = callPackage ../tools/misc/jsonwatch { + inherit (darwin.apple_sdk.frameworks) Security; + }; + jtc = callPackage ../development/tools/jtc { }; jumpapp = callPackage ../tools/X11/jumpapp {}; diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index e57eabcc684..bf89cf5643a 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -4095,8 +4095,6 @@ in { jsonstreams = callPackage ../development/python-modules/jsonstreams { }; - jsonwatch = callPackage ../development/python-modules/jsonwatch { }; - jug = callPackage ../development/python-modules/jug { }; junitparser = callPackage ../development/python-modules/junitparser { };