From 3153339a75d34653c550bbcb095c0c01bb62768b Mon Sep 17 00:00:00 2001 From: nayeko Date: Sun, 16 Feb 2025 08:05:30 +0800 Subject: [PATCH] clashtui: init at 0.2.3 --- pkgs/by-name/cl/clashtui/package.nix | 52 ++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 pkgs/by-name/cl/clashtui/package.nix diff --git a/pkgs/by-name/cl/clashtui/package.nix b/pkgs/by-name/cl/clashtui/package.nix new file mode 100644 index 000000000000..d97f89a9c687 --- /dev/null +++ b/pkgs/by-name/cl/clashtui/package.nix @@ -0,0 +1,52 @@ +{ + lib, + fetchFromGitHub, + rustPlatform, + versionCheckHook, + nix-update-script, +}: + +rustPlatform.buildRustPackage rec { + pname = "clashtui"; + version = "0.2.3"; + + src = fetchFromGitHub { + owner = "JohanChane"; + repo = "clashtui"; + tag = "v${version}"; + hash = "sha256-2iQVYZrqo55EO0ZGn6ktP/3Py5v+LiVgrSYTtaxYXyQ="; + }; + + sourceRoot = "${src.name}/clashtui"; + + useFetchCargoVendor = true; + + cargoHash = "sha256-8oDnumyn0Ry1AIWNLO2+1HSPsxkVLRLItgEVEXqSRFI="; + + cargoBuildFlags = [ "--all-features" ]; + + checkFlags = [ + # need fhs + "--skip=utils::config::test::test_save_and_load" + ]; + + doInstallCheck = true; + + versionCheckProgramArg = "--version"; + + nativeInstallCheckInputs = [ + versionCheckHook + ]; + + passthru.updateScript = nix-update-script { }; + + meta = { + description = "Mihomo (Clash.Meta) TUI Client"; + homepage = "https://github.com/JohanChane/clashtui"; + changelog = "https://github.com/JohanChane/clashtui/releases/tag/v${version}"; + mainProgram = "clashtui"; + license = lib.licenses.mit; + platforms = lib.platforms.linux; + maintainers = with lib.maintainers; [ nayeko ]; + }; +}