Revert "Merge pull request #105709 from CajuM/symbiflow"

This reverts commit 02828f91f1, reversing
changes made to f0a7fce6ee.
This commit is contained in:
Austin Seipp
2021-01-15 10:13:27 -06:00
parent f6a9596c4a
commit ca27105b04
14 changed files with 13 additions and 429 deletions
+13 -18
View File
@@ -5,14 +5,13 @@
, fetchFromGitHub
, flex
, libffi
, pkg-config
, pkgconfig
, protobuf
, python3
, readline
, tcl
, verilog
, zlib
, plugins ? []
}:
# NOTE: as of late 2020, yosys has switched to an automation robot that
@@ -33,8 +32,6 @@
# ultimately less confusing than using dates.
stdenv.mkDerivation rec {
inherit plugins;
pname = "yosys";
version = "0.9+3830";
@@ -46,16 +43,21 @@ stdenv.mkDerivation rec {
};
enableParallelBuilding = true;
nativeBuildInputs = [ pkg-config protobuf flex bison python3 ];
buildInputs = [ tcl readline libffi python3 protobuf zlib ];
nativeBuildInputs = [ pkgconfig ];
buildInputs = [ tcl readline libffi python3 bison flex protobuf zlib ];
makeFlags = [ "ENABLE_PROTOBUF=1" "PREFIX=${placeholder "out"}"];
patchPhase = ''
substituteInPlace ./Makefile \
--replace 'CXX = clang' "" \
--replace 'LD = clang++' 'LD = $(CXX)' \
--replace 'CXX = gcc' "" \
--replace 'LD = gcc' 'LD = $(CXX)' \
--replace 'ABCMKARGS = CC="$(CXX)" CXX="$(CXX)"' 'ABCMKARGS =' \
--replace 'echo UNKNOWN' 'echo ${builtins.substring 0 10 src.rev}'
chmod +x ./misc/yosys-config.in
patchShebangs ./misc/yosys-config.in
substituteInPlace ./misc/yosys-config.in \
--replace '/bin/bash' '${bash}/bin/bash'
patchShebangs tests
'';
@@ -74,8 +76,8 @@ stdenv.mkDerivation rec {
exit 1
fi
if ! grep -q "YOSYS_VER := $version" Makefile; then
echo "ERROR: yosys version in Makefile isn't equivalent to version of the nix package ($version), failing."
if ! grep -q "YOSYS_VER := ${version}" Makefile; then
echo "ERROR: yosys version in Makefile isn't equivalent to version of the nix package (${version}), failing."
exit 1
fi
'';
@@ -92,14 +94,7 @@ stdenv.mkDerivation rec {
# add a symlink to fake things so that both variants work the same way. this
# is also needed at build time for the test suite.
postBuild = "ln -sfv ${abc-verifier}/bin/abc ./yosys-abc";
postInstall = ''
ln -sfv ${abc-verifier}/bin/abc $out/bin/yosys-abc
mkdir -p $out/share/yosys/plugins
for plugin in $plugins; do
ln -sfv $plugin/share/yosys/plugins/* $out/share/yosys/plugins/
done
'';
postInstall = "ln -sfv ${abc-verifier}/bin/abc $out/bin/yosys-abc";
meta = with stdenv.lib; {
description = "Open RTL synthesis framework and tools";