From df966328e0ee9183c57d6f1a409a418a4704b583 Mon Sep 17 00:00:00 2001 From: Andrew Marshall Date: Fri, 9 Feb 2024 13:23:33 -0500 Subject: [PATCH] libvirt: Fix broken when Kernel differs b/w current- and booted-system Libvirt checks this path + $(uname -r), which is the running Kernel. current-system does not necessarily contain the running Kernel, but booted-system does. Broken in ad78ce77647ebccfef86f44202efe7be9a671a24, which ignored the discussion in https://github.com/NixOS/nixpkgs/pull/286330. It is still broken on non-NixOS Linux. --- pkgs/development/libraries/libvirt/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/libraries/libvirt/default.nix b/pkgs/development/libraries/libvirt/default.nix index 783a20d3e6ea..18e49d20e6d7 100644 --- a/pkgs/development/libraries/libvirt/default.nix +++ b/pkgs/development/libraries/libvirt/default.nix @@ -251,7 +251,7 @@ stdenv.mkDerivation rec { --replace '"/usr/bin/pkttyagent"' '"${if isLinux then polkit.bin else "/usr"}/bin/pkttyagent"' substituteInPlace src/util/virpci.c \ - --replace '/lib/modules' '${if isLinux then "/run/current-system/kernel-modules" else ""}/lib/modules' + --replace '/lib/modules' '${if isLinux then "/run/booted-system/kernel-modules" else ""}/lib/modules' patchShebangs . ''