-
Notifications
You must be signed in to change notification settings - Fork 6
/
flake.nix
33 lines (30 loc) · 998 Bytes
/
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
{
description = "Tools needed to develop reedos";
inputs.rust-overlay = {
url = "github:oxalica/rust-overlay";
inputs.nixpkgs.follows = "nixpkgs";
inputs.flake-utils.follows = "flake-utils";
};
outputs = { self, nixpkgs, flake-utils, rust-overlay }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs {
inherit system;
overlays = [ (import rust-overlay) ];
};
riscv64-cc = pkgs.pkgsCross.riscv64-embedded.stdenv.cc;
in {
devShells.default = pkgs.mkShell {
buildInputs = with pkgs; [
(rust-bin.nightly.latest.default.override {
extensions = [ "rust-src" ];
targets = [ "riscv64imac-unknown-none-elf" ];
})
riscv64-cc
qemu
];
RISCV64_AS = "${riscv64-cc}/bin/${riscv64-cc.targetPrefix}as";
RISCV64_LD = "${riscv64-cc}/bin/${riscv64-cc.targetPrefix}ld";
};
});
}