Skip to content
This repository has been archived by the owner on Aug 28, 2023. It is now read-only.

Commit

Permalink
feat(flakes): use numtide/devshell for Flake devShell
Browse files Browse the repository at this point in the history
  • Loading branch information
msfjarvis committed Jun 25, 2023
1 parent db12e7e commit 67dee1b
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 6 deletions.
24 changes: 24 additions & 0 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

25 changes: 19 additions & 6 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@
inputs.custom-nixpkgs.inputs.fenix.follows = "fenix";
inputs.custom-nixpkgs.inputs.systems.follows = "systems";

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";

Expand All @@ -33,12 +37,16 @@
advisory-db,
crane,
custom-nixpkgs,
devshell,
fenix,
flake-utils,
...
}:
flake-utils.lib.eachDefaultSystem (system: let
pkgs = import nixpkgs {inherit system;};
pkgs = import nixpkgs {
inherit system;
overlays = [devshell.overlays.default];
};

rustStable = (import fenix {inherit pkgs;}).fromToolchainFile {
file = ./rust-toolchain.toml;
Expand Down Expand Up @@ -76,17 +84,22 @@

apps.default = flake-utils.lib.mkApp {drv = twt;};

devShells.default = pkgs.mkShell {
inputsFrom = builtins.attrValues self.checks;
devShells.default = pkgs.devshell.mkShell {
bash = {interactive = "";};

nativeBuildInputs = with pkgs; [
env = [
{
name = "DEVSHELL_NO_MOTD";
value = 1;
}
];

packages = with pkgs; [
cargo-nextest
cargo-release
rustStable
custom-nixpkgs.packages.${system}.oranda
];

CARGO_REGISTRIES_CRATES_IO_PROTOCOL = "sparse";
};
});
}

0 comments on commit 67dee1b

Please sign in to comment.