aboutsummaryrefslogtreecommitdiff
path: root/nix/nixpkgs.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nix/nixpkgs.nix')
-rw-r--r--nix/nixpkgs.nix27
1 files changed, 27 insertions, 0 deletions
diff --git a/nix/nixpkgs.nix b/nix/nixpkgs.nix
new file mode 100644
index 0000000..b5675fb
--- /dev/null
+++ b/nix/nixpkgs.nix
@@ -0,0 +1,27 @@
1
2let
3 # Manage this with https://github.com/nmattia/niv
4 # or define { nixpkgs = ...; nixpkgs-mozilla = ...; }
5 # yourself.
6 sources = import ./sources.nix;
7
8 rustChannelsOverlay = import "${sources.nixpkgs-mozilla}/rust-overlay.nix";
9 # Useful if you also want to provide that in a nix-shell since some rust tools depend
10 # on that.
11 rustChannelsSrcOverlay = import "${sources.nixpkgs-mozilla}/rust-src-overlay.nix";
12
13in import sources.nixpkgs {
14 overlays = [
15 rustChannelsOverlay
16 rustChannelsSrcOverlay
17 (self: super: {
18 # Replace "latest.rustChannels.stable" with the version of the rust tools that
19 # you would like. Look at the documentation of nixpkgs-mozilla for examples.
20 #
21 # NOTE: "rust" instead of "rustc" is not a typo: It will include more than needed
22 # but also the much needed "rust-std".
23 rustc = super.latest.rustChannels.stable.rust;
24 inherit (super.latest.rustChannels.stable) cargo rust rust-fmt rust-std clippy;
25 })
26 ];
27 }