nixpkgs/pkgs/tools/text/jsawk/default.nix
stuebinm ff1a94e523 treewide: add meta.mainProgram to packages with a single binary
The nixpkgs-unstable channel's programs.sqlite was used to identify
packages producing exactly one binary, and these automatically added
to their package definitions wherever possible.
2024-03-19 03:14:51 +01:00

30 lines
813 B
Nix

{ lib, stdenv, fetchFromGitHub, makeWrapper, spidermonkey_102 }:
stdenv.mkDerivation {
pname = "jsawk";
version = "1.5-pre";
src = fetchFromGitHub {
owner = "micha";
repo = "jsawk";
rev = "5a14c4af3c7b59807701b70a954ecefc6f77e978";
sha256 = "0z3vdr3c8nvdrrxkjv9b4xg47mdb2hsknxpimw6shgwbigihapyr";
};
dontBuild = true;
nativeBuildInputs = [ makeWrapper ];
installPhase = ''
mkdir -p $out/bin
cp $src/jsawk $out/bin/
wrapProgram $out/bin/jsawk \
--prefix PATH : "${spidermonkey_102}/bin"
'';
meta = {
description = "Like awk, but for JSON";
mainProgram = "jsawk";
homepage = "https://github.com/micha/jsawk";
license = lib.licenses.publicDomain;
maintainers = with lib.maintainers; [ puffnfresh ];
platforms = lib.platforms.unix;
};
}