forked from mirrors/nixpkgs
Merge pull request #38826 from vbgl/darwin-yosys
yosys: fix build on darwin
This commit is contained in:
commit
6f416dc5d3
|
@ -32,6 +32,6 @@ stdenv.mkDerivation rec {
|
|||
homepage = https://symbiyosys.readthedocs.io/;
|
||||
license = stdenv.lib.licenses.mit;
|
||||
maintainers = with stdenv.lib.maintainers; [ thoughtpolice ];
|
||||
platforms = stdenv.lib.platforms.linux;
|
||||
platforms = stdenv.lib.platforms.unix;
|
||||
};
|
||||
}
|
||||
|
|
|
@ -35,14 +35,18 @@ stdenv.mkDerivation rec {
|
|||
buildInputs = [ tcl readline libffi python3 bison flex ];
|
||||
|
||||
patchPhase = ''
|
||||
substituteInPlace ../yosys-abc/Makefile \
|
||||
--replace 'CC := gcc' ""
|
||||
substituteInPlace ./Makefile \
|
||||
--replace 'CXX = clang' "" \
|
||||
--replace 'ABCMKARGS = CC="$(CXX)"' 'ABCMKARGS =' \
|
||||
--replace 'echo UNKNOWN' 'echo ${substring 0 10 (elemAt srcs 0).rev}'
|
||||
'';
|
||||
|
||||
preBuild = ''
|
||||
chmod -R u+w ../yosys-abc
|
||||
ln -s ../yosys-abc abc
|
||||
make config-gcc
|
||||
make config-${if stdenv.cc.isClang or false then "clang" else "gcc"}
|
||||
echo 'ABCREV := default' >> Makefile.conf
|
||||
makeFlags="PREFIX=$out $makeFlags"
|
||||
'';
|
||||
|
@ -61,6 +65,6 @@ stdenv.mkDerivation rec {
|
|||
homepage = http://www.clifford.at/yosys/;
|
||||
license = stdenv.lib.licenses.isc;
|
||||
maintainers = with stdenv.lib.maintainers; [ shell thoughtpolice ];
|
||||
platforms = stdenv.lib.platforms.linux;
|
||||
platforms = stdenv.lib.platforms.unix;
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue