forked from compassd/dcompass
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathshell.nix
More file actions
22 lines (19 loc) · 697 Bytes
/
shell.nix
File metadata and controls
22 lines (19 loc) · 697 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
let
mozilla = import (builtins.fetchTarball
"https://github.com/mozilla/nixpkgs-mozilla/archive/master.tar.gz");
nixpkgs = import <nixpkgs> { overlays = [ mozilla ]; };
stableRust = nixpkgs.latest.rustChannels.stable.rust;
nightlyRust = (nixpkgs.rustChannelOf {
date = "2020-11-18";
channel = "nightly";
}).rust.override { extensions = [ "rustfmt-preview" ]; };
rustEnv = nixpkgs.symlinkJoin {
name = "rust-develop-envrionment";
paths = [ stableRust ];
postBuild = ''
ln -sf ${nightlyRust}/bin/cargo-fmt $out/bin/
ln -sf ${nightlyRust}/bin/rustfmt $out/bin/
'';
};
in with nixpkgs;
mkShell { buildInputs = [ rustEnv binutils-unwrapped ]; }