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";
|
2023-08-22 20:05:09 +00:00
|
|
|
version = "0.70";
|
2022-10-06 18:32:54 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://github.com/rxhanson/Rectangle/releases/download/v${version}/Rectangle${version}.dmg";
|
2023-08-22 20:05:09 +00:00
|
|
|
hash = "sha256-YJYDzmFfLlXDupyEjoEAin5qynyLjXjuav1DSS/Q5zU=";
|
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-08-22 20:05:09 +00:00
|
|
|
maintainers = with maintainers; [ Enzime Intuinewin ];
|
2022-10-06 18:32:54 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|