diff --git a/pkgs/applications/science/logic/symbiyosys/default.nix b/pkgs/applications/science/logic/symbiyosys/default.nix new file mode 100644 index 000000000000..5da3e7c31b4a --- /dev/null +++ b/pkgs/applications/science/logic/symbiyosys/default.nix @@ -0,0 +1,37 @@ +{ stdenv, fetchFromGitHub, yosys, python3 }: + +stdenv.mkDerivation rec { + name = "symbiyosys-${version}"; + version = "2017.10.16"; + + src = fetchFromGitHub { + owner = "cliffordwolf"; + repo = "symbiyosys"; + rev = "f403b99fae053baab651e3ec8345a68cb3ba6a96"; + sha256 = "0jzzlybxaqmhrasfjv3q3skshalr7lvv4p142qgdqz1ig36znbi8"; + }; + + 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; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 8d70d61113b7..1afc58c6a21f 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -18684,6 +18684,8 @@ with pkgs; boolector = callPackage ../applications/science/logic/boolector {}; + symbiyosys = callPackage ../applications/science/logic/symbiyosys {}; + ### SCIENCE / ELECTRONICS adms = callPackage ../applications/science/electronics/adms { };