2017-10-16 09:44:00 +02:00
|
|
|
{ stdenv, fetchFromGitHub, yosys, python3 }:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "symbiyosys-${version}";
|
2018-03-21 22:01:02 +01:00
|
|
|
version = "2018.03.21";
|
2017-10-16 09:44:00 +02:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2018-02-04 18:59:35 +01:00
|
|
|
owner = "yosyshq";
|
2017-10-16 09:44:00 +02:00
|
|
|
repo = "symbiyosys";
|
2018-03-21 22:01:02 +01:00
|
|
|
rev = "76a624a363bc44df102359595d34f29370c6668b";
|
|
|
|
sha256 = "1ikax1yiqgj5442wcgp1iigw8wiyw7k848z4ykn7k068kbc320bm";
|
2017-10-16 09:44:00 +02: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 22:01:02 +01:00
|
|
|
description = "Tooling for Yosys-based verification flows";
|
2017-10-16 09:44:00 +02:00
|
|
|
homepage = https://symbiyosys.readthedocs.io/;
|
|
|
|
license = stdenv.lib.licenses.mit;
|
|
|
|
maintainers = with stdenv.lib.maintainers; [ thoughtpolice ];
|
|
|
|
platforms = stdenv.lib.platforms.linux;
|
|
|
|
};
|
|
|
|
}
|