2022-04-13 12:45:10 +01:00
|
|
|
{ lib, buildGoModule, fetchFromGitHub, fetchpatch, sqlite }:
|
2016-06-03 17:42:33 +01:00
|
|
|
|
2022-04-13 12:45:10 +01:00
|
|
|
buildGoModule rec {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "textql";
|
2022-04-13 12:45:10 +01:00
|
|
|
version = "unstable-2021-07-06";
|
2016-06-03 17:42:33 +01:00
|
|
|
|
2016-06-06 11:26:56 +01:00
|
|
|
src = fetchFromGitHub {
|
2018-04-09 08:55:39 +01:00
|
|
|
owner = "dinedal";
|
|
|
|
repo = "textql";
|
2022-04-13 12:45:10 +01:00
|
|
|
rev = "fca00ecc76c8d9891b195ad2c1359d39f0213604";
|
|
|
|
sha256 = "1v1nq7q2jr7d7kimlbykmh9d73cw750ybcz7v7l091qxjsii3irm";
|
2016-06-03 17:42:33 +01:00
|
|
|
};
|
|
|
|
|
2022-04-13 12:45:10 +01:00
|
|
|
patches = [
|
|
|
|
# fix build with go 1.17
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/jawn-smith/textql/commit/a0d7038c8c30671dfd618f47322814ab492c11a1.patch";
|
|
|
|
sha256 = "1yjdbwipjxxhfcqlj1z6ngsm7dr8gfp4l61jynn2iw7f02cn1yck";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
|
|
|
vendorSha256 = "1h77wfs3plgcsysb13jk526gnbcw2j0xbbrvc68mz6nk1mj6scgw";
|
|
|
|
|
2018-04-09 08:55:39 +01:00
|
|
|
postInstall = ''
|
|
|
|
install -Dm644 -t $out/share/man/man1 ${src}/man/textql.1
|
|
|
|
'';
|
|
|
|
|
|
|
|
# needed for tests
|
|
|
|
nativeBuildInputs = [ sqlite ];
|
|
|
|
|
|
|
|
doCheck = true;
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2016-06-03 17:42:33 +01:00
|
|
|
description = "Execute SQL against structured text like CSV or TSV";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://github.com/dinedal/textql";
|
2016-06-03 17:42:33 +01:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ vrthra ];
|
|
|
|
};
|
|
|
|
}
|