rq: init at 0.9.2 (broken because our v8 is too old, and I'm too weak to update v8)

This commit is contained in:
Aristid Breitkreuz 2016-12-03 23:36:48 +01:00
parent 475224968c
commit e3dcf5da1d
3 changed files with 83 additions and 0 deletions

View file

@ -6,6 +6,7 @@
, logLevel ? ""
, buildInputs ? []
, cargoUpdateHook ? ""
, cargoDepsHook ? ""
, ... } @ args:
let
@ -28,6 +29,8 @@ in stdenv.mkDerivation (args // {
configurePhase = args.configurePhase or "true";
postUnpack = ''
eval "$cargoDepsHook"
echo "Using cargo deps from $cargoDeps"
cp -r "$cargoDeps" deps

View file

@ -0,0 +1,76 @@
{ stdenv, fetchFromGitHub, rustPlatform, llvmPackages, v8 }:
with rustPlatform;
buildRustPackage rec {
name = "rq-${version}";
version = "0.9.2";
src = fetchFromGitHub {
owner = "dflemstr";
repo = "rq";
rev = "v${version}";
sha256 = "051k7ls2mbjf584crayd654wm8m7gk3b7s73j97f9l8sbppdhpcq";
};
serde_json = fetchFromGitHub {
owner = "serde-rs";
repo = "json";
rev = "0c05059e4533368020bd356bd708c38286810a7d";
sha256 = "0924ngqbsif2vmmpgn8l2gg4bzms0z0i7yng0zx6sdv0x836lw43";
};
v8_rs = fetchFromGitHub {
owner = "dflemstr";
repo = "v8-rs";
rev = "0772be5b2e84842a2d434963702bc2995aeda90b";
sha256 = "0h2n431rp6nqpip7dy7xpckkvcr19aq7l1f3x3wlrj02xi4c8mad";
};
cargoDepsHook = ''
# use non-git dependencies
(cd $sourceRoot && patch -p1 <<EOF)
diff -u a/Cargo.toml b/Cargo.toml
--- a/Cargo.toml 2016-12-03 21:29:31.615019030 +0100
+++ b/Cargo.toml 2016-12-03 21:30:12.188170359 +0100
@@ -40,15 +40,16 @@
version = "*"
[dependencies.serde_json]
-branch = "v0.9.0"
-git = "https://github.com/serde-rs/json.git"
+path = "${serde_json}/json"
+version = "*"
[dependencies.toml]
features = ["serde"]
version = "*"
[dependencies.v8]
-git = "https://github.com/dflemstr/v8-rs.git"
+path = "${v8_rs}"
+version = "*"
[features]
shared = ["v8/shared"]
EOF
'';
depsSha256 = "1pci9iwf4y574q32b05gbc490iqw5i7shvqgb1gblchrihvlkddq";
buildInputs = [ llvmPackages.clang-unwrapped v8 ];
configurePhase = ''
export LIBCLANG_PATH="${llvmPackages.clang-unwrapped}/lib"
export V8_SOURCE="${v8}"
'';
meta = with stdenv.lib; {
description = "A tool for doing record analysis and transformation";
homepage = https://github.com/dflemstr/rq ;
license = with licenses; [ asl20 ];
maintainers = [ maintainers.aristid ];
platforms = platforms.all;
broken = true;
};
}

View file

@ -3549,6 +3549,10 @@ in
rng_tools = callPackage ../tools/security/rng-tools { };
rq = callPackage ../development/tools/rq {
v8 = v8_static;
};
rsnapshot = callPackage ../tools/backup/rsnapshot {
# For the `logger' command, we can use either `utillinux' or
# GNU Inetutils. The latter is more portable.