2022-10-06 18:32:54 +00:00
|
|
|
{ lib, rustPlatform, fetchFromGitHub }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "rq";
|
2022-10-06 18:32:54 +00:00
|
|
|
version = "1.0.4";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "dflemstr";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2022-10-06 18:32:54 +00:00
|
|
|
sha256 = "sha256-QyYTbMXikLSe3eYJRUALQJxUJjA6VlvaLMwGrxIKfZI=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-10-06 18:32:54 +00:00
|
|
|
cargoSha256 = "sha256-WAgWc9rAQBjrsaHP6s3Djpg3iYmfRVC9J9yq0T/zMqA=";
|
2021-05-28 09:39:13 +00:00
|
|
|
|
2021-05-20 23:08:51 +00:00
|
|
|
postPatch = ''
|
|
|
|
# Remove #[deny(warnings)] which is equivalent to -Werror in C.
|
|
|
|
# Prevents build failures when upgrading rustc, which may give more warnings.
|
|
|
|
substituteInPlace src/lib.rs \
|
|
|
|
--replace "#![deny(warnings)]" ""
|
2022-10-06 18:32:54 +00:00
|
|
|
|
|
|
|
# build script tries to get version information from git
|
|
|
|
# this fixes the --version output
|
|
|
|
rm build.rs
|
2021-05-20 23:08:51 +00:00
|
|
|
'';
|
|
|
|
|
2022-10-06 18:32:54 +00:00
|
|
|
VERGEN_SEMVER = version;
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "A tool for doing record analysis and transformation";
|
|
|
|
homepage = "https://github.com/dflemstr/rq";
|
|
|
|
license = with licenses; [ asl20 ];
|
2022-10-06 18:32:54 +00:00
|
|
|
maintainers = with maintainers; [ aristid Br1ght0ne figsoda ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|