Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib, buildGoModule, fetchFromGitHub, fetchpatch, sqlite }: 2 3buildGoModule rec { 4 pname = "textql"; 5 version = "unstable-2021-07-06"; 6 7 src = fetchFromGitHub { 8 owner = "dinedal"; 9 repo = "textql"; 10 rev = "fca00ecc76c8d9891b195ad2c1359d39f0213604"; 11 sha256 = "1v1nq7q2jr7d7kimlbykmh9d73cw750ybcz7v7l091qxjsii3irm"; 12 }; 13 14 patches = [ 15 # fix build with go 1.17 16 (fetchpatch { 17 url = "https://github.com/jawn-smith/textql/commit/a0d7038c8c30671dfd618f47322814ab492c11a1.patch"; 18 sha256 = "1yjdbwipjxxhfcqlj1z6ngsm7dr8gfp4l61jynn2iw7f02cn1yck"; 19 }) 20 ]; 21 22 vendorSha256 = "1h77wfs3plgcsysb13jk526gnbcw2j0xbbrvc68mz6nk1mj6scgw"; 23 24 postInstall = '' 25 install -Dm644 -t $out/share/man/man1 ${src}/man/textql.1 26 ''; 27 28 # needed for tests 29 nativeBuildInputs = [ sqlite ]; 30 31 doCheck = true; 32 33 meta = with lib; { 34 description = "Execute SQL against structured text like CSV or TSV"; 35 homepage = "https://github.com/dinedal/textql"; 36 license = licenses.mit; 37 maintainers = with maintainers; [ vrthra ]; 38 }; 39}