From 2799851afb30ac641bd33dfa0118d3bc5b033fad Mon Sep 17 00:00:00 2001 From: figsoda Date: Sun, 26 Mar 2023 23:11:43 -0400 Subject: [PATCH] rsonpath: init at 0.3.2 --- .../tools/misc/rsonpath/default.nix | 37 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 2 files changed, 39 insertions(+) create mode 100644 pkgs/development/tools/misc/rsonpath/default.nix diff --git a/pkgs/development/tools/misc/rsonpath/default.nix b/pkgs/development/tools/misc/rsonpath/default.nix new file mode 100644 index 000000000000..8ff7bc02705a --- /dev/null +++ b/pkgs/development/tools/misc/rsonpath/default.nix @@ -0,0 +1,37 @@ +{ lib +, rustPlatform +, fetchFromGitHub +, withSimd ? true +, stdenv +}: + +rustPlatform.buildRustPackage rec { + pname = "rsonpath"; + version = "0.3.2"; + + src = fetchFromGitHub { + owner = "v0ldek"; + repo = "rsonpath"; + rev = "v${version}"; + hash = "sha256-ip8+Wy9rmTzFccmjYWb3Nk+gkq3g4e1ty/5+ldIOO10="; + }; + + cargoHash = "sha256-5V0H2FeHI1SByzLsviOR+qHwYhZGiNmMawCTYjk2P24="; + + buildNoDefaultFeatures = true; + buildFeatures = [ + "default-optimizations" + ] ++ lib.optionals withSimd [ + "simd" + ]; + + meta = with lib; { + description = "Blazing fast Rust JSONPath query engine"; + homepage = "https://github.com/v0ldek/rsonpath"; + changelog = "https://github.com/v0ldek/rsonpath/blob/${src.rev}/CHANGELOG.md"; + license = licenses.mit; + maintainers = with maintainers; [ figsoda ]; + # build fails on platforms without simd support, even when withSimd = false + broken = !stdenv.isx86_64; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 489e3d50e00c..1e958bae03a3 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -18731,6 +18731,8 @@ with pkgs; rsass = callPackage ../development/tools/misc/rsass { }; + rsonpath = callPackage ../development/tools/misc/rsonpath { }; + rufo = callPackage ../development/tools/rufo { }; samurai = callPackage ../development/tools/build-managers/samurai { };