diff --git a/flake.lock b/flake.lock index c63567e..631420f 100644 --- a/flake.lock +++ b/flake.lock @@ -43,6 +43,29 @@ "type": "github" } }, + "devshell": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ], + "systems": [ + "systems" + ] + }, + "locked": { + "lastModified": 1687173957, + "narHash": "sha256-GOds2bAQcZ94fb9/Nl/aM+r+0wGSi4EKYuZYR8Dw4R8=", + "owner": "numtide", + "repo": "devshell", + "rev": "2cf83bb31720fcc29a999aee28d6da101173e66a", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "devshell", + "type": "github" + } + }, "fenix": { "inputs": { "nixpkgs": [ @@ -120,6 +143,7 @@ "inputs": { "advisory-db": "advisory-db", "crane": "crane", + "devshell": "devshell", "fenix": "fenix", "flake-compat": "flake-compat", "flake-utils": "flake-utils", diff --git a/flake.nix b/flake.nix index 0203bce..ee1b724 100644 --- a/flake.nix +++ b/flake.nix @@ -13,6 +13,10 @@ inputs.crane.inputs.flake-utils.follows = "flake-utils"; inputs.crane.inputs.nixpkgs.follows = "nixpkgs"; + inputs.devshell.url = "github:numtide/devshell"; + inputs.devshell.inputs.nixpkgs.follows = "nixpkgs"; + inputs.devshell.inputs.systems.follows = "systems"; + inputs.fenix.url = "github:nix-community/fenix"; inputs.fenix.inputs.nixpkgs.follows = "nixpkgs"; @@ -27,12 +31,16 @@ nixpkgs, advisory-db, crane, + devshell, fenix, flake-utils, ... }: flake-utils.lib.eachDefaultSystem (system: let - pkgs = import nixpkgs {inherit system;}; + pkgs = import nixpkgs { + inherit system; + overlays = [devshell.overlays.default]; + }; rustNightly = (import fenix {inherit pkgs;}).fromToolchainFile { file = ./rust-toolchain.toml; @@ -71,12 +79,22 @@ apps.default = flake-utils.lib.mkApp {drv = gitice;}; - devShells.default = pkgs.mkShell { - inputsFrom = builtins.attrValues self.checks; + devShells.default = pkgs.devshell.mkShell { + bash = {interactive = "";}; - nativeBuildInputs = with pkgs; [cargo-dist cargo-nextest cargo-release rustNightly]; + env = [ + { + name = "DEVSHELL_NO_MOTD"; + value = 1; + } + ]; - CARGO_REGISTRIES_CRATES_IO_PROTOCOL = "sparse"; + packages = with pkgs; [ + cargo-dist + cargo-nextest + cargo-release + rustNightly + ]; }; }); }