mirror of
https://github.com/rust-osdev/uefi-rs
synced 2026-08-26 18:26:05 -04:00
Now, a nix-shell always has the latest rust stable version, compliant to our rust-toolchain.toml file.
37 lines
970 B
Nix
37 lines
970 B
Nix
# 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
|
|
nixpkgs-fmt
|
|
|
|
# Integration test dependencies
|
|
swtpm
|
|
qemu
|
|
|
|
# Rust toolchain
|
|
rustToolchain
|
|
|
|
# Other
|
|
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}";
|
|
}
|