ecp5-template/flake.nix

63 lines
1.7 KiB
Nix
Raw Permalink Normal View History

2024-04-14 06:16:22 +00:00
{
description = "ECP5 toolchain template project";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
};
outputs = inputs@{ nixpkgs, ... }:
let
2024-04-18 16:58:49 +00:00
# litex-overlay = final: prev: {
# pythonPackagesExtensions = prev.pythonPackagesExtensions ++ [
# (python-final: python-prev: {
# litex = python-final.callPackage (import ./litex.nix) { };
# # can add more packages here!
# })
# ];
# };
litex-overlay = import ./litex;
2024-04-14 06:16:22 +00:00
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;
2024-04-18 16:58:49 +00:00
overlays = [
litex-overlay
]; # patches, version pins, new pkgs here.
2024-04-14 06:16:22 +00:00
}
));
in {
devShells = forAllSystems (pkgs: {
default = pkgs.mkShell {
packages = with pkgs; [
2024-04-18 16:58:49 +00:00
(python3.withPackages (ps: with ps; [
cocotb
cocotb-bus
litex
2024-04-19 07:03:52 +00:00
litedram
liteeth
litescope
2024-04-19 20:06:31 +00:00
litespi
liteiclink
2024-04-19 07:03:52 +00:00
pythondata-cpu-vexriscv
pythondata-software-compiler_rt
pythondata-software-picolibc
2024-04-18 16:58:49 +00:00
amaranth
]))
2024-04-14 06:16:22 +00:00
yosys
nextpnr
# simulators
verilog
verilator
# support package
trellis
# loader
openfpgaloader
2024-04-18 16:58:49 +00:00
ecpdap # easier to poke probes.
2024-04-14 06:16:22 +00:00
];
};
});
};
}