2023-04-29 16:46:19 +00:00
|
|
|
{ lib
|
|
|
|
, stdenvNoCC
|
|
|
|
, fetchurl
|
|
|
|
, undmg
|
|
|
|
, gitUpdater
|
|
|
|
}:
|
2022-10-06 18:32:54 +00:00
|
|
|
|
2023-04-29 16:46:19 +00:00
|
|
|
stdenvNoCC.mkDerivation rec {
|
2022-10-06 18:32:54 +00:00
|
|
|
pname = "rectangle";
|
2024-06-20 14:57:18 +00:00
|
|
|
version = "0.80";
|
2022-10-06 18:32:54 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://github.com/rxhanson/Rectangle/releases/download/v${version}/Rectangle${version}.dmg";
|
2024-06-20 14:57:18 +00:00
|
|
|
hash = "sha256-CmYhMnEhn3UK82RXuT1KQhAoK/0ewcUU6h73el2Lpw8=";
|
2022-10-06 18:32:54 +00:00
|
|
|
};
|
|
|
|
|
2023-04-29 16:46:19 +00:00
|
|
|
sourceRoot = ".";
|
2022-10-06 18:32:54 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [ undmg ];
|
|
|
|
|
|
|
|
installPhase = ''
|
2023-04-29 16:46:19 +00:00
|
|
|
runHook preInstall
|
|
|
|
|
|
|
|
mkdir -p $out/Applications
|
|
|
|
mv Rectangle.app $out/Applications
|
|
|
|
|
|
|
|
runHook postInstall
|
2022-10-06 18:32:54 +00:00
|
|
|
'';
|
|
|
|
|
2023-04-29 16:46:19 +00:00
|
|
|
passthru.updateScript = gitUpdater {
|
|
|
|
url = "https://github.com/rxhanson/Rectangle";
|
|
|
|
rev-prefix = "v";
|
|
|
|
};
|
|
|
|
|
2022-10-06 18:32:54 +00:00
|
|
|
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;
|
2023-10-09 19:29:22 +00:00
|
|
|
maintainers = with maintainers; [ Enzime Intuinewin wegank ];
|
2022-10-06 18:32:54 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|