Add --no-overlay option

This commit is contained in:
Michal Sojka 2024-09-21 23:58:54 +02:00
parent 3315d0cd36
commit 38d2f17d89
2 changed files with 12 additions and 3 deletions

View file

@ -103,8 +103,8 @@ usage: ros2nix [-h]
[--extra-propagated-build-inputs DEP1,DEP2,...]
[--extra-check-inputs DEP1,DEP2,...]
[--extra-native-build-inputs DEP1,DEP2,...] [--flake]
[--nixfmt] [--compare] [--copyright-holder COPYRIGHT_HOLDER]
[--license LICENSE]
[--overlay | --no-overlay] [--nixfmt] [--compare]
[--copyright-holder COPYRIGHT_HOLDER] [--license LICENSE]
package.xml [package.xml ...]
positional arguments:
@ -159,6 +159,8 @@ options:
--flake Generate top-level flake.nix instead of default.nix.
Use with --fetch if some package.xml files are outside
of the flake repo (default: False)
--overlay, --no-overlay
Generate overlay.nix (default: True)
--nixfmt Format the resulting expressions with nixfmt (default:
False)
--compare Don't write any file, but check whether writing the

View file

@ -255,6 +255,12 @@ def ros2nix(args):
help="Generate top-level flake.nix instead of default.nix. "
"Use with --fetch if some package.xml files are outside of the flake repo",
)
parser.add_argument(
"--overlay",
action=argparse.BooleanOptionalAction,
default=True,
help="Generate overlay.nix",
)
parser.add_argument(
"--nixfmt",
action="store_true",
@ -431,6 +437,7 @@ def ros2nix(args):
err("Failed to write derivation to disk!")
raise e
if args.overlay:
generate_overlay(expressions, args)
if args.flake: