2023-05-24 13:37:59 +00:00
|
|
|
{ lib
|
|
|
|
, buildGoModule
|
|
|
|
, fetchFromGitHub
|
|
|
|
, stdenv
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "goose";
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "3.19.2";
|
2023-05-24 13:37:59 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "pressly";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2024-04-21 15:54:59 +00:00
|
|
|
hash = "sha256-kGa3vZSFQ8Dgndc0qRnFnQwlU2hst6j3UFUXw+tfYR0=";
|
2023-05-24 13:37:59 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
proxyVendor = true;
|
2024-04-21 15:54:59 +00:00
|
|
|
vendorHash = "sha256-aoBxReKRk7dkFR/fJ5uHDZrJRGutLTU2BhDWCTBN2BA=";
|
2023-05-24 13:37:59 +00:00
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
# skipping: end-to-end tests require a docker daemon
|
2023-05-24 13:37:59 +00:00
|
|
|
postPatch = ''
|
|
|
|
rm -r tests/e2e
|
|
|
|
rm -r tests/gomigrations
|
|
|
|
rm -r tests/vertica
|
|
|
|
'';
|
|
|
|
|
|
|
|
ldflags = [
|
|
|
|
"-s"
|
|
|
|
"-w"
|
|
|
|
"-X=main.gooseVersion=${version}"
|
|
|
|
];
|
|
|
|
|
|
|
|
checkFlags = [
|
2024-04-21 15:54:59 +00:00
|
|
|
# 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"
|
2023-05-24 13:37:59 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
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; [ yuka ];
|
2024-01-02 11:29:13 +00:00
|
|
|
mainProgram = "goose";
|
2023-05-24 13:37:59 +00:00
|
|
|
};
|
|
|
|
}
|