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