Unverified Commit 25cda140 authored by Ryan Lahfa's avatar Ryan Lahfa Committed by GitHub
Browse files

Merge pull request #287887 from tpwrules/yosys-update

yosys: 0.37 -> 0.38
parents d2dff347 65b289f6
Loading
Loading
Loading
Loading
+14 −3
Original line number Diff line number Diff line
@@ -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 ];