2021-01-25 08:26:54 +00:00
|
|
|
{ lib, buildGoPackage, fetchFromGitHub, sqlite }:
|
2016-06-03 16:42:33 +00:00
|
|
|
|
|
|
|
buildGoPackage rec {
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "textql";
|
2016-06-03 16:42:33 +00:00
|
|
|
version = "2.0.3";
|
2017-09-22 19:24:43 +00:00
|
|
|
|
2016-06-03 16:42:33 +00:00
|
|
|
goPackagePath = "github.com/dinedal/textql";
|
|
|
|
|
2016-06-06 10:26:56 +00:00
|
|
|
src = fetchFromGitHub {
|
2018-04-09 07:55:39 +00:00
|
|
|
owner = "dinedal";
|
|
|
|
repo = "textql";
|
|
|
|
rev = version;
|
2016-06-03 16:42:33 +00:00
|
|
|
sha256 = "1b61w4pc5gl7m12mphricihzq7ifnzwn0yyw3ypv0d0fj26h5hc3";
|
|
|
|
};
|
|
|
|
|
2018-04-09 07:55:39 +00:00
|
|
|
postInstall = ''
|
|
|
|
install -Dm644 -t $out/share/man/man1 ${src}/man/textql.1
|
|
|
|
'';
|
|
|
|
|
|
|
|
# needed for tests
|
|
|
|
nativeBuildInputs = [ sqlite ];
|
|
|
|
|
2016-09-10 10:04:13 +00:00
|
|
|
goDeps = ./deps.nix;
|
2016-06-03 16:42:33 +00:00
|
|
|
|
2018-04-09 07:55:39 +00:00
|
|
|
doCheck = true;
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2016-06-03 16:42:33 +00:00
|
|
|
description = "Execute SQL against structured text like CSV or TSV";
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://github.com/dinedal/textql";
|
2016-06-03 16:42:33 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ vrthra ];
|
|
|
|
};
|
|
|
|
}
|