yosys: 0.37 -> 0.38

Also fix test issues on macOS.
This commit is contained in:
Thomas Watson 2024-02-10 15:59:32 -06:00
parent 87b1a9fcae
commit 65b289f68a

View file

@ -77,13 +77,13 @@ let
in stdenv.mkDerivation (finalAttrs: {
pname = "yosys";
version = "0.37";
version = "0.38";
src = fetchFromGitHub {
owner = "YosysHQ";
repo = "yosys";
rev = "refs/tags/${finalAttrs.pname}-${finalAttrs.version}";
hash = "sha256-JRztXMZMBFhdZMeVHkRxFulRrFzyuNaLzcRlmgAz6Gc=";
hash = "sha256-mzMBhnIEgToez6mGFOvO7zBA+rNivZ9OnLQsjBBDamA=";
};
enableParallelBuilding = true;
@ -107,7 +107,11 @@ in stdenv.mkDerivation (finalAttrs: {
postPatch = ''
substituteInPlace ./Makefile \
--replace 'echo UNKNOWN' 'echo ${builtins.substring 0 10 finalAttrs.src.rev}'
--replace-fail 'echo UNKNOWN' 'echo ${builtins.substring 0 10 finalAttrs.src.rev}'
# https://github.com/YosysHQ/yosys/pull/4199
substituteInPlace ./tests/various/clk2fflogic_effects.sh \
--replace-fail 'tail +3' 'tail -n +3'
chmod +x ./misc/yosys-config.in
patchShebangs tests ./misc/yosys-config.in
@ -135,6 +139,13 @@ in stdenv.mkDerivation (finalAttrs: {
echo "BOOST_PYTHON_LIB := -lboost_python${lib.versions.major python3.version}${lib.versions.minor python3.version}" >> Makefile.conf
'';
preCheck = ''
# autotest.sh automatically compiles a utility during startup if it's out of date.
# having N check jobs race to do that creates spurious codesigning failures on macOS.
# run it once without asking it to do anything so that compilation is done before the jobs start.
tests/tools/autotest.sh
'';
checkTarget = "test";
doCheck = true;
nativeCheckInputs = [ verilog ];