2021-02-05 17:12:51 +00:00
|
|
|
{ lib
|
2021-12-19 01:06:50 +00:00
|
|
|
, stdenv
|
2021-12-06 16:07:01 +00:00
|
|
|
, fetchFromGitHub
|
2021-12-19 01:06:50 +00:00
|
|
|
, rustPlatform
|
|
|
|
, Security
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
2021-12-19 01:06:50 +00:00
|
|
|
rustPlatform.buildRustPackage rec {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "jsonwatch";
|
2021-12-19 01:06:50 +00:00
|
|
|
version = "0.6.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "dbohdan";
|
2021-12-19 01:06:50 +00:00
|
|
|
repo = pname;
|
2021-12-06 16:07:01 +00:00
|
|
|
rev = "v${version}";
|
2021-12-19 01:06:50 +00:00
|
|
|
sha256 = "sha256-TGW04P8t0mAXza7I7qp6QRXA/MDE3m1dlRC7bMf2dSk=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-12-19 01:06:50 +00:00
|
|
|
cargoSha256 = "sha256-Gjb7v3kz11iOml3Ykxhy43KNxzaprgMbb5DpPNChLTc=";
|
|
|
|
|
2022-10-30 15:09:59 +00:00
|
|
|
buildInputs = lib.optionals stdenv.isDarwin [
|
2021-12-19 01:06:50 +00:00
|
|
|
Security
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
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
|
2021-12-19 01:06:50 +00:00
|
|
|
(HTTP/HTTPS) API. jsonwatch requests data from the designated
|
2020-04-24 23:36:52 +00:00
|
|
|
source repeatedly at a set interval and displays the
|
2021-12-19 01:06:50 +00:00
|
|
|
differences when the data changes.
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
homepage = "https://github.com/dbohdan/jsonwatch";
|
|
|
|
license = licenses.mit;
|
2021-12-19 01:06:50 +00:00
|
|
|
maintainers = with maintainers; [ fab ];
|
2022-12-17 10:02:37 +00:00
|
|
|
# never built on aarch64-darwin since first introduction in nixpkgs
|
|
|
|
broken = stdenv.isDarwin && stdenv.isAarch64;
|
2024-01-02 11:29:13 +00:00
|
|
|
mainProgram = "jsonwatch";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|