nixpkgs/pkgs/applications/science/logic/symbiyosys/default.nix
Austin Seipp 9cb5201d33 yosys/symbiyosys: 2017.10.16 -> 2017.11.05
Signed-off-by: Austin Seipp <aseipp@pobox.com>
2017-11-05 12:49:38 -06:00

37 lines
1.1 KiB
Nix

{ stdenv, fetchFromGitHub, yosys, python3 }:
stdenv.mkDerivation rec {
name = "symbiyosys-${version}";
version = "2017.11.05";
src = fetchFromGitHub {
owner = "cliffordwolf";
repo = "symbiyosys";
rev = "db9c7e97b8f84ef7e9b18ae630009897c7982a08";
sha256 = "0pyznkjm0vjmaf6mpwknmh052qrwy2fzi05h80ysx1bxc51ns0m0";
};
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;
};
}