mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-27 09:23:01 +00:00
nim_builder: enable parallel building
This commit is contained in:
parent
1471e0c739
commit
729189eee8
@ -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;
|
||||
|
||||
|
@ -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"
|
||||
|
Loading…
Reference in New Issue
Block a user