generated from saji/ecp5-template
Compare commits
No commits in common. "ccdbc98cb0d7bab8bd379ac9bb3ad858cf21b783" and "20054ad03415176ea5353fb957e286a74896cdc6" have entirely different histories.
ccdbc98cb0
...
20054ad034
44
flake.lock
44
flake.lock
|
@ -1,32 +1,29 @@
|
|||
{
|
||||
"nodes": {
|
||||
"flake-parts": {
|
||||
"flake-utils": {
|
||||
"inputs": {
|
||||
"nixpkgs-lib": [
|
||||
"nixpkgs"
|
||||
]
|
||||
"systems": "systems"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1726153070,
|
||||
"narHash": "sha256-HO4zgY0ekfwO5bX0QH/3kJ/h4KvUDFZg8YpkNwIbg1U=",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"rev": "bcef6817a8b2aa20a5a6dbb19b43e63c5bf8619a",
|
||||
"lastModified": 1726560853,
|
||||
"narHash": "sha256-X6rJYSESBVr3hBoH0WbKE5KvhPU5bloyZ2L4K60/fPQ=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "c1dfcf08411b08f6b8615f7d8971a2bfa81d5e8a",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"type": "github"
|
||||
"id": "flake-utils",
|
||||
"type": "indirect"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1726937504,
|
||||
"narHash": "sha256-bvGoiQBvponpZh8ClUcmJ6QnsNKw0EMrCQJARK3bI1c=",
|
||||
"lastModified": 1723637854,
|
||||
"narHash": "sha256-med8+5DSWa2UnOqtdICndjDAEjxr5D7zaIiK4pn0Q7c=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "9357f4f23713673f310988025d9dc261c20e70c6",
|
||||
"rev": "c3aa7b8938b17aebd2deecf7be0636000d62a2b9",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -38,9 +35,24 @@
|
|||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"flake-parts": "flake-parts",
|
||||
"flake-utils": "flake-utils",
|
||||
"nixpkgs": "nixpkgs"
|
||||
}
|
||||
},
|
||||
"systems": {
|
||||
"locked": {
|
||||
"lastModified": 1681028828,
|
||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"type": "github"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
|
|
81
flake.nix
81
flake.nix
|
@ -3,68 +3,53 @@
|
|||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
flake-parts = {
|
||||
url = "github:hercules-ci/flake-parts";
|
||||
inputs.nixpkgs-lib.follows = "nixpkgs";
|
||||
};
|
||||
};
|
||||
|
||||
outputs =
|
||||
inputs@{ flake-parts, ... }:
|
||||
flake-parts.lib.mkFlake { inherit inputs; } {
|
||||
|
||||
systems = [
|
||||
"x86_64-linux"
|
||||
"aarch64-linux"
|
||||
"aarch64-darwin"
|
||||
"x86_64-darwin"
|
||||
outputs = inputs@{ self, 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
|
||||
];
|
||||
|
||||
perSystem =
|
||||
{
|
||||
config,
|
||||
self',
|
||||
inputs',
|
||||
pkgs,
|
||||
system,
|
||||
...
|
||||
}:
|
||||
{
|
||||
formatter = pkgs.nixfmt-rfc-style;
|
||||
packages.default = pkgs.python3.pkgs.buildPythonPackage {
|
||||
name = "groovylight";
|
||||
version = "0.0.1";
|
||||
}
|
||||
));
|
||||
in {
|
||||
packages = forAllSystems (pkgs: {
|
||||
niar = pkgs.python3.buildPythonPackage {
|
||||
name = "niar";
|
||||
version = pyproject-toml.project.version;
|
||||
src = ./.;
|
||||
format = "pyproject";
|
||||
pyproject = true;
|
||||
|
||||
build-system = [ pkgs.python3.pkgs.pdm-backend ];
|
||||
build-system = [pkgs.python3.pdm-backend];
|
||||
|
||||
propagatedBuildInputs = [
|
||||
pkgs.python3.pkgs.amaranth
|
||||
pkgs.python3.pkgs.amaranth-boards
|
||||
propagatedBuildInpusts = [
|
||||
pkgs.python3.amaranth
|
||||
pkgs.python3.amaranth-boards
|
||||
];
|
||||
|
||||
doCheck = true;
|
||||
nativeCheckInputs = with pkgs; [
|
||||
python3.pkgs.pytestCheckHook
|
||||
yosys
|
||||
nextpnr
|
||||
trellis
|
||||
openfpgaloader
|
||||
];
|
||||
|
||||
nativeCheckInputs = [python3.pkgs.pytestCheckHook];
|
||||
};
|
||||
devShells.default = pkgs.mkShell {
|
||||
});
|
||||
devShells = forAllSystems (pkgs: {
|
||||
default = pkgs.mkShell {
|
||||
packages = with pkgs; [
|
||||
(python3.withPackages (
|
||||
pypkgs: with pypkgs; [
|
||||
(python3.withPackages (pypkgs: with pypkgs; [
|
||||
amaranth
|
||||
amaranth-boards
|
||||
self'.packages.default
|
||||
]
|
||||
))
|
||||
]))
|
||||
yosys
|
||||
nextpnr
|
||||
# simulators
|
||||
iverilog
|
||||
verilator
|
||||
# support package
|
||||
trellis
|
||||
# loader
|
||||
|
@ -72,6 +57,6 @@
|
|||
ecpdap # easier to poke probes.
|
||||
];
|
||||
};
|
||||
};
|
||||
});
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
# an overlay to
|
||||
let
|
||||
tag = "2023.12";
|
||||
in
|
||||
final: prev: {
|
||||
in final: prev: {
|
||||
wishbone-tool = prev.callPackage(import ./wishbone-tool.nix) { };
|
||||
pythonPackagesExtensions = prev.pythonPackagesExtensions ++ [
|
||||
(python-final: python-prev: {
|
||||
|
@ -13,12 +12,9 @@ final: prev: {
|
|||
litespi = python-final.callPackage(import ./litespi.nix tag) { };
|
||||
liteiclink = python-final.callPackage(import ./liteiclink.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-picolibc =
|
||||
python-final.callPackage (import ./pythondata-software-picolibc.nix tag)
|
||||
{ };
|
||||
pythondata-software-compiler_rt = python-final.callPackage(import ./pythondata-software-compiler_rt.nix tag) { };
|
||||
pythondata-software-picolibc = python-final.callPackage(import ./pythondata-software-picolibc.nix tag) { };
|
||||
})
|
||||
];
|
||||
}
|
||||
|
||||
|
|
|
@ -1,12 +1,10 @@
|
|||
tag:
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
buildPythonPackage,
|
||||
migen,
|
||||
pyyaml,
|
||||
}:
|
||||
buildPythonPackage {
|
||||
tag: {
|
||||
pkgs
|
||||
, lib
|
||||
, buildPythonPackage
|
||||
, migen
|
||||
, pyyaml
|
||||
}: buildPythonPackage {
|
||||
pname = "litedram";
|
||||
version = "${tag}";
|
||||
|
||||
|
|
|
@ -1,14 +1,12 @@
|
|||
tag:
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
buildPythonPackage,
|
||||
migen,
|
||||
setuptools,
|
||||
litex,
|
||||
pyyaml,
|
||||
}:
|
||||
buildPythonPackage {
|
||||
tag: {
|
||||
pkgs
|
||||
, lib
|
||||
, buildPythonPackage
|
||||
, migen
|
||||
, setuptools
|
||||
, litex
|
||||
, pyyaml
|
||||
}: buildPythonPackage {
|
||||
pname = "liteeth";
|
||||
version = "${tag}";
|
||||
|
||||
|
@ -19,11 +17,17 @@ buildPythonPackage {
|
|||
hash = "sha256-DUNwDzcFLVmL5F/ZWmok7T7jO7ixC9IuDr1WUarnAqk=";
|
||||
};
|
||||
|
||||
buildInputs = [ litex ];
|
||||
buildInputs = [
|
||||
litex
|
||||
];
|
||||
|
||||
propagatedBuildInputs = [ migen ];
|
||||
propagatedBuildInputs = [
|
||||
migen
|
||||
];
|
||||
|
||||
nativeCheckInputs = [ pyyaml ];
|
||||
nativeCheckInputs = [
|
||||
pyyaml
|
||||
];
|
||||
|
||||
checkPhase = ''
|
||||
python -m unittest test
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
tag:
|
||||
{
|
||||
pkgs,
|
||||
buildPythonPackage,
|
||||
litex,
|
||||
}:
|
||||
buildPythonPackage {
|
||||
tag: {
|
||||
pkgs
|
||||
, buildPythonPackage
|
||||
, litex
|
||||
}: buildPythonPackage {
|
||||
pname = "liteiclink";
|
||||
version = "${tag}";
|
||||
|
||||
|
@ -15,7 +13,9 @@ buildPythonPackage {
|
|||
hash = "sha256-5Hp5vFqmfkXo1q60FvOkToTy952svirChIPIvkam04M=";
|
||||
};
|
||||
|
||||
buildInputs = [ litex ];
|
||||
buildInputs = [
|
||||
litex
|
||||
];
|
||||
|
||||
checkPhase = ''
|
||||
python -m unittest test
|
||||
|
|
|
@ -1,13 +1,11 @@
|
|||
tag:
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
buildPythonPackage,
|
||||
migen,
|
||||
setuptools,
|
||||
litex,
|
||||
}:
|
||||
buildPythonPackage {
|
||||
tag: {
|
||||
pkgs
|
||||
, lib
|
||||
, buildPythonPackage
|
||||
, migen
|
||||
, setuptools
|
||||
, litex
|
||||
}: buildPythonPackage {
|
||||
pname = "litescope";
|
||||
version = "${tag}";
|
||||
|
||||
|
@ -18,7 +16,9 @@ buildPythonPackage {
|
|||
hash = "sha256-OWC+XwB+BzlCQkPKJCbQ0W4T6JbsInldrn9jYYjWypM=";
|
||||
};
|
||||
|
||||
buildInputs = [ litex ];
|
||||
buildInputs = [
|
||||
litex
|
||||
];
|
||||
|
||||
checkPhase = ''
|
||||
python -m unittest test
|
||||
|
|
|
@ -1,13 +1,11 @@
|
|||
tag:
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
buildPythonPackage,
|
||||
migen,
|
||||
setuptools,
|
||||
litex,
|
||||
}:
|
||||
buildPythonPackage {
|
||||
tag: {
|
||||
pkgs
|
||||
, lib
|
||||
, buildPythonPackage
|
||||
, migen
|
||||
, setuptools
|
||||
, litex
|
||||
}: buildPythonPackage {
|
||||
pname = "litespi";
|
||||
version = "${tag}";
|
||||
|
||||
|
@ -18,11 +16,16 @@ buildPythonPackage {
|
|||
hash = "sha256-XYeWokF1IGtZWRK+6jhRSN91MOV5vyh5aO08sbtFBxw=";
|
||||
};
|
||||
|
||||
buildInputs = [ litex ];
|
||||
buildInputs = [
|
||||
litex
|
||||
];
|
||||
|
||||
propagatedBuildInputs = [ migen ];
|
||||
propagatedBuildInputs = [
|
||||
migen
|
||||
];
|
||||
|
||||
nativeCheckInputs = [ ];
|
||||
nativeCheckInputs = [
|
||||
];
|
||||
|
||||
checkPhase = ''
|
||||
python -m unittest test
|
||||
|
|
|
@ -1,15 +1,13 @@
|
|||
tag:
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
buildPythonPackage,
|
||||
pyserial,
|
||||
migen,
|
||||
requests,
|
||||
packaging,
|
||||
pexpect,
|
||||
}:
|
||||
buildPythonPackage {
|
||||
tag: {
|
||||
pkgs
|
||||
, lib
|
||||
, buildPythonPackage
|
||||
, pyserial
|
||||
, migen
|
||||
, requests
|
||||
, packaging
|
||||
, pexpect
|
||||
}: buildPythonPackage {
|
||||
pname = "litex";
|
||||
version = "${tag}";
|
||||
|
||||
|
@ -20,7 +18,9 @@ buildPythonPackage {
|
|||
hash = "sha256-OcwqYLQ7ec2vTewdIJqP/aTCJ4yI43OIOkTMD/hIKO0=";
|
||||
};
|
||||
|
||||
buildInputs = [ migen ];
|
||||
buildInputs = [
|
||||
migen
|
||||
];
|
||||
|
||||
propagatedBuildInputs = [
|
||||
requests
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
tag:
|
||||
{ pkgs, buildPythonPackage }:
|
||||
buildPythonPackage rec {
|
||||
tag: {
|
||||
pkgs
|
||||
, buildPythonPackage
|
||||
}: buildPythonPackage rec {
|
||||
pname = "pythondata-cpu-vexriscv";
|
||||
version = "${tag}";
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
tag:
|
||||
{ pkgs, buildPythonPackage }:
|
||||
buildPythonPackage rec {
|
||||
tag: {
|
||||
pkgs
|
||||
, buildPythonPackage
|
||||
}: buildPythonPackage rec {
|
||||
pname = "pythondata-software-compiler_rt";
|
||||
version = "${tag}";
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
tag:
|
||||
{ pkgs, buildPythonPackage }:
|
||||
buildPythonPackage rec {
|
||||
tag: {
|
||||
pkgs
|
||||
, buildPythonPackage
|
||||
}: buildPythonPackage rec {
|
||||
pname = "pythondata-software-picolibc";
|
||||
version = "${tag}";
|
||||
|
||||
|
|
|
@ -1,8 +1,4 @@
|
|||
{
|
||||
lib,
|
||||
fetchFromGitHub,
|
||||
rustPlatform,
|
||||
}:
|
||||
{ lib, fetchFromGitHub, rustPlatform }:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "wishbone-tool";
|
||||
|
@ -16,5 +12,6 @@ rustPlatform.buildRustPackage rec {
|
|||
};
|
||||
sourceRoot = "${src.name}/wishbone-tool";
|
||||
|
||||
|
||||
cargoHash = "sha256-kWvtZEXtb5bZ7/hd8jsr41UGSDOuDU4tyKWAL0kDoIg=";
|
||||
}
|
||||
|
|
|
@ -13,10 +13,6 @@ requires-python = "==3.12.*"
|
|||
readme = "README.md"
|
||||
license = {text = "MIT"}
|
||||
|
||||
[build-system]
|
||||
requires = ["pdm-backend"]
|
||||
build-backend = "pdm.backend"
|
||||
|
||||
[tool.pdm.dev-dependencies]
|
||||
dev = [
|
||||
"basedpyright",
|
||||
|
|
Loading…
Reference in a new issue