diff --git a/pkgs/os-specific/linux/kernel/manual-config.nix b/pkgs/os-specific/linux/kernel/manual-config.nix index dde97da30c5f..a3a35a6b4585 100644 --- a/pkgs/os-specific/linux/kernel/manual-config.nix +++ b/pkgs/os-specific/linux/kernel/manual-config.nix @@ -150,6 +150,10 @@ let RUST_LIB_SRC = lib.optionalString withRust rustPlatform.rustLibSrc; + # avoid leaking Rust source file names into the final binary, which adds + # a false dependency on rust-lib-src on targets with uncompressed kernels + KRUSTFLAGS = lib.optionalString withRust "--remap-path-prefix ${rustPlatform.rustLibSrc}=/"; + patches = map (p: p.patch) kernelPatches # Required for deterministic builds along with some postPatch magic.