Skip to content

Commit 2b2be7f

Browse files
mactracker: add version check
1 parent fef3495 commit 2b2be7f

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

pkgs/by-name/ma/mactracker/package.nix

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@
99
libxml2,
1010
xmlstarlet,
1111
common-updater-scripts,
12+
versionCheckHook,
13+
writeShellScript,
14+
xcbuild,
1215
}:
1316

1417
stdenvNoCC.mkDerivation (finalAttrs: {
@@ -53,6 +56,13 @@ stdenvNoCC.mkDerivation (finalAttrs: {
5356
'';
5457
});
5558

59+
nativeInstallCheckInputs = [ versionCheckHook ];
60+
versionCheckProgram = writeShellScript "version-check" ''
61+
${xcbuild}/bin/PlistBuddy -c "Print :CFBundleVersion" "$1"
62+
'';
63+
versionCheckProgramArg = [ "${placeholder "out"}/Applications/Mactracker.app/Contents/Info.plist" ];
64+
doInstallCheck = true;
65+
5666
meta = {
5767
description = "Mactracker provides detailed information on every Apple Macintosh, iPod, iPhone, iPad, and Apple Watch ever made";
5868
homepage = "https://mactracker.ca";

0 commit comments

Comments
 (0)