Commit 729189ee authored by Emery Hemingway's avatar Emery Hemingway Committed by ehmry
Browse files

nim_builder: enable parallel building

parent 1471e0c7
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -2,10 +2,10 @@

{ strictDeps ? true, depsBuildBuild ? [ ], nativeBuildInputs ? [ ]
, configurePhase ? null, buildPhase ? null, checkPhase ? null
, installPhase ? null, meta ? { }, ... }@attrs:
, installPhase ? null, enableParallelBuilding ? true, meta ? { }, ... }@attrs:

stdenv.mkDerivation (attrs // {
  inherit strictDeps;
  inherit strictDeps enableParallelBuilding;
  depsBuildBuild = [ nim_builder ] ++ depsBuildBuild;
  nativeBuildInputs = [ nim ] ++ nativeBuildInputs;

+2 −2
Original line number Diff line number Diff line
@@ -119,8 +119,8 @@ proc buildPhase*() =
    binDir = getOutputDir("bin") / "bin"
  if bins != @[]:
    for bin in bins:
      cmds.add("nim compile $# --outdir:$# $#" %
          [getenv"nimFlags", binDir, normalizedPath(srcDir / bin)])
      cmds.add("nim compile $# --parallelBuild:$# --outdir:$# $#" %
          [getenv("nimFlags"), getenv("NIX_BUILD_CORES","1"), binDir, normalizedPath(srcDir / bin)])
  if getEnvBool"nimDoc":
    echo "generating documentation"
    let docDir = getOutputDir("doc") / "doc"