package minerva and dependencies

This commit is contained in:
Sebastien Bourdeauducq 2019-03-19 15:46:28 +08:00
commit cf6ebc9953
4 changed files with 71 additions and 0 deletions

6
default.nix Normal file
View File

@ -0,0 +1,6 @@
{ pkgs ? import <nixpkgs> {}}:
rec {
nmigen = pkgs.callPackage ./nmigen.nix {};
jtagtap = pkgs.callPackage ./jtagtap.nix { inherit nmigen; };
minerva = pkgs.callPackage ./minerva.nix { inherit nmigen; inherit jtagtap; };
}

21
jtagtap.nix Normal file
View File

@ -0,0 +1,21 @@
{ stdenv, fetchFromGitHub, python3Packages, nmigen }:
python3Packages.buildPythonPackage {
name = "jtagtap";
src = fetchFromGitHub {
owner = "lambdaconcept";
repo = "jtagtap";
rev = "cac2d0156d2b6495a94f11171a1cf143b33c8e5e";
sha256 = "05l4asx61zrg6c13irwm4a4k6gyk4r3isfrfidsqnh4g6739bdmg";
};
propagatedBuildInputs = [ nmigen ];
meta = with stdenv.lib; {
description = "A 32-bit RISC-V soft processor";
homepage = "https://m-labs.hk/migen";
license = licenses.bsd2;
maintainers = [ maintainers.sb0 ];
};
}

21
minerva.nix Normal file
View File

@ -0,0 +1,21 @@
{ stdenv, fetchFromGitHub, python3Packages, nmigen, jtagtap }:
python3Packages.buildPythonPackage {
name = "minerva";
src = fetchFromGitHub {
owner = "lambdaconcept";
repo = "minerva";
rev = "2b94dd6be54a0d4542ef320405dfa8a15e8fac93";
sha256 = "0w073nqvjh1vplmw463sz90ykfpz1mkmfmmglnqwhvp90p9ryhnr";
};
propagatedBuildInputs = [ nmigen jtagtap ];
meta = with stdenv.lib; {
description = "A 32-bit RISC-V soft processor";
homepage = "https://m-labs.hk/migen";
license = licenses.bsd2;
maintainers = [ maintainers.sb0 ];
};
}

23
nmigen.nix Normal file
View File

@ -0,0 +1,23 @@
{ stdenv, fetchFromGitHub, python3Packages, yosys, symbiyosys, yices }:
python3Packages.buildPythonPackage {
name = "nmigen";
src = fetchFromGitHub {
owner = "m-labs";
repo = "nmigen";
rev = "d69a4e29a8e2492dc916d0c7e42d9337c8c6d4c5";
sha256 = "04jndrml6zm9g0p61kd05kzviy0m0yf919c7g2hgdl9n2ja1aw4p";
};
checkPhase = "PATH=${yosys}/bin:${symbiyosys}/bin:${yices}/bin:$PATH python -m unittest discover nmigen.test";
propagatedBuildInputs = [ python3Packages.bitarray python3Packages.pyvcd ];
meta = with stdenv.lib; {
description = "A refreshed Python toolbox for building complex digital hardware";
homepage = "https://lambdaconcept.com";
license = licenses.bsd2;
maintainers = [ maintainers.sb0 ];
};
}