2021-03-30 08:25:26 +01:00
|
|
|
{ lib
|
|
|
|
, fetchFromGitHub
|
|
|
|
, crystal
|
|
|
|
, jq
|
|
|
|
, libxml2
|
|
|
|
, makeWrapper
|
|
|
|
}:
|
2019-12-05 10:56:33 +00:00
|
|
|
|
|
|
|
crystal.buildCrystalPackage rec {
|
|
|
|
pname = "oq";
|
2021-03-30 08:25:26 +01:00
|
|
|
version = "1.2.0";
|
2019-12-05 10:56:33 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Blacksmoke16";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2021-03-30 08:25:26 +01:00
|
|
|
sha256 = "sha256-vMW+N3N6H8S6dNm4eBJo2tSxSiouG92t4Nq3cYSWcw0=";
|
2019-12-05 10:56:33 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
buildInputs = [ jq libxml2 ];
|
|
|
|
|
2021-03-30 08:25:26 +01:00
|
|
|
format = "shards";
|
2020-05-10 15:54:34 +01:00
|
|
|
|
2019-12-05 10:56:33 +00:00
|
|
|
postInstall = ''
|
|
|
|
wrapProgram "$out/bin/oq" \
|
|
|
|
--prefix PATH : "${lib.makeBinPath [ jq ]}"
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "A performant, and portable jq wrapper";
|
|
|
|
homepage = "https://blacksmoke16.github.io/oq/";
|
|
|
|
license = licenses.mit;
|
2020-11-17 11:02:06 +00:00
|
|
|
maintainers = with maintainers; [ Br1ght0ne ];
|
2020-09-28 22:50:30 +01:00
|
|
|
platforms = platforms.unix;
|
2019-12-05 10:56:33 +00:00
|
|
|
};
|
|
|
|
}
|