301f14e993
Signed-off-by: Austin Seipp <aseipp@pobox.com>
37 lines
1.1 KiB
Nix
37 lines
1.1 KiB
Nix
{ stdenv, fetchFromGitHub, yosys, python3 }:
|
|
|
|
stdenv.mkDerivation rec {
|
|
name = "symbiyosys-${version}";
|
|
version = "2018.05.03";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "yosyshq";
|
|
repo = "symbiyosys";
|
|
rev = "35d956c7bb77c0602d198035b2d73a9c61cb4de4";
|
|
sha256 = "02zg3nkwp3fdjwz1agvsn55k1xipwh2rradb0bgjrjpsmmw63gda";
|
|
};
|
|
|
|
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 = "Tooling for Yosys-based verification flows";
|
|
homepage = https://symbiyosys.readthedocs.io/;
|
|
license = stdenv.lib.licenses.mit;
|
|
maintainers = with stdenv.lib.maintainers; [ thoughtpolice ];
|
|
platforms = stdenv.lib.platforms.unix;
|
|
};
|
|
}
|