From 655986c7e59b909619b851a4b0aeeeb110c9a002 Mon Sep 17 00:00:00 2001 From: Benedikt Ritter Date: Mon, 6 Jul 2026 12:18:05 +0200 Subject: [PATCH] unifly: init at 0.9.2 --- pkgs/by-name/un/unifly/package.nix | 58 ++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 pkgs/by-name/un/unifly/package.nix diff --git a/pkgs/by-name/un/unifly/package.nix b/pkgs/by-name/un/unifly/package.nix new file mode 100644 index 000000000000..6b08538ccda6 --- /dev/null +++ b/pkgs/by-name/un/unifly/package.nix @@ -0,0 +1,58 @@ +{ + lib, + rustPlatform, + fetchFromGitHub, + pkg-config, + llvmPackages, + installShellFiles, + dbus, + versionCheckHook, + stdenv, + nix-update-script, +}: + +rustPlatform.buildRustPackage (finalAttrs: { + __structuredAttrs = true; + + pname = "unifly"; + version = "0.9.2"; + + src = fetchFromGitHub { + owner = "hyperb1iss"; + repo = "unifly"; + tag = "v${finalAttrs.version}"; + hash = "sha256-Hw/zm9OjBcAI0H2vvwnAj4tjF0E+d6RHpWIexhPBuy8="; + }; + + nativeBuildInputs = [ + pkg-config + llvmPackages.bintools + installShellFiles + ]; + + buildInputs = [ dbus ]; + + cargoHash = "sha256-4nLfMzlN5KQK3JvmoHbktI/tyc3aaI78Oa5RtQN4xLo="; + + doCheck = false; + doInstallCheck = true; + nativeInstallCheckInputs = [ versionCheckHook ]; + + postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) '' + installShellCompletion --cmd unifly \ + --bash <($out/bin/unifly completions bash) \ + --fish <($out/bin/unifly completions fish) \ + --zsh <($out/bin/unifly completions zsh) + ''; + + passthru.updateScript = nix-update-script { }; + + meta = { + description = "Elegant UniFi network management CLI & TUI - for humans and agents"; + homepage = "https://hyperb1iss.github.io/unifly"; + changelog = "https://github.com/hyperb1iss/unifly/releases/tag/v${finalAttrs.version}"; + license = lib.licenses.apsl20; + maintainers = with lib.maintainers; [ britter ]; + mainProgram = "unifly"; + }; +})