From a133f3bcb5d18840ff9fa09bf8636f719e8919b8 Mon Sep 17 00:00:00 2001 From: Michael Hoang Date: Mon, 23 Sep 2024 17:03:48 +0700 Subject: [PATCH] swift-quit: init at 1.5 --- pkgs/by-name/sw/swift-quit/package.nix | 36 ++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 pkgs/by-name/sw/swift-quit/package.nix diff --git a/pkgs/by-name/sw/swift-quit/package.nix b/pkgs/by-name/sw/swift-quit/package.nix new file mode 100644 index 000000000000..80b7ef5f89a2 --- /dev/null +++ b/pkgs/by-name/sw/swift-quit/package.nix @@ -0,0 +1,36 @@ +{ + lib, + stdenvNoCC, + fetchurl, + unzip, +}: +stdenvNoCC.mkDerivation (finalAttrs: { + pname = "swift-quit"; + version = "1.5"; + + src = fetchurl { + url = "https://github.com/onebadidea/swiftquit/releases/download/v${finalAttrs.version}/Swift.Quit.zip"; + sha256 = "sha256-pORnyxOhTc/zykBHF5ujsWEZ9FjNauJGeBDz9bnHTvs="; + }; + dontUnpack = true; + + nativeBuildInputs = [ unzip ]; + + installPhase = '' + runHook preInstall + + mkdir -p $out/Applications + unzip -d $out/Applications $src + + runHook postInstall + ''; + + meta = { + description = "Automatic quitting of macOS apps when closing their windows."; + homepage = "https://swiftquit.com/"; + license = lib.licenses.gpl3; + sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ]; + maintainers = with lib.maintainers; [ Enzime ]; + platforms = lib.platforms.darwin; + }; +})