add amaranth-boards, wip main package
Some checks failed
Verilator Unit Tests / Test (push) Failing after 38s

This commit is contained in:
Saji 2024-09-24 20:52:44 -05:00
parent b25ab8bd52
commit 20054ad034
2 changed files with 31 additions and 4 deletions

View file

@ -5,7 +5,7 @@
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
};
outputs = inputs@{ nixpkgs, flake-utils, ... }:
outputs = inputs@{ self, nixpkgs, flake-utils, ... }:
let
python-overlay = import ./python.nix;
systems = [ "x86_64-linux" "aarch64-linux" "aarch64-darwin" "x86_64-darwin" ];
@ -21,14 +21,29 @@
));
in {
packages = forAllSystems (pkgs: {
sim = import ./sim/package.nix pkgs;
niar = pkgs.python3.buildPythonPackage {
name = "niar";
version = pyproject-toml.project.version;
src = ./.;
pyproject = true;
build-system = [pkgs.python3.pdm-backend];
propagatedBuildInpusts = [
pkgs.python3.amaranth
pkgs.python3.amaranth-boards
];
doCheck = true;
nativeCheckInputs = [python3.pkgs.pytestCheckHook];
};
});
devShells = forAllSystems (pkgs: {
default = pkgs.mkShell {
packages = with pkgs; [
(python3.withPackages (ps: with ps; [
(python3.withPackages (pypkgs: with pypkgs; [
amaranth
amaranth-boards
]))
yosys
nextpnr

View file

@ -8,11 +8,23 @@ final: prev: {
owner = "amaranth-lang";
repo = "amaranth";
rev = "e30d822a7d93ee615e70e95a9958051dcc794802";
hash = "sha256-A46CMWGvqUFTp3geFFccUM9M7iECmNndzWm2GxA8XbE";
# hash = "sha256-A46CMWGvqUFTp3geFFccUM9M7iECmNndzWm2GxA8XbE";
hash = "sha256-sCUipI7HcuTg3sJscoSI0UdIutnxGWSwbgpwWyZuFxk=";
};
doCheck = false;
# installCheckPhase = "${prev.python3.interpreter} -m unittest discover -t . -s tests -v";
};
amaranth-boards = pyprev.amaranth-boards.overridePythonAttrs {
version = "0.1.dev250";
src = prev.pkgs.fetchFromGitHub {
owner = "amaranth-lang";
repo = "amaranth-boards";
rev = "19b97324ecf9111c5d16377af79f82aad761c476";
hash = "sha256-0uvn91i/yuIY75lL5Oxvozdw7Q2Uw83JWo7srgEYEpI=";
};
build-system = [pyprev.pdm-backend];
dontCheckRuntimeDeps = 1;
};
};
};
}