From 697ed7805421c84f6561ffc8e1d51b7a29dc295c Mon Sep 17 00:00:00 2001 From: CnTeng Date: Tue, 10 Jun 2025 21:44:24 +0800 Subject: [PATCH 1/3] opentofu-ls: 0-unstable-2025-02-26 -> 0.0.2 --- pkgs/by-name/op/opentofu-ls/package.nix | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/pkgs/by-name/op/opentofu-ls/package.nix b/pkgs/by-name/op/opentofu-ls/package.nix index 2dc4704d2302..a9a44d500c51 100644 --- a/pkgs/by-name/op/opentofu-ls/package.nix +++ b/pkgs/by-name/op/opentofu-ls/package.nix @@ -2,22 +2,21 @@ lib, buildGoModule, fetchFromGitHub, - versionCheckHook, unstableGitUpdater, }: -buildGoModule { - pname = "opentofu-ls"; - version = "0-unstable-2025-02-26"; +buildGoModule (finalAttrs: { + pname = "tofu-ls"; + version = "0.0.2"; src = fetchFromGitHub { owner = "opentofu"; - repo = "opentofu-ls"; - rev = "978a5fb56519a9f17833709119d2eb5fe604784e"; - hash = "sha256-xBJkIuYqqUan2fo+s426vEIr5Qri8dM5arJACvKFjws="; + repo = "tofu-ls"; + tag = "v${finalAttrs.version}"; + hash = "sha256-ioUhESBnGhVxeJQ+0lZ4tjfCWbc3mS2o584EXuXIqso="; }; - vendorHash = "sha256-CrbLqcwPXHB80m4VhqrC8j5VhU2BUeuNy87+bc+Bq6I="; + vendorHash = "sha256-rUvqIebAhnR9b/RAiW8Md/D8NgDDKro1XodXSCtstjA="; ldflags = [ "-s" @@ -47,9 +46,9 @@ buildGoModule { meta = { description = "OpenTofu Language Server"; - homepage = "https://github.com/opentofu/opentofu-ls"; + homepage = "https://github.com/opentofu/tofu-ls"; license = lib.licenses.mpl20; maintainers = with lib.maintainers; [ GaetanLepage ]; - mainProgram = "opentofu-ls"; + mainProgram = "tofu-ls"; }; -} +}) From 0dbfd62ea5eabfcece0752cb6baaa16363890e38 Mon Sep 17 00:00:00 2001 From: CnTeng Date: Tue, 10 Jun 2025 23:11:05 +0800 Subject: [PATCH 2/3] opentofu-ls: add versionCheckHook --- pkgs/by-name/op/opentofu-ls/package.nix | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pkgs/by-name/op/opentofu-ls/package.nix b/pkgs/by-name/op/opentofu-ls/package.nix index a9a44d500c51..0f478c6885f1 100644 --- a/pkgs/by-name/op/opentofu-ls/package.nix +++ b/pkgs/by-name/op/opentofu-ls/package.nix @@ -2,6 +2,7 @@ lib, buildGoModule, fetchFromGitHub, + versionCheckHook, unstableGitUpdater, }: @@ -21,6 +22,7 @@ buildGoModule (finalAttrs: { ldflags = [ "-s" "-w" + "-X 'main.rawVersion=${finalAttrs.version}'" ]; checkFlags = @@ -40,6 +42,11 @@ buildGoModule (finalAttrs: { __darwinAllowLocalNetworking = true; + nativeInstallCheckInputs = [ versionCheckHook ]; + doInstallCheck = true; + versionCheckProgram = "${placeholder "out"}/bin/tofu-ls"; + versionCheckProgramArg = "--version"; + passthru = { updateScript = unstableGitUpdater { }; }; From ca2feddd846abc089422daca50faac105e1e30b7 Mon Sep 17 00:00:00 2001 From: CnTeng Date: Tue, 10 Jun 2025 23:35:13 +0800 Subject: [PATCH 3/3] opentofu-ls: rename to tofu-ls --- pkgs/by-name/{op/opentofu-ls => to/tofu-ls}/package.nix | 1 - pkgs/top-level/aliases.nix | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) rename pkgs/by-name/{op/opentofu-ls => to/tofu-ls}/package.nix (96%) diff --git a/pkgs/by-name/op/opentofu-ls/package.nix b/pkgs/by-name/to/tofu-ls/package.nix similarity index 96% rename from pkgs/by-name/op/opentofu-ls/package.nix rename to pkgs/by-name/to/tofu-ls/package.nix index 0f478c6885f1..70e65de3cf17 100644 --- a/pkgs/by-name/op/opentofu-ls/package.nix +++ b/pkgs/by-name/to/tofu-ls/package.nix @@ -44,7 +44,6 @@ buildGoModule (finalAttrs: { nativeInstallCheckInputs = [ versionCheckHook ]; doInstallCheck = true; - versionCheckProgram = "${placeholder "out"}/bin/tofu-ls"; versionCheckProgramArg = "--version"; passthru = { diff --git a/pkgs/top-level/aliases.nix b/pkgs/top-level/aliases.nix index 2ec215065942..39f0092a242b 100644 --- a/pkgs/top-level/aliases.nix +++ b/pkgs/top-level/aliases.nix @@ -1448,6 +1448,7 @@ mapAliases { openssl_3_0 = openssl_3; # Added 2022-06-27 opensycl = lib.warnOnInstantiate "'opensycl' has been renamed to 'adaptivecpp'" adaptivecpp; # Added 2024-12-04 opensyclWithRocm = lib.warnOnInstantiate "'opensyclWithRocm' has been renamed to 'adaptivecppWithRocm'" adaptivecppWithRocm; # Added 2024-12-04 + opentofu-ls = lib.warnOnInstantiate "'opentofu-ls' has been renamed to 'tofu-ls'" tofu-ls; # Added 2025-06-10 openvdb_11 = throw "'openvdb_11' has been removed in favor of the latest version'"; # Added 2025-05-03 opera = throw "'opera' has been removed due to lack of maintenance in nixpkgs"; # Added 2025-05-19 orchis = throw "'orchis' has been renamed to/replaced by 'orchis-theme'"; # Converted to throw 2024-10-17