nix: Fix (potential) glibc errors in dev shell (#17974)

Marek Fajkus created

Previously the rustc and cargo did were not declared dependencies
supplied to devshell. This means that shell relied some impure cargo and
rustc version found in the system. This lead to issues with GLIBC
version on systems which have different GLIBC version globally.

This package exposes nixpkgs rustc and cargo version into the shell
preventing issues with incompatibility.

Release Notes:

- N/A

Change summary

nix/shell.nix | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)

Detailed changes

nix/shell.nix 🔗

@@ -20,6 +20,8 @@ in
       wayland
       xorg.libxcb
       vulkan-loader
+      rustc
+      cargo
     ];
   in
     pkgs.mkShell.override {inherit stdenv;} {
@@ -36,10 +38,7 @@ in
       inherit buildInputs;
 
       shellHook = ''
-        export LD_LIBRARY_PATH="${pkgs.lib.makeLibraryPath ([
-            pkgs.vulkan-loader
-          ]
-          ++ buildInputs)}:$LD_LIBRARY_PATH"
+        export LD_LIBRARY_PATH="${pkgs.lib.makeLibraryPath buildInputs}:$LD_LIBRARY_PATH"
         export PROTOC="${pkgs.protobuf}/bin/protoc"
       '';