-
-
Notifications
You must be signed in to change notification settings - Fork 46
Expand file tree
/
Copy pathflake.nix
More file actions
58 lines (53 loc) · 1.84 KB
/
flake.nix
File metadata and controls
58 lines (53 loc) · 1.84 KB
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
{
description = "Real-time SQL traffic viewer — proxy daemon + TUI / Web client";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
flake-utils.url = "github:numtide/flake-utils";
};
outputs =
{ self
, nixpkgs
, flake-utils
}:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = nixpkgs.legacyPackages.${system};
version = self.shortRev or self.dirtyShortRev or "dev";
in
{
packages = {
sql-tap = pkgs.buildGoModule {
pname = "sql-tap";
inherit version;
src = pkgs.lib.cleanSource self;
subPackages = [ "." "cmd/sql-tapd" ];
# When go.mod or go.sum changes, update this hash by running:
# nix build 2>&1 | grep "got:" | awk '{print $2}'
# and replacing pkgs.lib.fakeHash below with the output.
vendorHash = pkgs.lib.fakeHash;
ldflags = [
"-s"
"-w"
"-X main.version=${version}"
];
meta = with pkgs.lib; {
description = "Watch SQL traffic in real-time with a TUI";
longDescription = ''
sql-tap sits between your application and your database
(PostgreSQL, MySQL, or TiDB), capturing every query and
displaying it in an interactive terminal UI. Inspect queries,
view transactions, and run EXPLAIN — all without changing your
application code.
'';
homepage = "https://github.com/mickamy/sql-tap";
license = licenses.mit;
maintainers = [ ];
mainProgram = "sql-tap";
platforms = platforms.unix;
};
};
default = self.packages.${system}.sql-tap;
};
}
);
}