2017-10-16 09:44:00 +02:00
|
|
|
{ stdenv, fetchFromGitHub, yosys, python3 }:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "symbiyosys-${version}";
|
2018-03-08 01:32:28 +01:00
|
|
|
version = "2018.03.07";
|
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-08 01:32:28 +01:00
|
|
|
rev = "2c13fbefe67adb3a4adb8a6f283b198abb8a43a0";
|
|
|
|
sha256 = "0v60530w5y4yj66zcp7lwa82158iw26mil1gj41lzyi2p651kc1k";
|
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 = {
|
|
|
|
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;
|
|
|
|
};
|
|
|
|
}
|