diff --git a/pkgs/by-name/ra/rapidapi/package.nix b/pkgs/by-name/ra/rapidapi/package.nix index 9f7f6f79948e..108197375beb 100644 --- a/pkgs/by-name/ra/rapidapi/package.nix +++ b/pkgs/by-name/ra/rapidapi/package.nix @@ -8,6 +8,10 @@ cacert, gnugrep, common-updater-scripts, + versionCheckHook, + writeShellScript, + xcbuild, + coreutils, }: stdenvNoCC.mkDerivation (finalAttrs: { @@ -53,6 +57,15 @@ stdenvNoCC.mkDerivation (finalAttrs: { ''; }); + nativeInstallCheckInputs = [ versionCheckHook ]; + versionCheckProgram = writeShellScript "version-check" '' + marketing_version=$(${xcbuild}/bin/PlistBuddy -c "Print :CFBundleShortVersionString" "$1" | ${coreutils}/bin/tr -d '"') + build_version=$(${xcbuild}/bin/PlistBuddy -c "Print :CFBundleVersion" "$1") + echo $marketing_version-$build_version + ''; + versionCheckProgramArg = [ "${placeholder "out"}/Applications/RapidAPI.app/Contents/Info.plist" ]; + doInstallCheck = true; + meta = { description = "Full-featured HTTP client that lets you test and describe the APIs you build or consume"; homepage = "https://paw.cloud";