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

42 lines
1.3 KiB
Nix
Raw Normal View History

{ stdenv, fetchFromGitHub, yosys, bash, python3, yices }:
2019-08-13 21:52:01 +00:00
stdenv.mkDerivation {
2019-08-13 23:46:49 +00:00
pname = "symbiyosys";
2020-02-08 15:31:47 +00:00
version = "2020.02.08";
src = fetchFromGitHub {
2020-02-08 15:31:47 +00:00
owner = "YosysHQ";
repo = "SymbiYosys";
rev = "500b526131f434b9679732fc89515dbed67c8d7d";
sha256 = "1pwbirszc80r288x81nx032snniqgmc80i09bbha2i3zd0c3pj5h";
};
buildInputs = [ python3 yosys ];
propagatedBuildInputs = [ yices ];
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}\"]]"
substituteInPlace $out/share/yosys/python3/sby_core.py \
--replace '"/usr/bin/env", "bash"' '"${bash}/bin/bash"'
'';
meta = {
description = "Tooling for Yosys-based verification flows";
homepage = https://symbiyosys.readthedocs.io/;
license = stdenv.lib.licenses.isc;
2019-08-20 09:43:59 +00:00
maintainers = with stdenv.lib.maintainers; [ thoughtpolice emily ];
platforms = stdenv.lib.platforms.all;
};
}