nixpkgs/pkgs/applications/science/logic/symbiyosys/default.nix
Austin Seipp fe8eb566b5
symbiyosys: 2019.03.28 -> 2019.04.18
Signed-off-by: Austin Seipp <aseipp@pobox.com>
2019-04-22 14:27:45 -05:00

38 lines
1.1 KiB
Nix

{ stdenv, fetchFromGitHub, yosys, python3 }:
stdenv.mkDerivation rec {
name = "symbiyosys-${version}";
version = "2019.04.18";
src = fetchFromGitHub {
owner = "yosyshq";
repo = "symbiyosys";
rev = "b1de59032ef3de35e56fa420a914c2f14d2495e4";
sha256 = "0zci1n062csswl5xxjh9fwq09p9clv95ckag3yywxq06hnqzx0r7";
};
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.isc;
maintainers = with stdenv.lib.maintainers; [ thoughtpolice ];
platforms = stdenv.lib.platforms.unix;
};
}