3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/tools/rq/default.nix

38 lines
1.1 KiB
Nix
Raw Normal View History

2020-06-05 10:08:28 +01:00
{ stdenv, lib, fetchFromGitHub, rustPlatform, libiconv, llvmPackages, v8 }:
2020-01-08 14:01:08 +00:00
rustPlatform.buildRustPackage rec {
2019-08-31 12:41:23 +01:00
pname = "rq";
2020-01-08 14:01:08 +00:00
version = "1.0.2";
src = fetchFromGitHub {
owner = "dflemstr";
2020-01-08 14:01:08 +00:00
repo = pname;
rev = "v${version}";
2020-01-08 14:01:08 +00:00
sha256 = "0km9d751jr6c5qy4af6ks7nv3xfn13iqi03wq59a1c73rnf0zinp";
};
cargoSha256 = "0071q08f75qrxdkbx1b9phqpbj15r79jbh391y32acifi7hr35hj";
buildInputs = [ llvmPackages.libclang v8 ]
2020-06-05 10:08:28 +01:00
++ lib.optionals stdenv.isDarwin [ libiconv ];
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)]" ""
'';
configurePhase = ''
export LIBCLANG_PATH="${llvmPackages.libclang.lib}/lib"
export V8_SOURCE="${v8}"
'';
2020-01-08 14:01:08 +00:00
meta = with lib; {
description = "A tool for doing record analysis and transformation";
2020-01-08 14:01:08 +00:00
homepage = "https://github.com/dflemstr/rq";
license = with licenses; [ asl20 ];
maintainers = with maintainers; [ aristid Br1ght0ne ];
};
}