re-plistbuddy,betterdisplay,cyberduck,enpass-mac: add PlistBuddy replacement (#503303)
This commit is contained in:
@@ -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"
|
||||
|
||||
@@ -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
|
||||
'';
|
||||
|
||||
@@ -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
|
||||
'';
|
||||
|
||||
@@ -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;
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user