nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 buildGoModule,
3 fetchFromGitHub,
4 lib,
5 libpg_query,
6 xxHash,
7 testers,
8}:
9
10buildGoModule (finalAttrs: {
11 pname = "pgroll";
12 version = "0.16.0";
13
14 src = fetchFromGitHub {
15 owner = "xataio";
16 repo = "pgroll";
17 tag = "v${finalAttrs.version}";
18 hash = "sha256-xl6mJkJbZ+N/HjrUsknC1UFOM9GFtY4UYnabXvTwkAc=";
19 };
20
21 proxyVendor = true;
22
23 vendorHash = "sha256-j78c7pROEiJVsE0e0hxbr+0uqOmGcBsK1U0F1upgWIw=";
24
25 excludedPackages = [
26 "dev"
27 "tools"
28 ];
29
30 buildInputs = [
31 libpg_query
32 xxHash
33 ];
34
35 ldflags = [
36 "-s"
37 "-w"
38 "-X github.com/xataio/pgroll/cmd.Version=${finalAttrs.version}"
39 ];
40
41 # Tests require a running docker daemon
42 doCheck = false;
43
44 passthru.tests.version = testers.testVersion {
45 package = finalAttrs.finalPackage;
46 };
47
48 meta = {
49 description = "PostgreSQL zero-downtime migrations made easy";
50 license = lib.licenses.asl20;
51 mainProgram = "pgroll";
52 homepage = "https://github.com/xataio/pgroll";
53 maintainers = with lib.maintainers; [ ilyakooo0 ];
54 };
55})