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

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
This commit is contained in:
Marek Fajkus 2024-09-18 18:51:11 +02:00 committed by GitHub
parent a7977aa64d
commit eda7e88fd4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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"
'';