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-05-15 15:35:15 +00:00
|
|
|
version = "0.79";
|
2022-10-06 18:32:54 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://github.com/rxhanson/Rectangle/releases/download/v${version}/Rectangle${version}.dmg";
|
2024-05-15 15:35:15 +00:00
|
|
|
hash = "sha256-XczwgLONTt7wL+oW1ruw6wBwZTMd5VyN+79xJy0NUIg=";
|
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;
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|