My personal project and infrastructure archive
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
nomicon/pkgs/development/tools/oq/default.nix

38 lines
859 B

{ lib, fetchFromGitHub, crystal, jq, libxml2, makeWrapper }:
crystal.buildCrystalPackage rec {
pname = "oq";
version = "1.1.0";
src = fetchFromGitHub {
owner = "Blacksmoke16";
repo = pname;
rev = "v${version}";
sha256 = "1zg4kxpfi3sap4cwp42zg46j5dv0nf926qdqm7k22ncm6jdrgpgw";
};
nativeBuildInputs = [ makeWrapper ];
buildInputs = [ jq libxml2 ];
4 years ago
format = "crystal";
crystalBinaries.oq.src = "src/oq_cli.cr";
4 years ago
preCheck = ''
mkdir bin
cp oq bin/oq
'';
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;
};
}