summary refs log tree commit diff
path: root/pkgs/development/tools/textql/default.nix
blob: 7b80192a75e7560622ac16f94110a43ee2ad4eca (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
{ lib, buildGoPackage, fetchFromGitHub, sqlite }:

buildGoPackage rec {
  pname = "textql";
  version = "2.0.3";

  goPackagePath = "github.com/dinedal/textql";

  src = fetchFromGitHub {
    owner  = "dinedal";
    repo   = "textql";
    rev    = version;
    sha256 = "1b61w4pc5gl7m12mphricihzq7ifnzwn0yyw3ypv0d0fj26h5hc3";
  };

  postInstall = ''
    install -Dm644 -t $out/share/man/man1 ${src}/man/textql.1
  '';

  # needed for tests
  nativeBuildInputs = [ sqlite ];

  goDeps = ./deps.nix;

  doCheck = true;

  meta = with lib; {
    description = "Execute SQL against structured text like CSV or TSV";
    homepage = "https://github.com/dinedal/textql";
    license = licenses.mit;
    maintainers = with maintainers; [ vrthra ];
  };
}