yosys: cherry-pick some minor fixes (cf d81e4d9f6
)
d81e4d9f66
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 <aseipp@pobox.com>
This commit is contained in:
parent
ec1830e696
commit
365ef90263
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user