about summary refs log tree commit diff
path: root/pkgs/development/tools/sqldef/default.nix
blob: 6ce1d02e9f8561c0d4a4dfe3c5e18557bfb1bd1b (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
{ lib, buildGoModule, fetchFromGitHub, libpg_query, xxHash, postgresql }:

buildGoModule rec {
  pname = "sqldef";
  version = "0.16.4";

  src = fetchFromGitHub {
    owner = "k0kubun";
    repo = "sqldef";
    rev = "v${version}";
    hash = "sha256-HQ6WyeKYRd+pY/P2Bsu7W2eMjgpjUhbwEFE7bADrxDY=";
  };

  proxyVendor = true;

  vendorHash = "sha256-YdZo2XN+425s0K/3COqQx3g1Bpus4uWiwnzrYJ8qdOM=";

  ldflags = [ "-s" "-w" "-X main.version=${version}" ];

  # The test requires a running database
  doCheck = false;

  meta = with lib; {
    description = "Idempotent SQL schema management tool";
    license = with licenses; [ mit /* for everything except parser */  asl20 /* for parser */ ];
    homepage = "https://github.com/k0kubun/sqldef";
    changelog = "https://github.com/k0kubun/sqldef/blob/v${version}/CHANGELOG.md";
    maintainers = with maintainers; [ kgtkr ];
  };
}