depot/third_party/nixpkgs/pkgs/tools/misc/goose/default.nix
Default email 5c370c0b2a Project import generated by Copybara.
GitOrigin-RevId: 33d1e753c82ffc557b4a585c77de43d4c922ebb5
2024-05-15 17:35:15 +02:00

52 lines
1.2 KiB
Nix

{ lib
, buildGoModule
, fetchFromGitHub
, stdenv
}:
buildGoModule rec {
pname = "goose";
version = "3.20.0";
src = fetchFromGitHub {
owner = "pressly";
repo = pname;
rev = "v${version}";
hash = "sha256-DgxFczS2YAnicf8RTMf7gDzCtDyj/zqzrGfeb3YcYzg=";
};
proxyVendor = true;
vendorHash = "sha256-KzIOylWrsOF5oAuuFKUKVSnSJWq3KWZ3Ot7sryNnjIY=";
# skipping: end-to-end tests require a docker daemon
postPatch = ''
rm -r tests/gomigrations
'';
subPackages = [
"cmd/goose"
];
ldflags = [
"-s"
"-w"
"-X=main.version=${version}"
];
checkFlags = [
# NOTE:
# - skipping: these also require a docker daemon
# - these are for go tests that live outside of the /tests directory
"-skip=TestClickUpDown|TestClickHouseFirstThree|TestLockModeAdvisorySession|TestDialectStore|TestGoMigrationStats|TestPostgresSessionLocker"
];
doCheck = !stdenv.isDarwin;
meta = with lib; {
description = "Database migration tool which supports SQL migrations and Go functions";
homepage = "https://pressly.github.io/goose/";
license = licenses.bsd3;
maintainers = with maintainers; [ ];
mainProgram = "goose";
};
}