From f63a7ae86a2df6d73af315017a3a30761393ab2d Mon Sep 17 00:00:00 2001 From: SeanOMik Date: Tue, 19 Mar 2024 21:40:08 -0400 Subject: [PATCH] include correct rust install in nix-shell --- rust-toolchain.toml | 7 +++--- shell.nix | 52 +++++++++++++++++++++++---------------------- 2 files changed, 30 insertions(+), 29 deletions(-) diff --git a/rust-toolchain.toml b/rust-toolchain.toml index 5b28b38..78cfb42 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,5 +1,4 @@ [toolchain] -channel = "nightly-2023-11-21" -#components = [ "rustfmt", "rustc-dev" ] -targets = [ "x86_64-unknown-linux-gnu" ] -#profile = "minimal" \ No newline at end of file +channel = "nightly" +date = "2023-11-21" +targets = [ "x86_64-unknown-linux-gnu" ] \ No newline at end of file diff --git a/shell.nix b/shell.nix index 87fd52d..d0c65e9 100755 --- a/shell.nix +++ b/shell.nix @@ -1,25 +1,27 @@ -{ pkgs ? import { } }: - -with pkgs; - -mkShell rec { - nativeBuildInputs = [ - pkg-config - openssl - wasm-pack - trunk - valgrind - heaptrack - mold - udev - lua5_4_compat - rustup - ]; - buildInputs = [ - udev alsa-lib libGL gcc - vulkan-loader vulkan-headers vulkan-tools - xorg.libX11 xorg.libXcursor xorg.libXi xorg.libXrandr # To use the x11 feature - libxkbcommon wayland # To use the wayland feature - ]; - LD_LIBRARY_PATH = lib.makeLibraryPath buildInputs; -} \ No newline at end of file +let + moz_overlay = import (builtins.fetchTarball https://github.com/mozilla/nixpkgs-mozilla/archive/master.tar.gz); + nixpkgs = import { overlays = [ moz_overlay ]; }; +in + with nixpkgs; + stdenv.mkDerivation rec { + name = "lyra_engine_dev"; + nativeBuildInputs = [ + pkg-config + openssl + wasm-pack + trunk + valgrind + heaptrack + mold + udev + lua5_4_compat + (nixpkgs.rustChannelOf { rustToolchain = ./rust-toolchain.toml; }).rust + ]; + buildInputs = [ + udev alsa-lib libGL gcc + vulkan-loader vulkan-headers vulkan-tools + xorg.libX11 xorg.libXcursor xorg.libXi xorg.libXrandr # To use the x11 feature + libxkbcommon wayland # To use the wayland feature + ]; + LD_LIBRARY_PATH = lib.makeLibraryPath buildInputs; + }