From 365ef90263f991f329fdfc599d33e1f0b2cf8c99 Mon Sep 17 00:00:00 2001 From: Austin Seipp Date: Fri, 15 Jan 2021 10:26:16 -0600 Subject: [PATCH] yosys: cherry-pick some minor fixes (cf d81e4d9f6) d81e4d9f66e0d1a1a6d contained some minor fixes to the yosys derivation that make it a little easier to read and maintain. Incorporate those. Signed-off-by: Austin Seipp --- pkgs/development/compilers/yosys/default.nix | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/pkgs/development/compilers/yosys/default.nix b/pkgs/development/compilers/yosys/default.nix index 3c292deabc61..9e1576434f5b 100644 --- a/pkgs/development/compilers/yosys/default.nix +++ b/pkgs/development/compilers/yosys/default.nix @@ -5,7 +5,7 @@ , fetchFromGitHub , flex , libffi -, pkgconfig +, pkg-config , protobuf , python3 , readline @@ -43,7 +43,7 @@ stdenv.mkDerivation rec { }; enableParallelBuilding = true; - nativeBuildInputs = [ pkgconfig ]; + nativeBuildInputs = [ pkg-config ]; buildInputs = [ tcl readline libffi python3 bison flex protobuf zlib ]; makeFlags = [ "ENABLE_PROTOBUF=1" "PREFIX=${placeholder "out"}"]; @@ -51,15 +51,10 @@ stdenv.mkDerivation rec { patchPhase = '' patch -p1 < ${./plugin-search-dirs.patch} 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}' - substituteInPlace ./misc/yosys-config.in \ - --replace '/bin/bash' '${bash}/bin/bash' - patchShebangs tests + + chmod +x ./misc/yosys-config.in + patchShebangs tests ./misc/yosys-config.in ''; preBuild = let @@ -77,7 +72,7 @@ stdenv.mkDerivation rec { exit 1 fi - if ! grep -q "YOSYS_VER := ${version}" Makefile; then + 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