nixpkgs/pkgs/applications/science/logic/symbiyosys/default.nix

38 lines
1.1 KiB
Nix
Raw Normal View History

{ stdenv, fetchFromGitHub, yosys, python3 }:
stdenv.mkDerivation rec {
name = "symbiyosys-${version}";
version = "2018.09.12";
src = fetchFromGitHub {
owner = "yosyshq";
repo = "symbiyosys";
rev = "e90bcb588e97118af0cdba23fae562fb0efbf294";
sha256 = "16nlimpdc3g6lghwqpyirgrr1d9mgk4wg3c06fvglzaicvjixnfr";
};
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 ];
2018-04-16 13:44:53 +02:00
platforms = stdenv.lib.platforms.unix;
};
}