diff --git a/flake.nix b/flake.nix index b94179c..26e42e4 100644 --- a/flake.nix +++ b/flake.nix @@ -2,10 +2,6 @@ description = "Rust development environment for oxitoko using fenix"; inputs = { - fenix = { - url = "github:nix-community/fenix"; - inputs.nixpkgs.follows = "nixpkgs-unstable"; - }; utils.url = "github:numtide/flake-utils"; nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable"; }; @@ -14,26 +10,19 @@ self, nixpkgs-unstable, utils, - fenix, ... }: utils.lib.eachDefaultSystem ( system: let - pkgs = import nixpkgs-unstable { - inherit system; - overlays = [fenix.overlays.default]; - }; + pkgs = import nixpkgs-unstable { inherit system; }; toolchain = pkgs.fenix.complete; dependencies = with pkgs; [ SDL2 SDL2_image ]; in rec { # Executed by `nix build` packages.default = - (pkgs.makeRustPlatform { - inherit (toolchain) cargo rustc; - }) - .buildRustPackage { + (pkgs.makeRustPlatform.buildRustPackage { pname = "rustboyadvance-ng"; name = "rustboyadvance-ng"; src = ./.; @@ -51,14 +40,7 @@ apps.default = utils.lib.mkApp {drv = packages.default;}; # Used by `nix develop` - devShells.default = pkgs.mkShell rec { - buildInputs = with pkgs; [ - (with toolchain; [ - cargo rustc rust-src clippy rustfmt # rust components - ]) - ] ++ dependencies; - RUST_SRC_PATH = "${toolchain.rust-src}/lib/rustlib/src/rust/library"; - }; + devShells.default = pkgs.mkShell rec { buildInputs = dependencies; }; } ); }