generated from saji/ecp5-template
add flake/nix formatter (nixfmt)
Some checks failed
Verilator Unit Tests / Test (push) Failing after 3m35s
Some checks failed
Verilator Unit Tests / Test (push) Failing after 3m35s
This commit is contained in:
parent
79927f0cbd
commit
ccdbc98cb0
53
flake.nix
53
flake.nix
|
@ -9,34 +9,28 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = inputs@{flake-parts, ... }:
|
outputs =
|
||||||
|
inputs@{ flake-parts, ... }:
|
||||||
flake-parts.lib.mkFlake { inherit inputs; } {
|
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.
|
|
||||||
# ];
|
|
||||||
# };
|
|
||||||
# };
|
|
||||||
|
|
||||||
systems = [ "x86_64-linux" "aarch64-linux" "aarch64-darwin" "x86_64-darwin" ];
|
systems = [
|
||||||
|
"x86_64-linux"
|
||||||
|
"aarch64-linux"
|
||||||
|
"aarch64-darwin"
|
||||||
|
"x86_64-darwin"
|
||||||
|
];
|
||||||
|
|
||||||
perSystem = {config, self', inputs', pkgs, system, ...}: {
|
perSystem =
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
self',
|
||||||
|
inputs',
|
||||||
|
pkgs,
|
||||||
|
system,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
|
formatter = pkgs.nixfmt-rfc-style;
|
||||||
packages.default = pkgs.python3.pkgs.buildPythonPackage {
|
packages.default = pkgs.python3.pkgs.buildPythonPackage {
|
||||||
name = "groovylight";
|
name = "groovylight";
|
||||||
version = "0.0.1";
|
version = "0.0.1";
|
||||||
|
@ -62,16 +56,15 @@
|
||||||
};
|
};
|
||||||
devShells.default = pkgs.mkShell {
|
devShells.default = pkgs.mkShell {
|
||||||
packages = with pkgs; [
|
packages = with pkgs; [
|
||||||
(python3.withPackages (pypkgs: with pypkgs; [
|
(python3.withPackages (
|
||||||
|
pypkgs: with pypkgs; [
|
||||||
amaranth
|
amaranth
|
||||||
amaranth-boards
|
amaranth-boards
|
||||||
]))
|
|
||||||
self'.packages.default
|
self'.packages.default
|
||||||
|
]
|
||||||
|
))
|
||||||
yosys
|
yosys
|
||||||
nextpnr
|
nextpnr
|
||||||
# simulators
|
|
||||||
iverilog
|
|
||||||
verilator
|
|
||||||
# support package
|
# support package
|
||||||
trellis
|
trellis
|
||||||
# loader
|
# loader
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
# an overlay to
|
# an overlay to
|
||||||
let
|
let
|
||||||
tag = "2023.12";
|
tag = "2023.12";
|
||||||
in final: prev: {
|
in
|
||||||
|
final: prev: {
|
||||||
wishbone-tool = prev.callPackage (import ./wishbone-tool.nix) { };
|
wishbone-tool = prev.callPackage (import ./wishbone-tool.nix) { };
|
||||||
pythonPackagesExtensions = prev.pythonPackagesExtensions ++ [
|
pythonPackagesExtensions = prev.pythonPackagesExtensions ++ [
|
||||||
(python-final: python-prev: {
|
(python-final: python-prev: {
|
||||||
|
@ -12,9 +13,12 @@ in final: prev: {
|
||||||
litespi = python-final.callPackage (import ./litespi.nix tag) { };
|
litespi = python-final.callPackage (import ./litespi.nix tag) { };
|
||||||
liteiclink = python-final.callPackage (import ./liteiclink.nix tag) { };
|
liteiclink = python-final.callPackage (import ./liteiclink.nix tag) { };
|
||||||
pythondata-cpu-vexriscv = python-final.callPackage (import ./pythondata-cpu-vexriscv.nix tag) { };
|
pythondata-cpu-vexriscv = python-final.callPackage (import ./pythondata-cpu-vexriscv.nix tag) { };
|
||||||
pythondata-software-compiler_rt = python-final.callPackage(import ./pythondata-software-compiler_rt.nix tag) { };
|
pythondata-software-compiler_rt =
|
||||||
pythondata-software-picolibc = python-final.callPackage(import ./pythondata-software-picolibc.nix tag) { };
|
python-final.callPackage (import ./pythondata-software-compiler_rt.nix tag)
|
||||||
|
{ };
|
||||||
|
pythondata-software-picolibc =
|
||||||
|
python-final.callPackage (import ./pythondata-software-picolibc.nix tag)
|
||||||
|
{ };
|
||||||
})
|
})
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,12 @@
|
||||||
tag: {
|
tag:
|
||||||
pkgs
|
{
|
||||||
, lib
|
pkgs,
|
||||||
, buildPythonPackage
|
lib,
|
||||||
, migen
|
buildPythonPackage,
|
||||||
, pyyaml
|
migen,
|
||||||
}: buildPythonPackage {
|
pyyaml,
|
||||||
|
}:
|
||||||
|
buildPythonPackage {
|
||||||
pname = "litedram";
|
pname = "litedram";
|
||||||
version = "${tag}";
|
version = "${tag}";
|
||||||
|
|
||||||
|
|
|
@ -1,12 +1,14 @@
|
||||||
tag: {
|
tag:
|
||||||
pkgs
|
{
|
||||||
, lib
|
pkgs,
|
||||||
, buildPythonPackage
|
lib,
|
||||||
, migen
|
buildPythonPackage,
|
||||||
, setuptools
|
migen,
|
||||||
, litex
|
setuptools,
|
||||||
, pyyaml
|
litex,
|
||||||
}: buildPythonPackage {
|
pyyaml,
|
||||||
|
}:
|
||||||
|
buildPythonPackage {
|
||||||
pname = "liteeth";
|
pname = "liteeth";
|
||||||
version = "${tag}";
|
version = "${tag}";
|
||||||
|
|
||||||
|
@ -17,17 +19,11 @@ tag: {
|
||||||
hash = "sha256-DUNwDzcFLVmL5F/ZWmok7T7jO7ixC9IuDr1WUarnAqk=";
|
hash = "sha256-DUNwDzcFLVmL5F/ZWmok7T7jO7ixC9IuDr1WUarnAqk=";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [ litex ];
|
||||||
litex
|
|
||||||
];
|
|
||||||
|
|
||||||
propagatedBuildInputs = [
|
propagatedBuildInputs = [ migen ];
|
||||||
migen
|
|
||||||
];
|
|
||||||
|
|
||||||
nativeCheckInputs = [
|
nativeCheckInputs = [ pyyaml ];
|
||||||
pyyaml
|
|
||||||
];
|
|
||||||
|
|
||||||
checkPhase = ''
|
checkPhase = ''
|
||||||
python -m unittest test
|
python -m unittest test
|
||||||
|
|
|
@ -1,8 +1,10 @@
|
||||||
tag: {
|
tag:
|
||||||
pkgs
|
{
|
||||||
, buildPythonPackage
|
pkgs,
|
||||||
, litex
|
buildPythonPackage,
|
||||||
}: buildPythonPackage {
|
litex,
|
||||||
|
}:
|
||||||
|
buildPythonPackage {
|
||||||
pname = "liteiclink";
|
pname = "liteiclink";
|
||||||
version = "${tag}";
|
version = "${tag}";
|
||||||
|
|
||||||
|
@ -13,9 +15,7 @@ tag: {
|
||||||
hash = "sha256-5Hp5vFqmfkXo1q60FvOkToTy952svirChIPIvkam04M=";
|
hash = "sha256-5Hp5vFqmfkXo1q60FvOkToTy952svirChIPIvkam04M=";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [ litex ];
|
||||||
litex
|
|
||||||
];
|
|
||||||
|
|
||||||
checkPhase = ''
|
checkPhase = ''
|
||||||
python -m unittest test
|
python -m unittest test
|
||||||
|
|
|
@ -1,11 +1,13 @@
|
||||||
tag: {
|
tag:
|
||||||
pkgs
|
{
|
||||||
, lib
|
pkgs,
|
||||||
, buildPythonPackage
|
lib,
|
||||||
, migen
|
buildPythonPackage,
|
||||||
, setuptools
|
migen,
|
||||||
, litex
|
setuptools,
|
||||||
}: buildPythonPackage {
|
litex,
|
||||||
|
}:
|
||||||
|
buildPythonPackage {
|
||||||
pname = "litescope";
|
pname = "litescope";
|
||||||
version = "${tag}";
|
version = "${tag}";
|
||||||
|
|
||||||
|
@ -16,9 +18,7 @@ tag: {
|
||||||
hash = "sha256-OWC+XwB+BzlCQkPKJCbQ0W4T6JbsInldrn9jYYjWypM=";
|
hash = "sha256-OWC+XwB+BzlCQkPKJCbQ0W4T6JbsInldrn9jYYjWypM=";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [ litex ];
|
||||||
litex
|
|
||||||
];
|
|
||||||
|
|
||||||
checkPhase = ''
|
checkPhase = ''
|
||||||
python -m unittest test
|
python -m unittest test
|
||||||
|
|
|
@ -1,11 +1,13 @@
|
||||||
tag: {
|
tag:
|
||||||
pkgs
|
{
|
||||||
, lib
|
pkgs,
|
||||||
, buildPythonPackage
|
lib,
|
||||||
, migen
|
buildPythonPackage,
|
||||||
, setuptools
|
migen,
|
||||||
, litex
|
setuptools,
|
||||||
}: buildPythonPackage {
|
litex,
|
||||||
|
}:
|
||||||
|
buildPythonPackage {
|
||||||
pname = "litespi";
|
pname = "litespi";
|
||||||
version = "${tag}";
|
version = "${tag}";
|
||||||
|
|
||||||
|
@ -16,16 +18,11 @@ tag: {
|
||||||
hash = "sha256-XYeWokF1IGtZWRK+6jhRSN91MOV5vyh5aO08sbtFBxw=";
|
hash = "sha256-XYeWokF1IGtZWRK+6jhRSN91MOV5vyh5aO08sbtFBxw=";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [ litex ];
|
||||||
litex
|
|
||||||
];
|
|
||||||
|
|
||||||
propagatedBuildInputs = [
|
propagatedBuildInputs = [ migen ];
|
||||||
migen
|
|
||||||
];
|
|
||||||
|
|
||||||
nativeCheckInputs = [
|
nativeCheckInputs = [ ];
|
||||||
];
|
|
||||||
|
|
||||||
checkPhase = ''
|
checkPhase = ''
|
||||||
python -m unittest test
|
python -m unittest test
|
||||||
|
|
|
@ -1,13 +1,15 @@
|
||||||
tag: {
|
tag:
|
||||||
pkgs
|
{
|
||||||
, lib
|
pkgs,
|
||||||
, buildPythonPackage
|
lib,
|
||||||
, pyserial
|
buildPythonPackage,
|
||||||
, migen
|
pyserial,
|
||||||
, requests
|
migen,
|
||||||
, packaging
|
requests,
|
||||||
, pexpect
|
packaging,
|
||||||
}: buildPythonPackage {
|
pexpect,
|
||||||
|
}:
|
||||||
|
buildPythonPackage {
|
||||||
pname = "litex";
|
pname = "litex";
|
||||||
version = "${tag}";
|
version = "${tag}";
|
||||||
|
|
||||||
|
@ -18,9 +20,7 @@ tag: {
|
||||||
hash = "sha256-OcwqYLQ7ec2vTewdIJqP/aTCJ4yI43OIOkTMD/hIKO0=";
|
hash = "sha256-OcwqYLQ7ec2vTewdIJqP/aTCJ4yI43OIOkTMD/hIKO0=";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [ migen ];
|
||||||
migen
|
|
||||||
];
|
|
||||||
|
|
||||||
propagatedBuildInputs = [
|
propagatedBuildInputs = [
|
||||||
requests
|
requests
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
tag: {
|
tag:
|
||||||
pkgs
|
{ pkgs, buildPythonPackage }:
|
||||||
, buildPythonPackage
|
buildPythonPackage rec {
|
||||||
}: buildPythonPackage rec {
|
|
||||||
pname = "pythondata-cpu-vexriscv";
|
pname = "pythondata-cpu-vexriscv";
|
||||||
version = "${tag}";
|
version = "${tag}";
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
tag: {
|
tag:
|
||||||
pkgs
|
{ pkgs, buildPythonPackage }:
|
||||||
, buildPythonPackage
|
buildPythonPackage rec {
|
||||||
}: buildPythonPackage rec {
|
|
||||||
pname = "pythondata-software-compiler_rt";
|
pname = "pythondata-software-compiler_rt";
|
||||||
version = "${tag}";
|
version = "${tag}";
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
tag: {
|
tag:
|
||||||
pkgs
|
{ pkgs, buildPythonPackage }:
|
||||||
, buildPythonPackage
|
buildPythonPackage rec {
|
||||||
}: buildPythonPackage rec {
|
|
||||||
pname = "pythondata-software-picolibc";
|
pname = "pythondata-software-picolibc";
|
||||||
version = "${tag}";
|
version = "${tag}";
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,8 @@
|
||||||
{ lib, fetchFromGitHub, rustPlatform }:
|
{
|
||||||
|
lib,
|
||||||
|
fetchFromGitHub,
|
||||||
|
rustPlatform,
|
||||||
|
}:
|
||||||
|
|
||||||
rustPlatform.buildRustPackage rec {
|
rustPlatform.buildRustPackage rec {
|
||||||
pname = "wishbone-tool";
|
pname = "wishbone-tool";
|
||||||
|
@ -12,6 +16,5 @@ rustPlatform.buildRustPackage rec {
|
||||||
};
|
};
|
||||||
sourceRoot = "${src.name}/wishbone-tool";
|
sourceRoot = "${src.name}/wishbone-tool";
|
||||||
|
|
||||||
|
|
||||||
cargoHash = "sha256-kWvtZEXtb5bZ7/hd8jsr41UGSDOuDU4tyKWAL0kDoIg=";
|
cargoHash = "sha256-kWvtZEXtb5bZ7/hd8jsr41UGSDOuDU4tyKWAL0kDoIg=";
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue