diff --git a/flake.lock b/flake.lock index 507056d..ed8f148 100644 --- a/flake.lock +++ b/flake.lock @@ -1,23 +1,5 @@ { "nodes": { - "devshell": { - "inputs": { - "nixpkgs": "nixpkgs" - }, - "locked": { - "lastModified": 1722113426, - "narHash": "sha256-Yo/3loq572A8Su6aY5GP56knpuKYRvM2a1meP9oJZCw=", - "owner": "numtide", - "repo": "devshell", - "rev": "67cce7359e4cd3c45296fb4aaf6a19e2a9c757ae", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "devshell", - "type": "github" - } - }, "flake-utils": { "inputs": { "systems": "systems" @@ -37,22 +19,6 @@ } }, "nixpkgs": { - "locked": { - "lastModified": 1722073938, - "narHash": "sha256-OpX0StkL8vpXyWOGUD6G+MA26wAXK6SpT94kLJXo6B4=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "e36e9f57337d0ff0cf77aceb58af4c805472bfae", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixpkgs-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_2": { "locked": { "lastModified": 1728031656, "narHash": "sha256-JXumn7X+suKEcehp4rchSvBzIboqyybQ5bLK4wk7gQU=", @@ -68,7 +34,7 @@ "type": "github" } }, - "nixpkgs_3": { + "nixpkgs_2": { "locked": { "lastModified": 1718428119, "narHash": "sha256-WdWDpNaq6u1IPtxtYHHWpl5BmabtpmLnMAx0RdJ/vo8=", @@ -86,15 +52,14 @@ }, "root": { "inputs": { - "devshell": "devshell", "flake-utils": "flake-utils", - "nixpkgs": "nixpkgs_2", + "nixpkgs": "nixpkgs", "rust-overlay": "rust-overlay" } }, "rust-overlay": { "inputs": { - "nixpkgs": "nixpkgs_3" + "nixpkgs": "nixpkgs_2" }, "locked": { "lastModified": 1728008962, diff --git a/flake.nix b/flake.nix index 3bca5f5..ca6526d 100644 --- a/flake.nix +++ b/flake.nix @@ -3,14 +3,12 @@ inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; inputs.flake-utils.url = "github:numtide/flake-utils"; - inputs.devshell.url = "github:numtide/devshell"; inputs.rust-overlay.url = "github:oxalica/rust-overlay"; outputs = { self, nixpkgs, flake-utils, - devshell, rust-overlay, }: flake-utils.lib.eachDefaultSystem (system: let @@ -18,7 +16,6 @@ inherit system; config.allowUnfree = true; # For clion overlays = [ - devshell.overlays.default rust-overlay.overlays.default ]; }; @@ -28,16 +25,19 @@ extensions = ["rust-src"]; # Include the rust stdlib source for intellij }; in { - devShell = pkgs.devshell.mkShell rec { + devShell = pkgs.mkShell rec { name = "Rust Environment"; - packages = with pkgs; [ + nativeBuildInputs = with pkgs; [ gcc14 rust-stable # rust-analyzer # System install # Bevy Dependencies: https://github.com/bevyengine/bevy/blob/release-0.14.2/docs/linux_dependencies.md#nix pkg-config + ]; + + buildInputs = with pkgs; [ udev alsa-lib vulkan-loader @@ -45,28 +45,8 @@ wayland ]; - env = [ - # Allow for intellij to find the stdlib - { - name = "RUST_SRC_PATH"; - value = "${rust-stable}/lib/rustlib/src/rust/library"; - } - - # Use this if the rust binary needs additional libraries - { - name = "LD_LIBRARY_PATH"; - value = nixpkgs.lib.makeLibraryPath packages; - # value = "${pkgs.xorg.libX11}/lib:${pkgs.xorg.libXcursor}/lib:${pkgs.xorg.libXrandr}/lib:${pkgs.xorg.libXi}/lib:${pkgs.libGL}/lib"; - } - ]; - - commands = [ - # { - # name = "ide"; - # help = "Run clion for project"; - # command = "clion &>/dev/null ./ &"; - # } - ]; + RUST_SRC_PATH = "${rust-stable}/lib/rustlib/src/rust/library"; + LD_LIBRARY_PATH = nixpkgs.lib.makeLibraryPath buildInputs; }; }); }