Unverified Commit 1bcb441b authored by Hythera's avatar Hythera
Browse files

iortcw: fix build

parent 2ca0360e
Loading
Loading
Loading
Loading
+9 −2
Original line number Diff line number Diff line
@@ -19,10 +19,17 @@ stdenv.mkDerivation (finalAttrs: {
  src = fetchFromGitHub {
    owner = "iortcw";
    repo = "iortcw";
    rev = finalAttrs.version;
    sha256 = "0g5wgqb1gm34pd05dj2i8nj3qhsz0831p3m7bsgxpjcg9c00jpyw";
    tag = finalAttrs.version;
    hash = "sha256-3F8JAEuPydufXqeOGwYCX0M8pEVRyFZAu2TUFxZ+vDw=";
  };

  # Constexpr is a reserved keyword since C++11 that can't be overwritten. Replacing constexpr with
  # const_expr is necessary in this case for the build to function.
  postPatch = ''
    substituteInPlace code/tools/lcc/src/{c.h,init.c,simp.c,stmt.c} \
      --replace-fail 'constexpr' 'const_expr'
  '';

  enableParallelBuilding = true;

  sourceRoot = "${finalAttrs.src.name}/SP";