diff --git a/README.md b/README.md index 0c14449..3dd502c 100644 --- a/README.md +++ b/README.md @@ -23,9 +23,17 @@ On other distros: ### Note for Rust -`cat /boot/config-$(uname -r) | grep CONFIG_RUST` +Check required kernel conf CONFIG_RUST=y -Must contains CONFIG_RUST=y +```bash +cat /boot/config-$(uname -r) | grep CONFIG_RUST +``` + +Generate rust-analyzer conf + +```bash +make -C $LINUX_MODULES_FOLDER/build M=$(pwd) rust-analyzer +``` ## make : targets list diff --git a/flake.nix b/flake.nix index c738837..33c7535 100644 --- a/flake.nix +++ b/flake.nix @@ -27,6 +27,11 @@ packages = [ linux.moduleBuildDependencies ] ++ packages; LINUX_MODULES_FOLDER = "${linux.dev}/lib/modules/${linux.modDirVersion}"; + + # Needed to build rust-analyzer conf to avoid error "Source code for the 'core' standard library could not be found" + # with check condition in below of $LINUX_MODULES_FOLDER/source/scripts/rust_is_available.sh file + # https://github.com/NixOS/nixpkgs/blob/6313551cd05425cd5b3e63fe47dbc324eabb15e4/pkgs/os-specific/linux/kernel/generic.nix#L154 + RUST_LIB_SRC = pkgs.rustPlatform.rustLibSrc; shellHook = '' echo "Current Linux Kernel used : ${linux.version}"