@@ -1,4 +1,4 @@
1−{ stdenv
1+{ stdenv, lib
22, abc-verifier
33, bash
44, bison
@@ -43,13 +43,16 @@ stdenv.mkDerivation rec {
4343 };
4444
4545 enableParallelBuilding = true;
46− nativeBuildInputs = [ pkg-config ];
47− buildInputs = [ tcl readline libffi python3 bison flex protobuf zlib ];
46+ nativeBuildInputs = [ pkg-config bison flex ];
47+ buildInputs = [ tcl readline libffi python3 protobuf zlib ];
4848
4949 makeFlags = [ "ENABLE_PROTOBUF=1" "PREFIX=${placeholder "out"}"];
5050
51− patchPhase = ''
52− patch -p1 < ${./plugin-search-dirs.patch}
51+ patches = [
52+ ./plugin-search-dirs.patch
53+ ];
54+
55+ postPatch = ''
5356 substituteInPlace ./Makefile \
5457 --replace 'echo UNKNOWN' 'echo ${builtins.substring 0 10 src.rev}'
5558
@@ -94,7 +97,7 @@ stdenv.mkDerivation rec {
9497
9598 setupHook = ./setup-hook.sh;
9699
97− meta = with stdenv.lib; {
100+ meta = with lib; {
98101 description = "Open RTL synthesis framework and tools";
99102 homepage = "http://www.clifford.at/yosys/";
100103 license = licenses.isc;