2019-05-12 16:05:37 +00:00
|
|
|
{ stdenv, fetchFromGitHub, yosys, bash, python3 }:
|
2017-10-16 07:44:00 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-13 23:46:49 +00:00
|
|
|
pname = "symbiyosys";
|
|
|
|
version = "2019.08.13";
|
2017-10-16 07:44:00 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2018-02-04 17:59:35 +00:00
|
|
|
owner = "yosyshq";
|
2017-10-16 07:44:00 +00:00
|
|
|
repo = "symbiyosys";
|
2019-08-13 23:46:49 +00:00
|
|
|
rev = "9cb542ac7a310b3dfa626349db53bed6236b670c";
|
|
|
|
sha256 = "0c7nz740738ybk33zzlfl00cq86n31wvra8pqqkpl4ygxnwca1d6";
|
2017-10-16 07:44:00 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ python3 yosys ];
|
|
|
|
|
|
|
|
buildPhase = "true";
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/bin $out/share/yosys/python3
|
|
|
|
|
|
|
|
cp sbysrc/sby_*.py $out/share/yosys/python3/
|
|
|
|
cp sbysrc/sby.py $out/bin/sby
|
|
|
|
chmod +x $out/bin/sby
|
|
|
|
|
|
|
|
# Fix up shebang and Yosys imports
|
|
|
|
patchShebangs $out/bin/sby
|
|
|
|
substituteInPlace $out/bin/sby \
|
|
|
|
--replace "##yosys-sys-path##" \
|
|
|
|
"sys.path += [p + \"/share/yosys/python3/\" for p in [\"$out\", \"${yosys}\"]]"
|
|
|
|
'';
|
|
|
|
meta = {
|
2018-03-21 21:01:02 +00:00
|
|
|
description = "Tooling for Yosys-based verification flows";
|
2017-10-16 07:44:00 +00:00
|
|
|
homepage = https://symbiyosys.readthedocs.io/;
|
2019-04-22 17:21:57 +00:00
|
|
|
license = stdenv.lib.licenses.isc;
|
2019-08-20 09:43:59 +00:00
|
|
|
maintainers = with stdenv.lib.maintainers; [ thoughtpolice emily ];
|
|
|
|
platforms = stdenv.lib.platforms.all;
|
2017-10-16 07:44:00 +00:00
|
|
|
};
|
|
|
|
}
|