Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at fix-function-merge 47 lines 1.0 kB view raw
1{ lib 2, fetchFromGitHub 3, fetchpatch 4, crystal 5, jq 6, libxml2 7, makeWrapper 8}: 9 10crystal.buildCrystalPackage rec { 11 pname = "oq"; 12 version = "1.3.4"; 13 14 src = fetchFromGitHub { 15 owner = "Blacksmoke16"; 16 repo = pname; 17 rev = "v${version}"; 18 sha256 = "sha256-W0iGE1yVOphooiab689AFT3rhGGdXqEFyYIhrx11RTE="; 19 }; 20 21 patches = [ 22 (fetchpatch { 23 url = "https://github.com/Blacksmoke16/oq/commit/4f9ef2a73770465bfe2348795461fc8a90a7b9b0.diff"; 24 hash = "sha256-Ljvf2+1vsGv6wJHl27T7DufI9rTUCY/YQZziOWpW8Do="; 25 }) 26 ]; 27 28 nativeBuildInputs = [ makeWrapper ]; 29 buildInputs = [ libxml2 ]; 30 nativeCheckInputs = [ jq ]; 31 32 format = "shards"; 33 34 postInstall = '' 35 wrapProgram "$out/bin/oq" \ 36 --prefix PATH : "${lib.makeBinPath [ jq ]}" 37 ''; 38 39 meta = with lib; { 40 description = "Performant, and portable jq wrapper"; 41 mainProgram = "oq"; 42 homepage = "https://blacksmoke16.github.io/oq/"; 43 license = licenses.mit; 44 maintainers = with maintainers; [ Br1ght0ne ]; 45 platforms = platforms.unix; 46 }; 47}