2020-06-18 07:06:33 +00:00
|
|
|
{ stdenv, lib, fetchFromGitHub, rustPlatform, libiconv, llvmPackages, v8 }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "rq";
|
|
|
|
version = "1.0.2";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "dflemstr";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "0km9d751jr6c5qy4af6ks7nv3xfn13iqi03wq59a1c73rnf0zinp";
|
|
|
|
};
|
|
|
|
|
2021-05-28 09:39:13 +00:00
|
|
|
cargoSha256 = "0071q08f75qrxdkbx1b9phqpbj15r79jbh391y32acifi7hr35hj";
|
|
|
|
|
|
|
|
buildInputs = [ llvmPackages.libclang v8 ]
|
|
|
|
++ lib.optionals stdenv.isDarwin [ libiconv ];
|
|
|
|
|
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)]" ""
|
|
|
|
'';
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
configurePhase = ''
|
2021-05-20 23:08:51 +00:00
|
|
|
export LIBCLANG_PATH="${llvmPackages.libclang.lib}/lib"
|
2020-04-24 23:36:52 +00:00
|
|
|
export V8_SOURCE="${v8}"
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "A tool for doing record analysis and transformation";
|
|
|
|
homepage = "https://github.com/dflemstr/rq";
|
|
|
|
license = with licenses; [ asl20 ];
|
2020-11-19 00:13:47 +00:00
|
|
|
maintainers = with maintainers; [ aristid Br1ght0ne ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|