secret-santa/nix/sql-migrate.nix

42 lines
741 B
Nix
Raw Permalink Normal View History

2024-11-17 23:54:24 +01:00
{
stdenv,
lib,
buildGoModule,
fetchFromGitHub,
substituteAll,
2024-11-14 06:42:17 +01:00
}:
buildGoModule rec {
pname = "sql-migrate";
version = "1.7.0";
src = fetchFromGitHub {
owner = "rubenv";
repo = "sql-migrate";
rev = "v${version}";
hash = "sha256-UAkZkLiUI0aTYLkgXW/Im0POjFCEnZa5zAE435LJKMg=";
};
vendorHash = "sha256-rBVFxzppP71txZPk7C1O+eHCEuCzHFWZKdyOFYOqpfA=";
ldflags = [
"-s"
"-w"
2024-11-14 20:05:28 +01:00
];
patches = [
(substituteAll {
src = ./migrate-version.patch;
current_version = "v${version}";
})
2024-11-14 06:42:17 +01:00
];
2024-11-14 20:08:42 +01:00
doCheck = true;
2024-11-14 06:42:17 +01:00
meta = with lib; {
homepage = "https://github.com/rubenv/sql-migrate";
description = "SQL schema migration tool for Go programs";
license = licenses.mit;
};
2024-11-17 23:54:24 +01:00
}