Loading pkgs/os-specific/linux/prl-tools/default.nix +2 −2 Original line number Diff line number Diff line Loading @@ -37,13 +37,13 @@ let in stdenv.mkDerivation (finalAttrs: { pname = "prl-tools"; version = "20.1.0-55732"; version = "20.1.1-55740"; # We download the full distribution to extract prl-tools-lin.iso from # => ${dmg}/Parallels\ Desktop.app/Contents/Resources/Tools/prl-tools-lin.iso src = fetchurl { url = "https://download.parallels.com/desktop/v${lib.versions.major finalAttrs.version}/${finalAttrs.version}/ParallelsDesktop-${finalAttrs.version}.dmg"; hash = "sha256-WKYsLcr7m6VAjYZu4BNxaarI7x/a7onlalQpV/Qws0w="; hash = "sha256-3Lo/tAPn3vYvHXV9r8VeMkxKjRPpr8fhADh0vyppC0k="; }; hardeningDisable = [ "pic" "format" ]; Loading pkgs/os-specific/linux/prl-tools/update.sh +6 −4 Original line number Diff line number Diff line #!/usr/bin/env nix-shell #!nix-shell -i bash -p curl jq #!nix-shell -i bash -p curl jq libxml2 set -eu -o pipefail Loading @@ -11,13 +11,15 @@ path="$nixpkgs/pkgs/os-specific/linux/prl-tools/default.nix" kb_url="https://kb.parallels.com/en/130212" content="$(curl -s "$kb_url")" # Match latest version from Parallels knowledge base regex='<meta property="og:description" content="[^"]*Parallels Desktop[\ 0-9]*for Mac ([0-9]+\.[0-9]+\.[0-9+]) \(([0-9]+)\)[^"]*" />' if [[ $content =~ $regex ]]; then # Parse HTML content and retrieve og:description for header metadata description=$(echo "$content" | xmllint --recover --html --xpath 'string(//meta[@property="og:description"]/@content)' - 2>/dev/null) regex='[^0-9]+([0-9]+\.[0-9]+\.[0-9]+)[^\(]+\(([0-9]+)\)' if [[ $description =~ $regex ]]; then version="${BASH_REMATCH[1]}-${BASH_REMATCH[2]}" echo "Found latest version: $version" else echo "Failed to extract version from $kb_url" >&2 echo "Retrived description: $description" >&2 exit 1 fi Loading Loading
pkgs/os-specific/linux/prl-tools/default.nix +2 −2 Original line number Diff line number Diff line Loading @@ -37,13 +37,13 @@ let in stdenv.mkDerivation (finalAttrs: { pname = "prl-tools"; version = "20.1.0-55732"; version = "20.1.1-55740"; # We download the full distribution to extract prl-tools-lin.iso from # => ${dmg}/Parallels\ Desktop.app/Contents/Resources/Tools/prl-tools-lin.iso src = fetchurl { url = "https://download.parallels.com/desktop/v${lib.versions.major finalAttrs.version}/${finalAttrs.version}/ParallelsDesktop-${finalAttrs.version}.dmg"; hash = "sha256-WKYsLcr7m6VAjYZu4BNxaarI7x/a7onlalQpV/Qws0w="; hash = "sha256-3Lo/tAPn3vYvHXV9r8VeMkxKjRPpr8fhADh0vyppC0k="; }; hardeningDisable = [ "pic" "format" ]; Loading
pkgs/os-specific/linux/prl-tools/update.sh +6 −4 Original line number Diff line number Diff line #!/usr/bin/env nix-shell #!nix-shell -i bash -p curl jq #!nix-shell -i bash -p curl jq libxml2 set -eu -o pipefail Loading @@ -11,13 +11,15 @@ path="$nixpkgs/pkgs/os-specific/linux/prl-tools/default.nix" kb_url="https://kb.parallels.com/en/130212" content="$(curl -s "$kb_url")" # Match latest version from Parallels knowledge base regex='<meta property="og:description" content="[^"]*Parallels Desktop[\ 0-9]*for Mac ([0-9]+\.[0-9]+\.[0-9+]) \(([0-9]+)\)[^"]*" />' if [[ $content =~ $regex ]]; then # Parse HTML content and retrieve og:description for header metadata description=$(echo "$content" | xmllint --recover --html --xpath 'string(//meta[@property="og:description"]/@content)' - 2>/dev/null) regex='[^0-9]+([0-9]+\.[0-9]+\.[0-9]+)[^\(]+\(([0-9]+)\)' if [[ $description =~ $regex ]]; then version="${BASH_REMATCH[1]}-${BASH_REMATCH[2]}" echo "Found latest version: $version" else echo "Failed to extract version from $kb_url" >&2 echo "Retrived description: $description" >&2 exit 1 fi Loading