mirror of
https://github.com/wentasah/ros2nix.git
synced 2025-06-09 15:52:23 +03:00
Add --default and --no-default option
This commit is contained in:
parent
38d2f17d89
commit
c6b1a2c507
2 changed files with 12 additions and 3 deletions
|
@ -103,8 +103,9 @@ usage: ros2nix [-h]
|
|||
[--extra-propagated-build-inputs DEP1,DEP2,...]
|
||||
[--extra-check-inputs DEP1,DEP2,...]
|
||||
[--extra-native-build-inputs DEP1,DEP2,...] [--flake]
|
||||
[--overlay | --no-overlay] [--nixfmt] [--compare]
|
||||
[--copyright-holder COPYRIGHT_HOLDER] [--license LICENSE]
|
||||
[--default | --no-default] [--overlay | --no-overlay]
|
||||
[--nixfmt] [--compare] [--copyright-holder COPYRIGHT_HOLDER]
|
||||
[--license LICENSE]
|
||||
package.xml [package.xml ...]
|
||||
|
||||
positional arguments:
|
||||
|
@ -159,6 +160,9 @@ 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)
|
||||
--default, --no-default
|
||||
Enforce/suppress generation of default.nix (default:
|
||||
None)
|
||||
--overlay, --no-overlay
|
||||
Generate overlay.nix (default: True)
|
||||
--nixfmt Format the resulting expressions with nixfmt (default:
|
||||
|
|
|
@ -255,6 +255,11 @@ 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(
|
||||
"--default",
|
||||
action=argparse.BooleanOptionalAction,
|
||||
help="Enforce/suppress generation of default.nix",
|
||||
)
|
||||
parser.add_argument(
|
||||
"--overlay",
|
||||
action=argparse.BooleanOptionalAction,
|
||||
|
@ -442,7 +447,7 @@ def ros2nix(args):
|
|||
|
||||
if args.flake:
|
||||
generate_flake(args)
|
||||
else:
|
||||
if args.default or (args.default is None and not args.flake):
|
||||
generate_default(args)
|
||||
# TODO generate also release.nix (for testing/CI)?
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue