mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-10-03 21:40:12 +00:00
59 lines
1.6 KiB
Nix
59 lines
1.6 KiB
Nix
{
|
|
lib,
|
|
stdenvNoCC,
|
|
fetchurl,
|
|
undmg,
|
|
nix-update-script,
|
|
versionCheckHook,
|
|
writeShellScript,
|
|
re-plistbuddy,
|
|
}:
|
|
|
|
stdenvNoCC.mkDerivation (finalAttrs: {
|
|
pname = "betterdisplay";
|
|
version = "4.3.4";
|
|
|
|
src = fetchurl {
|
|
url = "https://github.com/waydabber/BetterDisplay/releases/download/v${finalAttrs.version}/BetterDisplay-v${finalAttrs.version}.dmg";
|
|
hash = "sha256-I0Ei9+TsbmsA6iFD1CwScgrU7OO9mL3fl3/uvCYS4JI=";
|
|
};
|
|
|
|
dontPatch = true;
|
|
dontConfigure = true;
|
|
dontBuild = true;
|
|
dontFixup = true;
|
|
|
|
buildInputs = [ undmg ];
|
|
|
|
sourceRoot = ".";
|
|
installPhase = ''
|
|
runHook preInstall
|
|
|
|
mkdir -p $out/Applications
|
|
mv BetterDisplay.app $out/Applications
|
|
|
|
runHook postInstall
|
|
'';
|
|
|
|
nativeInstallCheckInputs = [ versionCheckHook ];
|
|
versionCheckProgram = writeShellScript "version-check" ''
|
|
${lib.getExe' re-plistbuddy "PlistBuddy"} -c "Print :CFBundleShortVersionString" "$1"
|
|
'';
|
|
versionCheckProgramArg = [
|
|
"${placeholder "out"}/Applications/BetterDisplay.app/Contents/Info.plist"
|
|
];
|
|
doInstallCheck = true;
|
|
|
|
passthru.updateScript = nix-update-script { };
|
|
|
|
meta = {
|
|
description = "Unlock your displays on your Mac! Flexible HiDPI scaling, XDR/HDR extra brightness, virtual screens, DDC control, extra dimming, PIP/streaming, EDID override and lots more";
|
|
homepage = "https://betterdisplay.pro/";
|
|
changelog = "https://github.com/waydabber/BetterDisplay/releases/tag/v${finalAttrs.version}";
|
|
license = lib.licenses.unfree;
|
|
sourceProvenance = [ lib.sourceTypes.binaryNativeCode ];
|
|
maintainers = with lib.maintainers; [ DimitarNestorov ];
|
|
platforms = lib.platforms.darwin;
|
|
};
|
|
})
|