diff --git a/nixos/doc/manual/release-notes/rl-2511.section.md b/nixos/doc/manual/release-notes/rl-2511.section.md index a1fe86259e6b..2a3b4ea5d065 100644 --- a/nixos/doc/manual/release-notes/rl-2511.section.md +++ b/nixos/doc/manual/release-notes/rl-2511.section.md @@ -392,3 +392,5 @@ - `sparkleshare` has been removed as it no longer builds and has been abandoned upstream. - The `open-webui` package's postgres support have been moved to optional dependencies to comply with upstream changes in 0.6.26. + +- `prl-tools` has been moved out of `linuxPackages` because Parallels Guest Tools become driverless since 26.1.0. diff --git a/nixos/modules/virtualisation/parallels-guest.nix b/nixos/modules/virtualisation/parallels-guest.nix index 8d4d1851b45d..490a6beab3f6 100644 --- a/nixos/modules/virtualisation/parallels-guest.nix +++ b/nixos/modules/virtualisation/parallels-guest.nix @@ -1,6 +1,7 @@ { config, lib, + pkgs, ... }: @@ -27,20 +28,11 @@ in type = types.bool; default = false; description = '' - This enables Parallels Tools for Linux guests, along with provided - video, mouse and other hardware drivers. + This enables Parallels Tools for Linux guests. ''; }; - package = mkOption { - type = types.nullOr types.package; - default = config.boot.kernelPackages.prl-tools; - defaultText = "config.boot.kernelPackages.prl-tools"; - example = literalExpression "config.boot.kernelPackages.prl-tools"; - description = '' - Defines which package to use for prl-tools. Override to change the version. - ''; - }; + package = lib.mkPackageOption pkgs "prl-tools" { }; }; }; @@ -53,10 +45,6 @@ in boot.extraModulePackages = [ prl-tools ]; - boot.kernelModules = [ - "prl_tg" - ]; - services.timesyncd.enable = false; systemd.services.prltoolsd = { diff --git a/pkgs/os-specific/linux/prl-tools/default.nix b/pkgs/by-name/pr/prl-tools/package.nix similarity index 80% rename from pkgs/os-specific/linux/prl-tools/default.nix rename to pkgs/by-name/pr/prl-tools/package.nix index 1f9cf0e7651c..7c78f14257bb 100644 --- a/pkgs/os-specific/linux/prl-tools/default.nix +++ b/pkgs/by-name/pr/prl-tools/package.nix @@ -1,32 +1,28 @@ { - lib, - stdenv, - fetchurl, autoPatchelfHook, + bash, bbe, + coreutils, + cups, + dbus, + fetchurl, + fuse, + gawk, + glib, + lib, makeWrapper, + netcat, p7zip, perl, - undmg, - dbus-glib, - fuse, - glib, - xorg, - zlib, - kernel, - bash, - cups, - gawk, - netcat, + stdenv, timetrap, + undmg, util-linux, wayland, + xorg, }: let - kernelVersion = kernel.modDirVersion; - kernelDir = "${kernel.dev}/lib/modules/${kernelVersion}"; - libPath = lib.concatStringsSep ":" [ "${glib.out}/lib" "${xorg.libXrandr}/lib" @@ -34,6 +30,7 @@ let ]; scriptPath = lib.concatStringsSep ":" [ "${bash}/bin" + "${coreutils}/bin" "${cups}/sbin" "${gawk}/bin" "${netcat}/bin" @@ -43,13 +40,13 @@ let in stdenv.mkDerivation (finalAttrs: { pname = "prl-tools"; - version = "26.0.1-57243"; + version = "26.1.1-57288"; # 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-jAOP9g3JCKxOFyiDdYJvvM9ecGDbMuCARCEu4sE7Cfs="; + hash = "sha256-11IyKI2oOffzSPTB65XksZI3PD9W2+0SPZIfpb0RLuU="; }; hardeningDisable = [ @@ -64,11 +61,9 @@ stdenv.mkDerivation (finalAttrs: { p7zip perl undmg - ] - ++ kernel.moduleBuildDependencies; + ]; buildInputs = [ - dbus-glib fuse glib xorg.libX11 @@ -77,10 +72,10 @@ stdenv.mkDerivation (finalAttrs: { xorg.libXrandr xorg.libXi xorg.libXinerama - zlib ]; runtimeDependencies = [ + dbus glib xorg.libXrandr ]; @@ -91,36 +86,14 @@ stdenv.mkDerivation (finalAttrs: { undmg $src export sourceRoot=prl-tools-build 7z x "Parallels Desktop.app/Contents/Resources/Tools/prl-tools-lin${lib.optionalString stdenv.hostPlatform.isAarch64 "-arm"}.iso" -o$sourceRoot - ( cd $sourceRoot/kmods; tar -xaf prl_mod.tar.gz ) - runHook postUnpack ''; - buildPhase = '' - runHook preBuild - - ( # kernel modules - cd kmods - make -f Makefile.kmods \ - KSRC=${kernelDir}/source \ - HEADERS_CHECK_DIR=${kernelDir}/source \ - KERNEL_DIR=${kernelDir}/build \ - SRC=${kernelDir}/build \ - KVER=${kernelVersion} - ) - - runHook postBuild - ''; + dontBuild = true; installPhase = '' runHook preInstall - ( # kernel modules - cd kmods - mkdir -p $out/lib/modules/${kernelVersion}/extra - cp prl_tg/Toolgate/Guest/Linux/prl_tg/prl_tg.ko $out/lib/modules/${kernelVersion}/extra - ) - ( # tools cd tools/tools${ if stdenv.hostPlatform.isAarch64 then @@ -139,6 +112,10 @@ stdenv.mkDerivation (finalAttrs: { rm -f bin/prltoolsd mv bin/prltoolsd.tmp bin/prltoolsd + # replace hardcoded /usr/bin/prl_fsd + substituteInPlace ../mount.fuse.prl_fsd \ + --replace-fail "/usr/bin/prl_fsd" "$out/bin/prl_fsd" + # install binaries for i in bin/* sbin/prl_nettool sbin/prl_snapshot; do # also patch binaries to replace /usr/bin/XXX to XXX @@ -156,6 +133,7 @@ stdenv.mkDerivation (finalAttrs: { install -Dm755 $i $out/$i done + install -Dm755 ../../tools/mount.fuse.prl_fsd $out/sbin/mount.fuse.prl_fsd install -Dm755 ../../tools/prlfsmountd.sh $out/sbin/prlfsmountd install -Dm755 ../../tools/prlbinfmtconfig.sh $out/sbin/prlbinfmtconfig for f in $out/bin/* $out/sbin/*; do @@ -170,7 +148,7 @@ stdenv.mkDerivation (finalAttrs: { done substituteInPlace ../99prltoolsd-hibernate \ - --replace "/bin/bash" "${bash}/bin/bash" + --replace-fail "/bin/bash" "${bash}/bin/bash" mkdir -p $out/etc/pm/sleep.d install -Dm644 ../99prltoolsd-hibernate $out/etc/pm/sleep.d diff --git a/pkgs/os-specific/linux/prl-tools/update.sh b/pkgs/by-name/pr/prl-tools/update.sh similarity index 97% rename from pkgs/os-specific/linux/prl-tools/update.sh rename to pkgs/by-name/pr/prl-tools/update.sh index c6999c494d01..cd2a9ff22b57 100755 --- a/pkgs/os-specific/linux/prl-tools/update.sh +++ b/pkgs/by-name/pr/prl-tools/update.sh @@ -4,7 +4,7 @@ set -eu -o pipefail nixpkgs="$(git rev-parse --show-toplevel)" -path="$nixpkgs/pkgs/os-specific/linux/prl-tools/default.nix" +path="$nixpkgs/pkgs/by-name/pr/prl-tools/default.nix" # Currently this script only supports Parallels 26 # Please change the knowledge base url after each major release diff --git a/pkgs/top-level/linux-kernels.nix b/pkgs/top-level/linux-kernels.nix index e99677265b8c..380b398694a0 100644 --- a/pkgs/top-level/linux-kernels.nix +++ b/pkgs/top-level/linux-kernels.nix @@ -590,8 +590,6 @@ in netatop = callPackage ../os-specific/linux/netatop { }; - prl-tools = callPackage ../os-specific/linux/prl-tools { }; - isgx = callPackage ../os-specific/linux/isgx { }; rr-zen_workaround = callPackage ../development/tools/analysis/rr/zen_workaround.nix { }; @@ -723,6 +721,7 @@ in system76-scheduler = lib.warnOnInstantiate "kernelPackages.system76-scheduler is now pkgs.system76-scheduler" pkgs.system76-scheduler; # Added 2024-10-16 tuxedo-keyboard = self.tuxedo-drivers; # Added 2024-09-28 phc-intel = throw "phc-intel drivers are no longer supported by any kernel >=4.17"; # added 2025-07-18 + prl-tools = throw "Parallel Tools no longer provide any kernel module, please use pkgs.prl-tools instead."; # added 2025-10-04 } );