59 lines
1.8 KiB
Nix
59 lines
1.8 KiB
Nix
{
|
|
inputs = {
|
|
flake-parts.url = "github:hercules-ci/flake-parts";
|
|
devshell.url = "github:numtide/devshell";
|
|
devshell.inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
|
|
outputs = inputs@{ nixpkgs, flake-parts, devshell, ... }:
|
|
flake-parts.lib.mkFlake { inherit inputs; } {
|
|
imports = [
|
|
inputs.flake-parts.flakeModules.easyOverlay
|
|
devshell.flakeModule
|
|
];
|
|
systems = [ "x86_64-linux" ];
|
|
perSystem = { inputs', system, pkgs, config, ... }:
|
|
let
|
|
in
|
|
{
|
|
_module.args.pkgs = import nixpkgs {
|
|
inherit system;
|
|
overlays = [
|
|
devshell.overlays.default
|
|
];
|
|
};
|
|
|
|
overlayAttrs = {
|
|
# inherit (config.packages) quicfs;
|
|
};
|
|
packages = rec {
|
|
# quicfs = (rustPkgs.workspace.quicfs { }).bin;
|
|
# default = quicfs;
|
|
};
|
|
devshells.default = {
|
|
packagesFrom = [
|
|
# (rustPkgs.workspaceShell { })
|
|
];
|
|
packages = with pkgs; [
|
|
gnumake
|
|
cmake
|
|
# gcc-arm-embedded-13
|
|
# coreboot-toolchain.arm
|
|
python3
|
|
picotool
|
|
openocd
|
|
];
|
|
|
|
env = [
|
|
{ name = "PICO_SDK_PATH"; value = "${pkgs.pico-sdk}/lib/pico-sdk"; }
|
|
# { name = "CC"; value = "${pkgs.coreboot-toolchain.arm}/bin/arm-none-eabi-gcc"; }
|
|
# { name = "CXX"; value = "${pkgs.coreboot-toolchain.arm}/bin/arm-none-eabi-g++"; }
|
|
{ name = "PICO_TOOLCHAIN_PATH"; value = "/tmp/arm-gnu-toolchain-13.2.Rel1-x86_64-arm-none-eabi"; }
|
|
# { name = "CC"; value = "/tmp/arm-gnu-toolchain-13.2.Rel1-x86_64-arm-none-eabi/bin/arm-none-eabi-gcc"; }
|
|
# { name = "CXX"; value = "/tmp/arm-gnu-toolchain-13.2.Rel1-x86_64-arm-none-eabi/bin/arm-none-eabi-g++"; }
|
|
];
|
|
};
|
|
};
|
|
};
|
|
}
|