2023-03-30 22:05:00 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, rustPlatform
|
|
|
|
, fetchFromGitHub
|
|
|
|
, withSimd ? stdenv.isx86_64
|
|
|
|
}:
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "rsonpath";
|
2023-08-04 22:07:22 +00:00
|
|
|
version = "0.6.0";
|
2023-03-30 22:05:00 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "v0ldek";
|
|
|
|
repo = "rsonpath";
|
|
|
|
rev = "v${version}";
|
2023-08-04 22:07:22 +00:00
|
|
|
hash = "sha256-RRMT//OnwzoZEsOPZyHfQQbkphopZBI1u8xQe8LsPBo=";
|
2023-03-30 22:05:00 +00:00
|
|
|
};
|
|
|
|
|
2023-08-04 22:07:22 +00:00
|
|
|
cargoHash = "sha256-o9L6GUYDDm/WM8iD0k/OGf26w9O8DLH0jMr//ruKnrs=";
|
2023-03-30 22:05:00 +00:00
|
|
|
|
|
|
|
buildNoDefaultFeatures = true;
|
|
|
|
buildFeatures = [
|
|
|
|
"default-optimizations"
|
|
|
|
] ++ lib.optionals withSimd [
|
|
|
|
"simd"
|
|
|
|
];
|
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
cargoBuildFlags = [ "-p=rsonpath" ];
|
|
|
|
cargoTestFlags = cargoBuildFlags;
|
|
|
|
|
2023-03-30 22:05:00 +00:00
|
|
|
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 ];
|
2023-07-15 17:15:38 +00:00
|
|
|
mainProgram = "rq";
|
2023-03-30 22:05:00 +00:00
|
|
|
};
|
|
|
|
}
|