1{
2 lib,
3 buildGoModule,
4 fetchFromGitHub,
5 nix-update-script,
6 versionCheckHook,
7}:
8
9buildGoModule (finalAttrs: {
10 pname = "tfmigrate";
11 version = "0.4.2";
12
13 src = fetchFromGitHub {
14 owner = "minamijoyo";
15 repo = "tfmigrate";
16 tag = "v${finalAttrs.version}";
17 hash = "sha256-+5nw+EgFTor8XL4cibxkpJL4fdEQ6UuEj5wyOjpaANA=";
18 };
19
20 vendorHash = "sha256-mm34U4nLow4lCz/AgfqYZJRb71GpQjR14+tm0hfmdDc=";
21
22 checkFlags = [
23 "-skip TestExecutorDir" # assumes /usr/bin to be present
24 ];
25
26 doInstallCheck = true;
27 nativeInstallCheckInputs = [ versionCheckHook ];
28
29 passthru.updateScript = nix-update-script { };
30
31 meta = {
32 description = "Terraform / OpenTofu state migration tool for GitOps ";
33 homepage = "https://github.com/minamijoyo/tfmigrate";
34 changelog = "https://github.com/minamijoyo/tfmigrate/releases/tag/v${finalAttrs.version}";
35 license = lib.licenses.mit;
36 maintainers = with lib.maintainers; [ lykos153 ];
37 mainProgram = "tfmigrate";
38 };
39})