mirror of
https://github.com/rust-osdev/uefi-rs
synced 2026-06-08 17:17:36 +00:00
4554296e36
nixpkgs: 2026-01-01T05:40:00+01:00 -> 2026-05-29T07:01:12+02:00 rust-overlay: 2026-01-01T03:53:20+01:00 -> 2026-05-31T05:19:49+02:00 This commit was generated via: nix run github:phip1611/nixos-configs#flake-update-and-commit
64 lines
2.0 KiB
Nix
64 lines
2.0 KiB
Nix
{
|
|
description = "uefi-rs";
|
|
|
|
inputs = {
|
|
# Use freshest nixpkgs. We don't use master as packages in nixpkgs-unstable
|
|
# have already been build by the nixpkgs CI and are available from the
|
|
# nixos.org cache.
|
|
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
|
|
rust-overlay.url = "github:oxalica/rust-overlay";
|
|
};
|
|
|
|
outputs =
|
|
inputs@{ self, nixpkgs, ... }:
|
|
let
|
|
# Systems definition for dev shells and exported packages,
|
|
# independent of the NixOS configurations and modules defined here. We
|
|
# just use "every system" here to not restrict any user. However, it
|
|
# likely happens that certain packages don't build for/under certain
|
|
# systems.
|
|
systems = nixpkgs.lib.systems.flakeExposed;
|
|
forAllSystems =
|
|
function: nixpkgs.lib.genAttrs systems (system: function nixpkgs.legacyPackages.${system});
|
|
|
|
# We directly instantiate the functionality, without using an
|
|
# nixpkgs overlay.
|
|
# https://github.com/oxalica/rust-overlay/blob/f4d5a693c18b389f0d58f55b6f7be6ef85af186f/docs/reference.md?plain=1#L26
|
|
rustToolchain =
|
|
pkgs:
|
|
let
|
|
rust-bin = (inputs.rust-overlay.lib.mkRustBin { }) pkgs;
|
|
rustToolchainBuilder = import ./nix/rust-toolchain.nix;
|
|
in
|
|
rustToolchainBuilder { inherit rust-bin; };
|
|
in
|
|
{
|
|
devShells = forAllSystems (pkgs: {
|
|
default = pkgs.mkShell {
|
|
packages = with pkgs; [
|
|
nixfmt
|
|
|
|
# Integration test dependencies
|
|
swtpm
|
|
qemu
|
|
|
|
# Rust toolchain
|
|
(rustToolchain pkgs)
|
|
|
|
# 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}";
|
|
};
|
|
});
|
|
formatter = forAllSystems (pkgs: pkgs.treefmt-nix);
|
|
};
|
|
}
|