From 795f3e1cbaae5d2aa2b27af316e3b06154838e08 Mon Sep 17 00:00:00 2001 From: Dennis Gosnell Date: Fri, 12 Jan 2024 14:45:27 +0900 Subject: [PATCH] tftui: init at 0.12.4 --- .../networking/cluster/tftui/default.nix | 54 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 2 files changed, 56 insertions(+) create mode 100644 pkgs/applications/networking/cluster/tftui/default.nix diff --git a/pkgs/applications/networking/cluster/tftui/default.nix b/pkgs/applications/networking/cluster/tftui/default.nix new file mode 100644 index 000000000000..3a9d657dbdd2 --- /dev/null +++ b/pkgs/applications/networking/cluster/tftui/default.nix @@ -0,0 +1,54 @@ +{ lib +, buildPythonApplication +, fetchPypi +, makeWrapper +, poetry-core +, posthog +, pyperclip +, requests +, rich +, textual +, enableUsageTracking ? false +}: + +buildPythonApplication rec { + pname = "tftui"; + version = "0.12.4"; + pyproject = true; + + src = fetchPypi { + inherit pname version; + hash = "sha256-E4Y0qA7SooMlHh+oSFUl1hfblpirr/Jdb1C2fqU43t0="; + }; + + propagatedBuildInputs = [ + posthog + pyperclip + requests + rich + textual + ]; + + nativeBuildInputs = [ + makeWrapper + poetry-core + ]; + + pythonImportsCheck = [ + "tftui" + ]; + + postInstall = lib.optionalString (!enableUsageTracking) '' + wrapProgram $out/bin/tftui \ + --add-flags "--disable-usage-tracking" + ''; + + meta = with lib; { + description = "Textual UI to view and interact with Terraform state"; + homepage = "https://github.com/idoavrah/terraform-tui"; + changelog = "https://github.com/idoavrah/terraform-tui/releases"; + license = licenses.asl20; + maintainers = with maintainers; teams.bitnomial.members; + mainProgram = "tftui"; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 50d4dae0f7a4..fae3aca6659e 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -41093,6 +41093,8 @@ with pkgs; tfswitch = callPackage ../applications/networking/cluster/tfswitch { }; + tftui = python3Packages.callPackage ../applications/networking/cluster/tftui { }; + tfupdate = callPackage ../applications/networking/cluster/tfupdate { }; tgswitch = callPackage ../applications/networking/cluster/tgswitch { };