2023-04-19 15:50:16 +02:00
|
|
|
{ lib
|
|
|
|
, stdenvNoCC
|
|
|
|
, fetchurl
|
|
|
|
, undmg
|
|
|
|
, gitUpdater
|
|
|
|
}:
|
2022-10-06 03:03:27 +02:00
|
|
|
|
2023-04-19 15:50:16 +02:00
|
|
|
stdenvNoCC.mkDerivation rec {
|
2022-10-06 03:03:27 +02:00
|
|
|
pname = "rectangle";
|
2024-02-21 23:24:53 +01:00
|
|
|
version = "0.76";
|
2022-10-06 03:03:27 +02:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://github.com/rxhanson/Rectangle/releases/download/v${version}/Rectangle${version}.dmg";
|
2024-02-21 23:24:53 +01:00
|
|
|
hash = "sha256-oHq5mLMWloi6Tf81rjcmUFGwIggtMdyLPqbD/gOzNHU=";
|
2022-10-06 03:03:27 +02:00
|
|
|
};
|
|
|
|
|
2023-04-19 15:50:16 +02:00
|
|
|
sourceRoot = ".";
|
2022-10-06 03:03:27 +02:00
|
|
|
|
|
|
|
nativeBuildInputs = [ undmg ];
|
|
|
|
|
|
|
|
installPhase = ''
|
2023-04-19 15:50:16 +02:00
|
|
|
runHook preInstall
|
|
|
|
|
|
|
|
mkdir -p $out/Applications
|
|
|
|
mv Rectangle.app $out/Applications
|
|
|
|
|
|
|
|
runHook postInstall
|
2022-10-06 03:03:27 +02:00
|
|
|
'';
|
|
|
|
|
2023-04-19 15:50:16 +02:00
|
|
|
passthru.updateScript = gitUpdater {
|
|
|
|
url = "https://github.com/rxhanson/Rectangle";
|
|
|
|
rev-prefix = "v";
|
|
|
|
};
|
|
|
|
|
2022-10-06 03:03:27 +02:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Move and resize windows in macOS using keyboard shortcuts or snap areas";
|
|
|
|
homepage = "https://rectangleapp.com/";
|
2022-10-06 13:09:25 +02:00
|
|
|
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
|
2022-10-06 03:03:27 +02:00
|
|
|
platforms = platforms.darwin;
|
2023-09-18 14:27:39 +02:00
|
|
|
maintainers = with maintainers; [ Enzime Intuinewin wegank ];
|
2022-10-06 03:03:27 +02:00
|
|
|
license = licenses.mit;
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|