2017-10-16 07:44:00 +00:00
|
|
|
{ stdenv, fetchFromGitHub, yosys, python3 }:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "symbiyosys-${version}";
|
2018-01-10 19:40:06 +00:00
|
|
|
version = "2018.01.10";
|
2017-10-16 07:44:00 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "cliffordwolf";
|
|
|
|
repo = "symbiyosys";
|
2018-01-10 19:40:06 +00:00
|
|
|
rev = "25936009bbc2cffd289c607ddf42a578527aa59c";
|
|
|
|
sha256 = "06idd8vbn4s2k6bja4f6lxjc4qwgbak2fhfxj8f18ki1xb3yqfh6";
|
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 = {
|
|
|
|
description = "Yosys verification tools for Hardware Definition Languages";
|
|
|
|
homepage = https://symbiyosys.readthedocs.io/;
|
|
|
|
license = stdenv.lib.licenses.mit;
|
|
|
|
maintainers = with stdenv.lib.maintainers; [ thoughtpolice ];
|
|
|
|
platforms = stdenv.lib.platforms.linux;
|
|
|
|
};
|
|
|
|
}
|