Unverified Commit 93854263 authored by Nikolay Korotkiy's avatar Nikolay Korotkiy Committed by GitHub
Browse files

pgroll: modernize (#453515)

parents 54687e1b 2ceed402
Loading
Loading
Loading
Loading
+18 −4
Original line number Diff line number Diff line
@@ -4,16 +4,17 @@
  lib,
  libpg_query,
  xxHash,
  testers,
}:

buildGoModule rec {
buildGoModule (finalAttrs: {
  pname = "pgroll";
  version = "0.14.3";

  src = fetchFromGitHub {
    owner = "xataio";
    repo = "pgroll";
    tag = "v${version}";
    tag = "v${finalAttrs.version}";
    hash = "sha256-OqBgFeXpvoImoPMKHBCvsPQGhHSBZuNNMLh2/3DPPYo=";
  };

@@ -21,16 +22,29 @@ buildGoModule rec {

  vendorHash = "sha256-rQPWL39AD/qCneuRyJHOQCANmDE7pqmwHx+AavJ/3cw=";

  excludedPackages = [ "dev" ];
  excludedPackages = [
    "dev"
    "tools"
  ];

  buildInputs = [
    libpg_query
    xxHash
  ];

  ldflags = [
    "-s"
    "-w"
    "-X github.com/xataio/pgroll/cmd.Version=${finalAttrs.version}"
  ];

  # Tests require a running docker daemon
  doCheck = false;

  passthru.tests.version = testers.testVersion {
    package = finalAttrs.finalPackage;
  };

  meta = {
    description = "PostgreSQL zero-downtime migrations made easy";
    license = lib.licenses.asl20;
@@ -38,4 +52,4 @@ buildGoModule rec {
    homepage = "https://github.com/xataio/pgroll";
    maintainers = with lib.maintainers; [ ilyakooo0 ];
  };
}
})