diff --git a/pkgs/os-specific/linux/kernel/manual-config.nix b/pkgs/os-specific/linux/kernel/manual-config.nix index 460a5b0a52b7..38eda04ecb77 100644 --- a/pkgs/os-specific/linux/kernel/manual-config.nix +++ b/pkgs/os-specific/linux/kernel/manual-config.nix @@ -245,11 +245,13 @@ lib.makeOverridable ( rust-bindgen-unwrapped ]; - RUST_LIB_SRC = lib.optionalString withRust rustPlatform.rustLibSrc; + env = { + 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}=/"; + # 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 = # kernelPatches can contain config changes and no actual patch