-
Notifications
You must be signed in to change notification settings - Fork 159
/
shell.nix
40 lines (34 loc) · 1.06 KB
/
shell.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
# Sets up a basic shell environment with all relevant tooling to run
# "cargo xtask run|test|clippy". It uses rustup rather than a pinned rust
# toolchain.
let
sources = import ./nix/sources.nix;
pkgs = import ./nix/nixpkgs.nix;
rustToolchain = pkgs.callPackage ./nix/rust-toolchain.nix { };
in
pkgs.mkShell {
nativeBuildInputs = with pkgs; [
# nix related stuff (such as dependency management)
niv
# TODO use "nixfmt" once it is stable - likely in nixpkgs @ NixOS 24.11
nixfmt-rfc-style
# Integration test dependencies
swtpm
qemu
# Rust toolchain
rustToolchain
# Other
cargo-llvm-cov
mdbook
yamlfmt
which # used by "cargo xtask fmt"
];
# Set ENV vars.
# OVMF_CODE="${pkgs.OVMF.firmware}";
# OVMF_VARS="${pkgs.OVMF.variables}";
# OVMF_SHELL="${pkgs.edk2-uefi-shell}";
# To invoke "nix-shell" in the CI-runner, we need a global Nix channel.
# For better reproducibility inside the Nix shell, we override this channel
# with the pinned nixpkgs version.
NIX_PATH = "nixpkgs=${sources.nixpkgs}";
}