-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathflake.nix
43 lines (42 loc) · 1.11 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
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs";
rust-overlay.url = "github:oxalica/rust-overlay";
bootimage-src.url = "github:/rust-osdev/bootimage";
bootimage-src.flake = false;
};
outputs = {
self,
rust-overlay,
nixpkgs,
bootimage-src,
}: let
overlays = [(import rust-overlay)];
pkgs = import nixpkgs {
system = "x86_64-linux";
inherit overlays;
};
lockfile = bootimage-src + "/Cargo.lock";
bootimage = pkgs.rustPlatform.buildRustPackage {
name = "bootloader";
pver = bootimage-src.rev;
src = bootimage-src;
cargoLock.lockFile = lockfile;
cargoDeps = pkgs.rustPlatform.importCargoLock {lockFile = lockfile;};
};
in {
devShell.x86_64-linux = pkgs.mkShell {
buildInputs = [
(pkgs.rust-bin.selectLatestNightlyWith (toolchain:
toolchain.default.override {
extensions = ["rust-src" "llvm-tools"];
targets = ["x86_64-unknown-none" "x86_64-unknown-linux-gnu"];
}))
pkgs.rust-analyzer
pkgs.rustfmt
pkgs.qemu
bootimage
];
};
};
}