generated from saji/ecp5-template
44dd9f79c7
Signed-off-by: saji <champ189@umn.edu>
62 lines
1.7 KiB
Nix
62 lines
1.7 KiB
Nix
{
|
|
description = "ECP5 toolchain template project";
|
|
|
|
inputs = {
|
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
|
};
|
|
|
|
outputs = inputs@{ nixpkgs, ... }:
|
|
let
|
|
# 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;
|
|
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
|
|
]; # 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
|
|
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.
|
|
];
|
|
};
|
|
});
|
|
};
|
|
}
|