Skip to content

Commit 0801558

Browse files
authored
linuxPackages_latest.prl-tools: 20.0.1-55659 -> 20.1.0-55732 (#347841)
2 parents d69615d + c4f5ce6 commit 0801558

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

pkgs/os-specific/linux/prl-tools/default.nix

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,13 @@ let
3737
in
3838
stdenv.mkDerivation (finalAttrs: {
3939
pname = "prl-tools";
40-
version = "20.0.1-55659";
40+
version = "20.1.0-55732";
4141

4242
# We download the full distribution to extract prl-tools-lin.iso from
4343
# => ${dmg}/Parallels\ Desktop.app/Contents/Resources/Tools/prl-tools-lin.iso
4444
src = fetchurl {
4545
url = "https://download.parallels.com/desktop/v${lib.versions.major finalAttrs.version}/${finalAttrs.version}/ParallelsDesktop-${finalAttrs.version}.dmg";
46-
hash = "sha256-5h8WZB7L6D9KOgIPSstN1sNcf3FZQiOQFB5MUC4YzvA=";
46+
hash = "sha256-WKYsLcr7m6VAjYZu4BNxaarI7x/a7onlalQpV/Qws0w=";
4747
};
4848

4949
hardeningDisable = [ "pic" "format" ];

pkgs/os-specific/linux/prl-tools/update.sh

100644100755
Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,12 @@ kb_url="https://kb.parallels.com/en/130212"
1212
content="$(curl -s "$kb_url")"
1313

1414
# Match latest version from Parallels knowledge base
15-
regex='<meta property="og:description" content="[^"]*Parallels Desktop ([0-9]+) for Mac ([0-9]+\.[0-9]+\.[0-9+]) \(([0-9]+)\)[^"]*" />'
15+
regex='<meta property="og:description" content="[^"]*Parallels Desktop[\ 0-9]*for Mac ([0-9]+\.[0-9]+\.[0-9+]) \(([0-9]+)\)[^"]*" />'
1616
if [[ $content =~ $regex ]]; then
17-
major_version="${BASH_REMATCH[1]}"
18-
version="${BASH_REMATCH[2]}-${BASH_REMATCH[3]}"
19-
echo "Found latest version: $version, major version: $major_version"
17+
version="${BASH_REMATCH[1]}-${BASH_REMATCH[2]}"
18+
echo "Found latest version: $version"
2019
else
21-
echo "Failed to extract version from $kb_url"
20+
echo "Failed to extract version from $kb_url" >&2
2221
exit 1
2322
fi
2423

@@ -30,10 +29,11 @@ if [[ "$old_version" > "$version" || "$old_version" == "$version" ]]; then
3029
fi
3130

3231
# Update version and hash
32+
major_version=$(echo $version | cut -d. -f1)
3333
dmg_url="https://download.parallels.com/desktop/v${major_version}/${version}/ParallelsDesktop-${version}.dmg"
3434
sha256="$(nix store prefetch-file $dmg_url --json | jq -r '.hash')"
35-
sed -i -e "s/version = \"$old_version\"/version = \"$version\"/" \
36-
-e "s/hash = \"sha256-.*\"/hash = \"$sha256\"/" "$path"
35+
sed -i -e "s,version = \"$old_version\",version = \"$version\"," \
36+
-e "s,hash = \"sha256-.*\",hash = \"$sha256\"," "$path"
3737

3838
git commit -qm "linuxPackages_latest.prl-tools: $old_version -> $version" "$path"
3939
echo "Updated linuxPackages_latest.prl-tools $old_version -> $version"

0 commit comments

Comments
 (0)