Deployment and lifecycle management for Nix
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

cli: separate eval and build jobs options

+12 -7
+10 -3
apps/sower_cli/lib/sower_cli.ex
··· 107 107 help: "Cache destination (e.g., 'attic://server:cache', 'ssh://host')", 108 108 required: false 109 109 ], 110 - jobs: [ 110 + eval_jobs: [ 111 + long: "--eval-jobs", 112 + value_name: "N", 113 + help: "Number of parallel eval workers", 114 + parser: :integer, 115 + default: 4 116 + ], 117 + build_jobs: [ 111 118 short: "-j", 112 - long: "--jobs", 119 + long: "--build-jobs", 113 120 value_name: "N", 114 - help: "Number of parallel workers", 121 + help: "Number of parallel build workers", 115 122 parser: :integer, 116 123 default: 4 117 124 ],
+2 -4
apps/sower_cli/lib/sower_cli/build.ex
··· 88 88 Application.ensure_all_started([:erlexec]) 89 89 90 90 opts = [ 91 - workers: state.options.jobs, 91 + workers: state.options.eval_jobs, 92 92 type: state.options.eval_type, 93 93 use_eval_cache: state.flags.use_eval_cache, 94 94 memory_limit_kb: state.options.memory_limit * 1_000 ··· 120 120 defp run_steps([:build | rest], %__MODULE__{} = state) do 121 121 Output.step("Building #{length(state.evals)} derivation(s)") 122 122 123 - workers = state.options.jobs || 4 124 - 125 - case Nix.Build.Jobs.run(state.evals, max_workers: workers) do 123 + case Nix.Build.Jobs.run(state.evals, max_workers: state.options.build_jobs) do 126 124 {:ok, result} -> 127 125 builds = Output.build_summary(result) 128 126 run_steps(rest, %{state | builds: builds})