2021-03-30 07:25:26 +00:00
|
|
|
{ lib
|
|
|
|
, fetchFromGitHub
|
2023-09-27 12:19:37 +00:00
|
|
|
, fetchpatch
|
2021-03-30 07:25:26 +00:00
|
|
|
, crystal
|
|
|
|
, jq
|
|
|
|
, libxml2
|
|
|
|
, makeWrapper
|
|
|
|
}:
|
2019-12-05 10:56:33 +00:00
|
|
|
|
|
|
|
crystal.buildCrystalPackage rec {
|
|
|
|
pname = "oq";
|
2022-08-19 04:46:58 +00:00
|
|
|
version = "1.3.4";
|
2019-12-05 10:56:33 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Blacksmoke16";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2022-08-19 04:46:58 +00:00
|
|
|
sha256 = "sha256-W0iGE1yVOphooiab689AFT3rhGGdXqEFyYIhrx11RTE=";
|
2019-12-05 10:56:33 +00:00
|
|
|
};
|
|
|
|
|
2023-09-27 12:19:37 +00:00
|
|
|
patches = [
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/Blacksmoke16/oq/commit/4f9ef2a73770465bfe2348795461fc8a90a7b9b0.diff";
|
|
|
|
hash = "sha256-Ljvf2+1vsGv6wJHl27T7DufI9rTUCY/YQZziOWpW8Do=";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2019-12-05 10:56:33 +00:00
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
2022-05-10 02:00:12 +00:00
|
|
|
buildInputs = [ libxml2 ];
|
2023-01-21 12:00:00 +00:00
|
|
|
nativeCheckInputs = [ jq ];
|
2019-12-05 10:56:33 +00:00
|
|
|
|
2021-03-30 07:25:26 +00:00
|
|
|
format = "shards";
|
2020-05-10 14:54:34 +00: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 21:50:30 +00:00
|
|
|
platforms = platforms.unix;
|
2019-12-05 10:56:33 +00:00
|
|
|
};
|
|
|
|
}
|