Commit df966328 authored by Andrew Marshall's avatar Andrew Marshall
Browse files

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 ad78ce77, which ignored the
discussion in https://github.com/NixOS/nixpkgs/pull/286330. It is still
broken on non-NixOS Linux.
parent 61950db5
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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 .
    ''