diff --git a/pkgs/os-specific/linux/kernel/manual-config.nix b/pkgs/os-specific/linux/kernel/manual-config.nix index f69de86fd1a6..522eb4608764 100644 --- a/pkgs/os-specific/linux/kernel/manual-config.nix +++ b/pkgs/os-specific/linux/kernel/manual-config.nix @@ -164,6 +164,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.