nixos/librenms: use db socket when set and add package option (#359182)
[NixPkgs.git] / pkgs / applications / networking / cluster / tftui / default.nix
blob41a8fc4cbe745f3aedb86c5aee8383e6cd05060d
2   lib,
3   fetchFromGitHub,
4   makeWrapper,
5   python3,
6   enableUsageTracking ? false,
7 }:
9 python3.pkgs.buildPythonApplication rec {
10   pname = "tftui";
11   version = "0.13.5";
12   pyproject = true;
14   src = fetchFromGitHub {
15     owner = "idoavrah";
16     repo = "terraform-tui";
17     rev = "refs/tags/v${version}";
18     hash = "sha256-xOlPuPVwfVT7jfBJPqZ5FbOs80HE0k2ZqcA+Jcxh9p4=";
19   };
21   pythonRelaxDeps = [
22     "textual"
23   ];
25   nativeBuildInputs = with python3.pkgs; [
26     makeWrapper
27     poetry-core
28   ];
30   propagatedBuildInputs = with python3.pkgs; [
31     posthog
32     pyperclip
33     requests
34     rich
35     textual
36   ];
38   pythonImportsCheck = [
39     "tftui"
40   ];
42   postInstall = lib.optionalString (!enableUsageTracking) ''
43     wrapProgram $out/bin/tftui \
44       --add-flags "--disable-usage-tracking"
45   '';
47   meta = with lib; {
48     description = "Textual UI to view and interact with Terraform state";
49     homepage = "https://github.com/idoavrah/terraform-tui";
50     changelog = "https://github.com/idoavrah/terraform-tui/releases/tag/v${version}";
51     license = licenses.asl20;
52     maintainers = with maintainers; teams.bitnomial.members;
53     mainProgram = "tftui";
54   };