2021-04-05 15:23:46 +00:00
|
|
|
{ lib
|
|
|
|
, fetchFromGitHub
|
|
|
|
, crystal
|
|
|
|
, jq
|
|
|
|
, libxml2
|
|
|
|
, makeWrapper
|
|
|
|
}:
|
2020-05-15 21:57:56 +00:00
|
|
|
|
|
|
|
crystal.buildCrystalPackage rec {
|
|
|
|
pname = "oq";
|
2022-08-21 13:32:41 +00:00
|
|
|
version = "1.3.4";
|
2020-05-15 21:57:56 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Blacksmoke16";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2022-08-21 13:32:41 +00:00
|
|
|
sha256 = "sha256-W0iGE1yVOphooiab689AFT3rhGGdXqEFyYIhrx11RTE=";
|
2020-05-15 21:57:56 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
2022-05-18 14:49:53 +00:00
|
|
|
buildInputs = [ libxml2 ];
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [ jq ];
|
2020-05-15 21:57:56 +00:00
|
|
|
|
2021-04-05 15:23:46 +00:00
|
|
|
format = "shards";
|
2020-05-15 21:57:56 +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-19 00:13:47 +00:00
|
|
|
maintainers = with maintainers; [ Br1ght0ne ];
|
2020-10-11 12:50:04 +00:00
|
|
|
platforms = platforms.unix;
|
2020-05-15 21:57:56 +00:00
|
|
|
};
|
|
|
|
}
|