diff --git a/README.md b/README.md index 3ae1955..7d7cd28 100644 --- a/README.md +++ b/README.md @@ -82,7 +82,7 @@ The _snack_ executable is now in your `PATH`: ``` shell $ snack --help Usage: [-l|--lib DIR] ([-s|--snack-nix PATH] | [--no-snack-nix]) - [-j|--cores INT] [-p|--package-file PATH] (COMMAND | + [-j|--jobs INT] [-p|--package-file PATH] (COMMAND | COMMAND) Available options: @@ -94,7 +94,7 @@ Available options: (Use --no-snack-nix to disable this behavior) --no-snack-nix Don't use ./snack.nix as the environment (snack.nix) file. - -j,--cores INT How many cores to use during the build + -j,--jobs INT How many jobs to run concurrently -p,--package-file PATH Specifies a YAML or Nix file to use as package description. If not provided, snack looks for either 'package.yaml' or 'package.nix' in the current diff --git a/bin/Snack.hs b/bin/Snack.hs index 3fe76b2..eedaec5 100644 --- a/bin/Snack.hs +++ b/bin/Snack.hs @@ -171,17 +171,17 @@ discoverPackageFile = do -- | How to call @nix-build@ newtype NixConfig = NixConfig - { nixNCores :: Int } + { nixNJobs :: Int } parseNixConfig :: Opts.Parser NixConfig parseNixConfig = (NixConfig <$> Opts.option Opts.auto - (Opts.long "cores" + (Opts.long "jobs" <> Opts.short 'j' <> Opts.value 1 <> Opts.metavar "INT" - <> Opts.help "How many cores to use during the build") + <> Opts.help "How many jobs to run concurrently") ) --- Snack configuration (unrelated to packages) @@ -390,8 +390,8 @@ nixBuild snackCfg extraNixArgs nixExpr = cliArgs = [ "-" -- read expression from stdin , "--no-out-link" -- no need for roots - -- how many cores to use (-j) - , "--cores", T.pack (show (nixNCores nixCfg)) + -- how many jobs to run concurrently (-j) + , "--max-jobs", T.pack (show (nixNJobs nixCfg)) ] <> (concatMap toCliArgs nixArgs) funArgs :: [String] funArgs = toFunArg <$> nixArgs