From 979150fce920e5e656fb705f0a3d4398af86768b Mon Sep 17 00:00:00 2001 From: Leonard Sheng Sheng Lee Date: Wed, 18 Mar 2026 11:37:23 +0100 Subject: [PATCH] yubiswitch: init at 0.18 Signed-off-by: Leonard Sheng Sheng Lee --- pkgs/by-name/yu/yubiswitch/package.nix | 39 ++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 pkgs/by-name/yu/yubiswitch/package.nix diff --git a/pkgs/by-name/yu/yubiswitch/package.nix b/pkgs/by-name/yu/yubiswitch/package.nix new file mode 100644 index 000000000000..2132f42e99d2 --- /dev/null +++ b/pkgs/by-name/yu/yubiswitch/package.nix @@ -0,0 +1,39 @@ +{ + lib, + stdenvNoCC, + fetchurl, + _7zz, +}: + +stdenvNoCC.mkDerivation (finalAttrs: { + pname = "yubiswitch"; + version = "0.18"; + + src = fetchurl { + url = "https://github.com/pallotron/yubiswitch/releases/download/v${finalAttrs.version}/yubiswitch_${finalAttrs.version}.dmg"; + hash = "sha256-ee7l8jj1pJdj+SjMNWcLfHV//G0FG9bdBkNcxUh8Zuk="; + }; + + sourceRoot = "."; + + nativeBuildInputs = [ _7zz ]; + + installPhase = '' + runHook preInstall + + mkdir -p "$out/Applications" + cp -R yubiswitch.app "$out/Applications" + + runHook postInstall + ''; + + meta = { + description = "macOS status bar application to enable/disable a Yubikey Nano"; + homepage = "https://github.com/pallotron/yubiswitch"; + changelog = "https://github.com/pallotron/yubiswitch/releases/tag/v${finalAttrs.version}"; + license = lib.licenses.gpl3Plus; + sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ]; + platforms = lib.platforms.darwin; + maintainers = with lib.maintainers; [ sheeeng ]; + }; +})