@@ -43,19 +43,19 @@ def get_parser() -> tuple[argparse.ArgumentParser, dict[str, argparse.ArgumentPa
4343 common_build_flags .add_argument ("--print-build-logs" , "-L" , action = "store_true" )
4444 common_build_flags .add_argument ("--show-trace" , action = "store_true" )
4545
46- flake_build_flags = argparse .ArgumentParser (add_help = False )
47- flake_build_flags .add_argument ("--accept-flake-config" , action = "store_true" )
48- flake_build_flags .add_argument ("--refresh" , action = "store_true" )
49- flake_build_flags .add_argument ("--impure" , action = "store_true" )
50- flake_build_flags .add_argument ("--offline" , action = "store_true" )
51- flake_build_flags .add_argument ("--no-net" , action = "store_true" )
52- flake_build_flags .add_argument ("--recreate-lock-file" , action = "store_true" )
53- flake_build_flags .add_argument ("--no-update-lock-file" , action = "store_true" )
54- flake_build_flags .add_argument ("--no-write-lock-file" , action = "store_true" )
55- flake_build_flags .add_argument ("--no-registries" , action = "store_true" )
56- flake_build_flags .add_argument ("--commit-lock-file" , action = "store_true" )
57- flake_build_flags .add_argument ("--update-input" )
58- flake_build_flags .add_argument ("--override-input" , nargs = 2 )
46+ flake_common_flags = argparse .ArgumentParser (add_help = False )
47+ flake_common_flags .add_argument ("--accept-flake-config" , action = "store_true" )
48+ flake_common_flags .add_argument ("--refresh" , action = "store_true" )
49+ flake_common_flags .add_argument ("--impure" , action = "store_true" )
50+ flake_common_flags .add_argument ("--offline" , action = "store_true" )
51+ flake_common_flags .add_argument ("--no-net" , action = "store_true" )
52+ flake_common_flags .add_argument ("--recreate-lock-file" , action = "store_true" )
53+ flake_common_flags .add_argument ("--no-update-lock-file" , action = "store_true" )
54+ flake_common_flags .add_argument ("--no-write-lock-file" , action = "store_true" )
55+ flake_common_flags .add_argument ("--no-registries" , action = "store_true" )
56+ flake_common_flags .add_argument ("--commit-lock-file" , action = "store_true" )
57+ flake_common_flags .add_argument ("--update-input" )
58+ flake_common_flags .add_argument ("--override-input" , nargs = 2 )
5959
6060 classic_build_flags = argparse .ArgumentParser (add_help = False )
6161 classic_build_flags .add_argument ("--no-build-output" , "-Q" , action = "store_true" )
@@ -74,7 +74,7 @@ def get_parser() -> tuple[argparse.ArgumentParser, dict[str, argparse.ArgumentPa
7474 sub_parsers = {
7575 "common_flags" : common_flags ,
7676 "common_build_flags" : common_build_flags ,
77- "flake_build_flags " : flake_build_flags ,
77+ "flake_common_flags " : flake_common_flags ,
7878 "classic_build_flags" : classic_build_flags ,
7979 "copy_flags" : copy_flags ,
8080 }
@@ -327,7 +327,8 @@ def execute(argv: list[str]) -> None:
327327 common_flags = vars (args_groups ["common_flags" ])
328328 common_build_flags = common_flags | vars (args_groups ["common_build_flags" ])
329329 build_flags = common_build_flags | vars (args_groups ["classic_build_flags" ])
330- flake_build_flags = common_build_flags | vars (args_groups ["flake_build_flags" ])
330+ flake_common_flags = common_flags | vars (args_groups ["flake_common_flags" ])
331+ flake_build_flags = common_build_flags | flake_common_flags
331332 copy_flags = common_flags | vars (args_groups ["copy_flags" ])
332333
333334 if args .upgrade or args .upgrade_all :
@@ -410,9 +411,9 @@ def execute(argv: list[str]) -> None:
410411 attr ,
411412 flake ,
412413 build_host ,
414+ eval_flags = flake_common_flags ,
413415 flake_build_flags = flake_build_flags ,
414416 copy_flags = copy_flags ,
415- build_flags = build_flags ,
416417 )
417418 case (_, False , None , Flake (_)):
418419 path_to_config = nix .build_flake (
0 commit comments