2024-04-19 15:13:39 +00:00
|
|
|
{
|
|
|
|
description = "ECP5 toolchain template project";
|
|
|
|
|
|
|
|
inputs = {
|
|
|
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
2024-09-25 15:13:34 +00:00
|
|
|
flake-parts = {
|
|
|
|
url = "github:hercules-ci/flake-parts";
|
|
|
|
inputs.nixpkgs-lib.follows = "nixpkgs";
|
|
|
|
};
|
2024-04-19 15:13:39 +00:00
|
|
|
};
|
|
|
|
|
2024-09-25 15:13:34 +00:00
|
|
|
outputs = inputs@{flake-parts, ... }:
|
|
|
|
flake-parts.lib.mkFlake { inherit inputs; } {
|
|
|
|
# flake = let
|
|
|
|
# in {
|
|
|
|
# };
|
|
|
|
# devShells."x86_64-linux".default = pkgs.mkShell {
|
|
|
|
# packages = with pkgs; [
|
|
|
|
# (python3.withPackages (pypkgs: with pypkgs; [
|
|
|
|
# amaranth
|
|
|
|
# amaranth-boards
|
|
|
|
# ]))
|
|
|
|
# yosys
|
|
|
|
# nextpnr
|
|
|
|
# # simulators
|
|
|
|
# iverilog
|
|
|
|
# verilator
|
|
|
|
# # support package
|
|
|
|
# trellis
|
|
|
|
# # loader
|
|
|
|
# openfpgaloader
|
|
|
|
# ecpdap # easier to poke probes.
|
|
|
|
# ];
|
|
|
|
# };
|
|
|
|
# };
|
2024-09-22 15:55:52 +00:00
|
|
|
|
2024-09-25 15:13:34 +00:00
|
|
|
systems = [ "x86_64-linux" "aarch64-linux" "aarch64-darwin" "x86_64-darwin" ];
|
2024-09-25 01:52:44 +00:00
|
|
|
|
2024-09-25 15:13:34 +00:00
|
|
|
perSystem = {config, self', inputs', pkgs, system, ...}: {
|
|
|
|
packages.default = pkgs.python3.pkgs.buildPythonPackage {
|
|
|
|
name = "groovylight";
|
|
|
|
version = "0.0.1";
|
|
|
|
src = ./.;
|
|
|
|
format = "pyproject";
|
2024-09-25 01:52:44 +00:00
|
|
|
|
2024-09-25 15:13:34 +00:00
|
|
|
build-system = [pkgs.python3.pkgs.pdm-backend];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
pkgs.python3.pkgs.amaranth
|
|
|
|
pkgs.python3.pkgs.amaranth-boards
|
|
|
|
];
|
|
|
|
|
|
|
|
doCheck = true;
|
|
|
|
nativeCheckInputs = with pkgs; [
|
|
|
|
python3.pkgs.pytestCheckHook
|
|
|
|
yosys
|
|
|
|
nextpnr
|
|
|
|
trellis
|
|
|
|
openfpgaloader
|
|
|
|
];
|
|
|
|
|
|
|
|
};
|
|
|
|
devShells.default = pkgs.mkShell {
|
|
|
|
packages = with pkgs; [
|
|
|
|
(python3.withPackages (pypkgs: with pypkgs; [
|
|
|
|
amaranth
|
|
|
|
amaranth-boards
|
|
|
|
]))
|
|
|
|
self'.packages.default
|
|
|
|
yosys
|
|
|
|
nextpnr
|
|
|
|
# simulators
|
|
|
|
iverilog
|
|
|
|
verilator
|
|
|
|
# support package
|
|
|
|
trellis
|
|
|
|
# loader
|
|
|
|
openfpgaloader
|
|
|
|
ecpdap # easier to poke probes.
|
|
|
|
];
|
|
|
|
};
|
2024-09-25 01:52:44 +00:00
|
|
|
};
|
2024-04-19 15:13:39 +00:00
|
|
|
};
|
|
|
|
}
|