2024-07-29 19:57:25 +00:00
|
|
|
{
|
|
|
|
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 {
|
2024-08-04 22:43:56 +00:00
|
|
|
packages = [
|
|
|
|
rust-uefi
|
|
|
|
pkgs.lldb
|
|
|
|
];
|
2024-07-29 19:57:25 +00:00
|
|
|
|
|
|
|
RUST_SRC_PATH = "${rust-uefi}/lib/rustlib/src/rust/library";
|
|
|
|
};
|
|
|
|
}
|
|
|
|
);
|
|
|
|
};
|
|
|
|
}
|