-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
46 lines (44 loc) · 1.25 KB
/
flake.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
{
description = "Mel Intermediate Lisp";
inputs.nixpkgs.url = "github:nixos/nixpkgs/nixos-20.09";
inputs.flake-utils.url = "github:numtide/flake-utils";
inputs.mozilla = { url = "github:mozilla/nixpkgs-mozilla"; flake = false; };
outputs =
{ self
, nixpkgs
, mozilla
, flake-utils
, ...
} @inputs:
let rustOverlay = final: prev:
let rustChannel = prev.rustChannelOf {
#channel = "1.49.0";
#sha256 = "sha256-KCh2UBGtdlBJ/4UOqZlxUtcyefv7MH1neoVNV4z0nWs=";
channel = "nightly";
sha256 = "sha256-yvUmasDp4hTmipedyiWEjFCAsZHuIiODCygBfdrTeqs";
};
in
{ inherit rustChannel;
rustc = rustChannel.rust;
cargo = rustChannel.rust;
};
in flake-utils.lib.eachDefaultSystem
(system:
let
pkgs = import nixpkgs {
inherit system;
overlays = [
(import "${mozilla}/rust-overlay.nix")
rustOverlay
];
};
in {
devShell = pkgs.mkShell {
buildInputs = with pkgs; [
clang
openssl
(rustChannel.rust.override { extensions = [ "rust-src" ]; })
];
};
});
}