Unverified Commit 780b40ee authored by Gergő Gutyina's avatar Gergő Gutyina Committed by GitHub
Browse files

iortcw: set pname and version, fix build (#493330)

parents 5de9eca8 1bcb441b
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -11,7 +11,8 @@ let
  });
in
buildEnv {
  name = "iortcw";
  inherit (sp) version;
  pname = "iortcw";

  paths = [
    sp
+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";