From 73ea9454f793d20b9bb813bd90030107b0a90051 Mon Sep 17 00:00:00 2001 From: Muhammad Nauman Raza Date: Mon, 25 Mar 2024 22:54:47 +0000 Subject: [PATCH] flake: remove devShell --- flake.nix | 38 +++++++------------------------------- 1 file changed, 7 insertions(+), 31 deletions(-) diff --git a/flake.nix b/flake.nix index 10382e8..12e50f5 100644 --- a/flake.nix +++ b/flake.nix @@ -1,9 +1,5 @@ { 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"; }; @@ -12,42 +8,22 @@ self, nixpkgs-unstable, utils, - fenix, ... }: utils.lib.eachDefaultSystem ( system: let - pkgs = import nixpkgs-unstable { - inherit system; - overlays = [fenix.overlays.default]; - }; - toolchain = pkgs.fenix.complete; + pkgs = import nixpkgs-unstable { inherit system; }; in rec { - packages.default = - (pkgs.makeRustPlatform { - inherit (toolchain) cargo rustc; - }) - .buildRustPackage { - pname = "vpr"; - version = "0.2.1"; - cargoLock.lockFile = ./Cargo.lock; - src = ./.; - }; - + packages.default = pkgs.rustPlatform.buildRustPackage { + pname = "vpr"; + version = "0.2.1"; + cargoLock.lockFile = ./Cargo.lock; + src = ./.; + }; # Executed by `nix run` 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 ]) - ]; - - # Specify the rust-src path (many editors rely on this) - RUST_SRC_PATH = "${toolchain.rust-src}/lib/rustlib/src/rust/library"; - }; } ); }