From 60d982e43d28dbc08574248438d40be5288498c9 Mon Sep 17 00:00:00 2001 From: megacron Date: Thu, 14 May 2026 23:09:43 -0400 Subject: [PATCH] changed buildInputs to Packages, removed RUST_SRC_PATH replaced by rust-analyzer, pkg-config moved to nativeBuildInputs, use stdenv.isLinux as safer --- docs/linux_dependencies.md | 56 ++++++++++++++++++++------------------ 1 file changed, 29 insertions(+), 27 deletions(-) diff --git a/docs/linux_dependencies.md b/docs/linux_dependencies.md index 65b3fd21122da..b08763a483878 100644 --- a/docs/linux_dependencies.md +++ b/docs/linux_dependencies.md @@ -119,8 +119,8 @@ Add a `flake.nix` file to the root of your GitHub repository containing: outputs = { nixpkgs, - rust-overlay, flake-utils, + rust-overlay, ... }: flake-utils.lib.eachDefaultSystem ( @@ -135,38 +135,40 @@ Add a `flake.nix` file to the root of your GitHub repository containing: devShells.default = with pkgs; mkShell { - buildInputs = - [ - # Rust dependencies - (rust-bin.stable.latest.default.override { extensions = [ "rust-src" ]; }) - pkg-config - ] - ++ lib.optionals (lib.strings.hasInfix "linux" system) [ - # for Linux - # Audio (Linux only) - alsa-lib - # Cross Platform 3D Graphics API - vulkan-loader - # For debugging around vulkan - vulkan-tools - # Other dependencies - libudev-zero - libx11 - libxcursor - libxi - libxrandr - libxkbcommon - wayland - ]; - RUST_SRC_PATH = "${pkgs.rust.packages.stable.rustPlatform.rustLibSrc}"; - LD_LIBRARY_PATH = lib.makeLibraryPath [ + nativeBuildInputs = [ pkg-config ]; + packages = [ + # Rust dependencies + (rust-bin.stable.latest.default.override { extensions = [ "rust-src" "rust-analyzer" ]; }) + ] + ++ lib.optionals stdenv.isLinux [ + # for Linux + # Audio (Linux only) + alsa-lib + # Cross Platform 3D Graphics API vulkan-loader + # For debugging around vulkan + vulkan-tools + # Other dependencies + libudev-zero libx11 - libxi libxcursor + libxi + libxrandr libxkbcommon wayland ]; + + LD_LIBRARY_PATH = lib.optionalString stdenv.isLinux ( + lib.makeLibraryPath [ + libX11 + libxcursor + libxi + libxkbcommon + libxrandr + vulkan-loader + wayland + ] + ); }; } );