2021-03-21 02:22:08 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, makeWrapper, spidermonkey_78 }:
|
2017-10-26 01:12:29 +01:00
|
|
|
|
2019-08-13 22:52:01 +01:00
|
|
|
stdenv.mkDerivation {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "jsawk";
|
2017-10-26 01:12:29 +01:00
|
|
|
version = "1.5-pre";
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "micha";
|
|
|
|
repo = "jsawk";
|
|
|
|
rev = "5a14c4af3c7b59807701b70a954ecefc6f77e978";
|
|
|
|
sha256 = "0z3vdr3c8nvdrrxkjv9b4xg47mdb2hsknxpimw6shgwbigihapyr";
|
|
|
|
};
|
|
|
|
dontBuild = true;
|
2021-02-07 09:17:39 +00:00
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
2017-10-26 01:12:29 +01:00
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/bin
|
|
|
|
cp $src/jsawk $out/bin/
|
|
|
|
wrapProgram $out/bin/jsawk \
|
2021-03-21 02:22:08 +00:00
|
|
|
--prefix PATH : "${spidermonkey_78}/bin"
|
2017-10-26 01:12:29 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
2020-10-26 04:08:40 +00:00
|
|
|
description = "Like awk, but for JSON";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://github.com/micha/jsawk";
|
2021-01-15 09:19:50 +00:00
|
|
|
license = lib.licenses.publicDomain;
|
|
|
|
maintainers = with lib.maintainers; [ puffnfresh ];
|
|
|
|
platforms = lib.platforms.unix;
|
2017-10-26 01:12:29 +01:00
|
|
|
};
|
|
|
|
}
|