From 64e272be5de2d11cf35cafba73790f94770323ab Mon Sep 17 00:00:00 2001 From: Zynh Ludwig Date: Mon, 29 Jul 2024 23:30:34 -0700 Subject: [PATCH] nix: shell.nix works standalone again --- flake.nix | 11 ++++++++++- shell.nix | 6 ++---- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/flake.nix b/flake.nix index c47acf5..d0fd260 100644 --- a/flake.nix +++ b/flake.nix @@ -24,6 +24,15 @@ })); in { - devShells = forAllSystems (pkgs: { default = import ./shell.nix { inherit pkgs; }; }); + devShells = forAllSystems + (pkgs: { + default = import ./shell.nix + { + inherit pkgs; + additionalBuildInputs = [ + (pkgs.rust-bin.selectLatestNightlyWith (toolchain: toolchain.default)) + ]; + }; + }); }; } diff --git a/shell.nix b/shell.nix index b2686b6..096612c 100644 --- a/shell.nix +++ b/shell.nix @@ -1,4 +1,4 @@ -{ pkgs ? import { } }: +{ pkgs ? import { }, additionalBuildInputs ? [ ] }: with pkgs; @@ -18,8 +18,6 @@ mkShell rec { libxkbcommon # To use the wayland feature wayland - - (rust-bin.selectLatestNightlyWith (toolchain: toolchain.default)) - ]; + ] ++ additionalBuildInputs; LD_LIBRARY_PATH = lib.makeLibraryPath buildInputs; }