Skip to content

Commit

Permalink
mactracker: add version check
Browse files Browse the repository at this point in the history
  • Loading branch information
DimitarNestorov committed Jan 5, 2025
1 parent fef3495 commit 2b2be7f
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions pkgs/by-name/ma/mactracker/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
libxml2,
xmlstarlet,
common-updater-scripts,
versionCheckHook,
writeShellScript,
xcbuild,
}:

stdenvNoCC.mkDerivation (finalAttrs: {
Expand Down Expand Up @@ -53,6 +56,13 @@ stdenvNoCC.mkDerivation (finalAttrs: {
'';
});

nativeInstallCheckInputs = [ versionCheckHook ];
versionCheckProgram = writeShellScript "version-check" ''
${xcbuild}/bin/PlistBuddy -c "Print :CFBundleVersion" "$1"
'';
versionCheckProgramArg = [ "${placeholder "out"}/Applications/Mactracker.app/Contents/Info.plist" ];
doInstallCheck = true;

meta = {
description = "Mactracker provides detailed information on every Apple Macintosh, iPod, iPhone, iPad, and Apple Watch ever made";
homepage = "https://mactracker.ca";
Expand Down

0 comments on commit 2b2be7f

Please sign in to comment.