nixpkgs/pkgs/development/tools/oq/default.nix

38 lines
859 B
Nix
Raw Normal View History

2019-12-05 11:56:33 +01:00
{ lib, fetchFromGitHub, crystal, jq, libxml2, makeWrapper }:
crystal.buildCrystalPackage rec {
pname = "oq";
2020-05-10 17:05:51 +02:00
version = "1.1.0";
2019-12-05 11:56:33 +01:00
src = fetchFromGitHub {
owner = "Blacksmoke16";
repo = pname;
rev = "v${version}";
2020-05-10 17:05:51 +02:00
sha256 = "1zg4kxpfi3sap4cwp42zg46j5dv0nf926qdqm7k22ncm6jdrgpgw";
2019-12-05 11:56:33 +01:00
};
nativeBuildInputs = [ makeWrapper ];
buildInputs = [ jq libxml2 ];
2020-05-10 16:54:34 +02:00
format = "crystal";
2019-12-05 11:56:33 +01:00
crystalBinaries.oq.src = "src/oq_cli.cr";
2020-05-10 16:54:34 +02:00
preCheck = ''
mkdir bin
cp oq bin/oq
'';
2019-12-05 11:56:33 +01: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;
maintainers = with maintainers; [ filalex77 ];
platforms = platforms.linux;
};
}