Skip to content

Instantly share code, notes, and snippets.

@aristidb
Created December 3, 2016 20:23
Show Gist options
  • Save aristidb/58d04012dc78ed544b54f62074ab436d to your computer and use it in GitHub Desktop.
Save aristidb/58d04012dc78ed544b54f62074ab436d to your computer and use it in GitHub Desktop.
{ stdenv, fetchFromGitHub, rustPlatform, makeWrapper }:
with rustPlatform;
buildRustPackage rec {
name = "rq-${version}";
version = "0.9.2";
src = fetchFromGitHub {
owner = "dflemstr";
repo = "rq";
rev = "v${version}";
sha256 = "051k7ls2mbjf584crayd654wm8m7gk3b7s73j97f9l8sbppdhpcq";
};
depsSha256 = "0lmrimiyr74hvszmy9qsvykyp0krj72ghf2nmz2jkjf7l1l8q3kw";
serde_json = fetchFromGitHub {
owner = "serde-rs";
repo = "json";
rev = "0c05059e4533368020bd356bd708c38286810a7d";
sha256 = "0924ngqbsif2vmmpgn8l2gg4bzms0z0i7yng0zx6sdv0x836lw43";
};
v8 = fetchFromGitHub {
owner = "dflemstr";
repo = "v8-rs";
rev = "0772be5b2e84842a2d434963702bc2995aeda90b";
sha256 = "0h2n431rp6nqpip7dy7xpckkvcr19aq7l1f3x3wlrj02xi4c8mad";
};
cargoUpdateHook = ''
# use non-git dependencies
cat <<EOF >>Cargo.toml
[replace]
"serde_json:0.8.1" = { path = '${serde_json}/json' }
"v8:0.8.0" = { path = '${v8}' }
EOF
'';
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;
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment