45 lines
1,008 B
Nix
45 lines
1,008 B
Nix
{
|
|
description = "FreeBSD bootloader";
|
|
|
|
inputs = {
|
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
|
rust-overlay = {
|
|
url = "github:oxalica/rust-overlay";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
};
|
|
|
|
outputs =
|
|
{
|
|
self,
|
|
nixpkgs,
|
|
rust-overlay,
|
|
}:
|
|
let
|
|
lib = nixpkgs.lib;
|
|
makePkgs =
|
|
system:
|
|
import nixpkgs {
|
|
inherit system;
|
|
overlays = [ rust-overlay.overlays.default ];
|
|
};
|
|
forAllSystems = f: lib.genAttrs lib.systems.flakeExposed (system: f (makePkgs system));
|
|
in
|
|
{
|
|
formatter = forAllSystems (pkgs: pkgs.nixfmt-rfc-style);
|
|
devShells = forAllSystems (
|
|
pkgs:
|
|
let
|
|
rust-uefi = pkgs.rust-bin.fromRustupToolchainFile ./rust-toolchain.toml;
|
|
in
|
|
{
|
|
default = pkgs.mkShell {
|
|
packages = [ rust-uefi ];
|
|
|
|
RUST_SRC_PATH = "${rust-uefi}/lib/rustlib/src/rust/library";
|
|
};
|
|
}
|
|
);
|
|
};
|
|
}
|