2017-10-16 09:44:00 +02:00
|
|
|
{ stdenv, fetchFromGitHub, yosys, python3 }:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "symbiyosys-${version}";
|
2018-10-01 04:16:16 +02:00
|
|
|
version = "2018.09.12";
|
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-10-01 04:16:16 +02:00
|
|
|
rev = "e90bcb588e97118af0cdba23fae562fb0efbf294";
|
|
|
|
sha256 = "16nlimpdc3g6lghwqpyirgrr1d9mgk4wg3c06fvglzaicvjixnfr";
|
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 ];
|
2018-04-16 13:44:53 +02:00
|
|
|
platforms = stdenv.lib.platforms.unix;
|
2017-10-16 09:44:00 +02:00
|
|
|
};
|
|
|
|
}
|