From fe291c4aee8ab42088535b4195aa047e6c867805 Mon Sep 17 00:00:00 2001 From: Myzel394 <50424412+Myzel394@users.noreply.github.com> Date: Fri, 19 Jun 2026 12:37:37 +0200 Subject: [PATCH] instant-space-switcher: init at 2.0 --- .../in/instant-space-switcher/package.nix | 50 +++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 pkgs/by-name/in/instant-space-switcher/package.nix diff --git a/pkgs/by-name/in/instant-space-switcher/package.nix b/pkgs/by-name/in/instant-space-switcher/package.nix new file mode 100644 index 000000000000..25297ba3a848 --- /dev/null +++ b/pkgs/by-name/in/instant-space-switcher/package.nix @@ -0,0 +1,50 @@ +{ + lib, + stdenvNoCC, + fetchurl, + undmg, + nix-update-script, +}: + +stdenvNoCC.mkDerivation (finalAttrs: { + pname = "instant-space-switcher"; + version = "2.0"; + + src = fetchurl { + url = "https://github.com/jurplel/InstantSpaceSwitcher/releases/download/v${finalAttrs.version}/InstantSpaceSwitcher-${finalAttrs.version}.dmg"; + hash = "sha256-48DH2Hu/XhLPr8jP2ArmLJLFbJmIupkrlqlFOsNnL7g="; + }; + + nativeBuildInputs = [ undmg ]; + + sourceRoot = "."; + + installPhase = '' + runHook preInstall + + mkdir -p "$out/Applications" "$out/bin" + cp -R InstantSpaceSwitcher.app "$out/Applications/" + ln -s "$out/Applications/InstantSpaceSwitcher.app/Contents/MacOS/ISSCli" "$out/bin/isscli" + + runHook postInstall + ''; + + dontBuild = true; + dontFixup = true; + + __structuredAttrs = true; + strictDeps = true; + + passthru.updateScript = nix-update-script { }; + + meta = { + description = "Native instant workspace switching on macOS. No more waiting for animations"; + homepage = "https://github.com/jurplel/InstantSpaceSwitcher"; + changelog = "https://github.com/jurplel/InstantSpaceSwitcher/releases/tag/v${finalAttrs.version}"; + license = lib.licenses.mit; + sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ]; + platforms = lib.platforms.darwin; + mainProgram = "isscli"; + maintainers = with lib.maintainers; [ myzel394 ]; + }; +})