generated from saji/ecp5-template
48 lines
1.1 KiB
Nix
48 lines
1.1 KiB
Nix
{
|
|
description = "ECP5 toolchain template project";
|
|
|
|
inputs = {
|
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
|
};
|
|
|
|
outputs = inputs@{ nixpkgs, flake-utils, ... }:
|
|
let
|
|
python-overlay = import ./python.nix;
|
|
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 = [
|
|
python-overlay
|
|
];
|
|
}
|
|
));
|
|
in {
|
|
packages = forAllSystems (pkgs: {
|
|
sim = import ./sim/package.nix pkgs;
|
|
|
|
});
|
|
devShells = forAllSystems (pkgs: {
|
|
default = pkgs.mkShell {
|
|
packages = with pkgs; [
|
|
(python3.withPackages (ps: with ps; [
|
|
amaranth
|
|
]))
|
|
yosys
|
|
nextpnr
|
|
# simulators
|
|
iverilog
|
|
verilator
|
|
# support package
|
|
trellis
|
|
# loader
|
|
openfpgaloader
|
|
ecpdap # easier to poke probes.
|
|
];
|
|
};
|
|
});
|
|
};
|
|
}
|