groovylight/flake.nix

74 lines
2 KiB
Nix
Raw Permalink Normal View History

2024-04-19 15:13:39 +00:00
{
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 {
2024-05-26 13:48:38 +00:00
packages = forAllSystems (pkgs: {
sim = import ./sim/package.nix pkgs;
});
2024-04-19 15:13:39 +00:00
devShells = forAllSystems (pkgs: {
default = pkgs.mkShell {
packages = with pkgs; [
(python3.withPackages (ps: with ps; [
cocotb
cocotb-bus
litex
litedram
liteeth
litescope
litespi
liteiclink
2024-04-19 15:13:39 +00:00
pythondata-cpu-vexriscv
pythondata-software-compiler_rt
pythondata-software-picolibc
amaranth
]))
yosys
nextpnr
2024-04-23 04:53:24 +00:00
pkgsCross.riscv64.buildPackages.gcc
gnumake
wishbone-tool
2024-04-19 15:13:39 +00:00
# simulators
verilog
verilator
# support package
trellis
# loader
openfpgaloader
ecpdap # easier to poke probes.
2024-05-19 05:15:53 +00:00
# for building the simulator
cmake
2024-05-23 05:43:33 +00:00
ninja
2024-05-23 17:07:53 +00:00
mdbook
2024-04-19 15:13:39 +00:00
];
};
});
};
}