generated from saji/ecp5-template
start working on making flake work
Some checks failed
Verilator Unit Tests / Test (push) Failing after 1m26s
Some checks failed
Verilator Unit Tests / Test (push) Failing after 1m26s
This commit is contained in:
parent
63811b929a
commit
0d2719c39f
33
flake.lock
33
flake.lock
|
@ -1,5 +1,22 @@
|
|||
{
|
||||
"nodes": {
|
||||
"flake-utils": {
|
||||
"inputs": {
|
||||
"systems": "systems"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1726560853,
|
||||
"narHash": "sha256-X6rJYSESBVr3hBoH0WbKE5KvhPU5bloyZ2L4K60/fPQ=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "c1dfcf08411b08f6b8615f7d8971a2bfa81d5e8a",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"id": "flake-utils",
|
||||
"type": "indirect"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1723637854,
|
||||
|
@ -18,8 +35,24 @@
|
|||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"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",
|
||||
|
|
27
flake.nix
27
flake.nix
|
@ -5,17 +5,9 @@
|
|||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
};
|
||||
|
||||
outputs = inputs@{ nixpkgs, ... }:
|
||||
outputs = inputs@{ nixpkgs, flake-utils, ... }:
|
||||
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;
|
||||
python-overlay = import ./python.nix;
|
||||
systems = [ "x86_64-linux" "aarch64-linux" "aarch64-darwin" "x86_64-darwin" ];
|
||||
forAllSystems = function:
|
||||
nixpkgs.lib.genAttrs systems (system: function (
|
||||
|
@ -23,38 +15,31 @@
|
|||
inherit system;
|
||||
config.allowUnfree = true;
|
||||
overlays = [
|
||||
]; # patches, version pins, new pkgs here.
|
||||
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; [
|
||||
cocotb
|
||||
amaranth
|
||||
]))
|
||||
yosys
|
||||
nextpnr
|
||||
pkgsCross.riscv64.buildPackages.gcc
|
||||
gnumake
|
||||
wishbone-tool
|
||||
# simulators
|
||||
verilog
|
||||
iverilog
|
||||
verilator
|
||||
# support package
|
||||
trellis
|
||||
# loader
|
||||
openfpgaloader
|
||||
ecpdap # easier to poke probes.
|
||||
|
||||
# for building the simulator
|
||||
cmake
|
||||
ninja
|
||||
mdbook
|
||||
];
|
||||
};
|
||||
});
|
||||
|
|
18
python.nix
Normal file
18
python.nix
Normal file
|
@ -0,0 +1,18 @@
|
|||
# overlay python patched version with amaranth/boards updated.
|
||||
final: prev: {
|
||||
python3 = prev.python3.override {
|
||||
packageOverrides = pyfinal: pyprev: {
|
||||
amaranth = pyprev.amaranth.overridePythonAttrs {
|
||||
version = "0.6.0.dev53";
|
||||
src = prev.pkgs.fetchFromGitHub {
|
||||
owner = "amaranth-lang";
|
||||
repo = "amaranth";
|
||||
rev = "e30d822a7d93ee615e70e95a9958051dcc794802";
|
||||
hash = "sha256-A46CMWGvqUFTp3geFFccUM9M7iECmNndzWm2GxA8XbE";
|
||||
};
|
||||
doCheck = false;
|
||||
# installCheckPhase = "${prev.python3.interpreter} -m unittest discover -t . -s tests -v";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue