Skip to content

Commit

Permalink
nix-flake: expose all rust tools in dev environment (..)
Browse files Browse the repository at this point in the history
The `oxalica / rust-overlay` docs expose all tools in the development
environment, so we should do the same:

https://github.com/oxalica/rust-overlay#use-in-devshell-for-nix-develop
  • Loading branch information
jay-querie committed Jul 1, 2023
1 parent 38e656d commit 28392a3
Showing 1 changed file with 5 additions and 17 deletions.
22 changes: 5 additions & 17 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,7 @@
outputs = { self, nixpkgs, rust-overlay, flake-utils, ... }:
flake-utils.lib.eachDefaultSystem (system:
let
overlays = [
# - - -
(import rust-overlay)

# - - -
(self: super: let
rust-bin = super.rust-bin.selectLatestNightlyWith(toolchain: toolchain.default.override {
extensions= [ "rust-src" "rust-analyzer" ];
targets = [ "wasm32-unknown-unknown" ];
});
in {
rustc = rust-bin;
cargo = rust-bin;
})
];
overlays = [ (import rust-overlay) ];
pkgs = import nixpkgs {
inherit system overlays;
};
Expand All @@ -37,9 +23,11 @@
openssl
pkg-config
cacert
rustc
cargo
mdbook
(rust-bin.selectLatestNightlyWith(toolchain: toolchain.default.override {
extensions= [ "rust-src" "rust-analyzer" ];
targets = [ "wasm32-unknown-unknown" ];
}))
];

shellHook = ''
Expand Down

0 comments on commit 28392a3

Please sign in to comment.