From 4e42fb581e67693ceb9f935f8e918c9b910ac98e Mon Sep 17 00:00:00 2001 From: Ben Sima Date: Thu, 28 Mar 2024 21:56:18 -0400 Subject: Add --jobs and --cpus to bild By default, nix will use the maximum amount of cores available to the machine. On my machine it was maxxing out the CPUs and then actually running out of RAM when compiling JavaScriptCore and literally shutting down my machine. So, I need to be able to control the concurrency and parallelism. The default settings I chose should reserve 4 cores for the user. I also changed --json to --plan because -j makes more sense for --jobs, as its used this way in other tools like make and nix-build. --- Biz/Cli.hs | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'Biz/Cli.hs') diff --git a/Biz/Cli.hs b/Biz/Cli.hs index 819fdf1..b3c7583 100644 --- a/Biz/Cli.hs +++ b/Biz/Cli.hs @@ -10,7 +10,7 @@ module Biz.Cli Docopt.docopt, Docopt.getAllArgs, Docopt.getArg, - getArgWithDefault, + Docopt.getArgWithDefault, Docopt.longOption, Docopt.shortOption, Docopt.command, @@ -44,8 +44,3 @@ main Plan {..} = has :: Docopt.Arguments -> Docopt.Option -> Bool has = Docopt.isPresent - --- | This ignores the second argument because the default should come from the --- USAGE text with [default: x]. -getArgWithDefault :: Docopt.Arguments -> Docopt.Option -> String -getArgWithDefault args = Docopt.getArgWithDefault args "" -- cgit v1.2.3