depot/third_party/nixpkgs/pkgs/os-specific/darwin/rectangle/default.nix
Default email c7e6337bd0 Project import generated by Copybara.
GitOrigin-RevId: 08e4dc3a907a6dfec8bb3bbf1540d8abbffea22b
2023-04-29 12:46:19 -04:00

44 lines
983 B
Nix

{ lib
, stdenvNoCC
, fetchurl
, undmg
, gitUpdater
}:
stdenvNoCC.mkDerivation rec {
pname = "rectangle";
version = "0.68";
src = fetchurl {
url = "https://github.com/rxhanson/Rectangle/releases/download/v${version}/Rectangle${version}.dmg";
hash = "sha256-N1zSMmRo6ux/b16K4Og68A5bfht2WWi7S40Yys3QkTY=";
};
sourceRoot = ".";
nativeBuildInputs = [ undmg ];
installPhase = ''
runHook preInstall
mkdir -p $out/Applications
mv Rectangle.app $out/Applications
runHook postInstall
'';
passthru.updateScript = gitUpdater {
url = "https://github.com/rxhanson/Rectangle";
rev-prefix = "v";
};
meta = with lib; {
description = "Move and resize windows in macOS using keyboard shortcuts or snap areas";
homepage = "https://rectangleapp.com/";
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
platforms = platforms.darwin;
maintainers = with maintainers; [ Enzime ];
license = licenses.mit;
};
}