litex-overlay/templates/default/flake.nix
2025-02-07 09:40:30 -06:00

68 lines
1.6 KiB
Nix

{
description = "ECP5 toolchain template project";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
litex-overlay.url = "git+https://git.saji.dev/saji/litex-overlay";
};
outputs =
inputs@{ nixpkgs, litex-overlay, ... }:
let
systems = [
"x86_64-linux"
"aarch64-linux"
"aarch64-darwin"
"x86_64-darwin"
];
forAllSystems =
function:
nixpkgs.lib.genAttrs systems (
system:
function (
import nixpkgs {
inherit system;
config.allowUnfree = true;
overlays = [
litex-overlay.overlays.default
]; # patches, version pins, new pkgs here.
}
)
);
in
{
devShells = forAllSystems (pkgs: {
default = pkgs.mkShell {
packages = with pkgs; [
(python3.withPackages (
ps: with ps; [
cocotb
cocotb-bus
litex
litedram
liteeth
litescope
litespi
liteiclink
pythondata-cpu-vexriscv
pythondata-software-compiler_rt
pythondata-software-picolibc
amaranth
]
))
yosys
nextpnr
# simulators
verilog
verilator
# support package
trellis
# loader
openfpgaloader
ecpdap # easier to poke probes.
];
};
});
};
}