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