re-plistbuddy,betterdisplay,cyberduck,enpass-mac: add PlistBuddy replacement (#503303)

This commit is contained in:
Sandro
2026-03-31 14:34:52 +00:00
committed by GitHub
4 changed files with 34 additions and 10 deletions
+2 -2
View File
@@ -6,7 +6,7 @@
nix-update-script,
versionCheckHook,
writeShellScript,
xcbuild,
re-plistbuddy,
}:
stdenvNoCC.mkDerivation (finalAttrs: {
@@ -37,7 +37,7 @@ stdenvNoCC.mkDerivation (finalAttrs: {
nativeInstallCheckInputs = [ versionCheckHook ];
versionCheckProgram = writeShellScript "version-check" ''
${xcbuild}/bin/PlistBuddy -c "Print :CFBundleShortVersionString" "$1"
${lib.getExe' re-plistbuddy "PlistBuddy"} -c "Print :CFBundleShortVersionString" "$1"
'';
versionCheckProgramArg = [
"${placeholder "out"}/Applications/BetterDisplay.app/Contents/Info.plist"
+3 -4
View File
@@ -6,8 +6,7 @@
makeBinaryWrapper,
versionCheckHook,
writeShellScript,
coreutils,
xcbuild,
re-plistbuddy,
}:
stdenvNoCC.mkDerivation (finalAttrs: {
pname = "cyberduck";
@@ -36,8 +35,8 @@ 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")
marketing_version=$(${lib.getExe' re-plistbuddy "PlistBuddy"} -c "Print :CFBundleShortVersionString" "$1")
build_version=$(${lib.getExe' re-plistbuddy "PlistBuddy"} -c "Print :CFBundleVersion" "$1")
echo $marketing_version.$build_version
'';
+3 -4
View File
@@ -12,8 +12,7 @@
common-updater-scripts,
versionCheckHook,
writeShellScript,
coreutils,
xcbuild,
re-plistbuddy,
}:
stdenvNoCC.mkDerivation (finalAttrs: {
@@ -71,8 +70,8 @@ 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")
marketing_version=$(${lib.getExe' re-plistbuddy "PlistBuddy"} -c "Print :CFBundleShortVersionString" "$1")
build_version=$(${lib.getExe' re-plistbuddy "PlistBuddy"} -c "Print :CFBundleVersion" "$1")
echo $marketing_version.$build_version
'';
+26
View File
@@ -0,0 +1,26 @@
{
lib,
fetchFromGitHub,
rustPlatform,
}:
rustPlatform.buildRustPackage rec {
pname = "re-plistbuddy";
version = "1.1.0";
src = fetchFromGitHub {
owner = "viraptor";
repo = "re-plistbuddy";
tag = version;
hash = "sha256-Iumrj0JLpdrS3cg3jAj/Wrbx7PthlCnTuRMYsYdywyw=";
};
cargoHash = "sha256-RyHM6CMxdhDJrg6mGt8jQCDLVjt0BiLYswelOHoellw=";
meta = {
description = "Open reimplementation of Apple's PlistBuddy and plutil";
homepage = "https://github.com/viraptor/re-plistbuddy";
license = with lib.licenses; [ mit ];
maintainers = with lib.maintainers; [ viraptor ];
platforms = lib.platforms.darwin;
};
}