mirror of
https://github.com/wentasah/ros2nix.git
synced 2025-06-09 15:52:23 +03:00
Start generated Nix expressions with a comment about automatic generation
This commit is contained in:
parent
ca4c0e6bfc
commit
6ba6c8a2c2
1 changed files with 11 additions and 1 deletions
|
@ -17,6 +17,7 @@ import json
|
|||
import os
|
||||
import re
|
||||
import subprocess
|
||||
import sys
|
||||
|
||||
|
||||
def resolve_dependencies(deps: Iterable[str]) -> Set[str]:
|
||||
|
@ -336,7 +337,16 @@ def ros2nix(args):
|
|||
raise e
|
||||
|
||||
try:
|
||||
derivation_text = derivation.get_text(args.copyright_holder, args.license)
|
||||
our_cmd_line = " ".join(
|
||||
[os.path.basename(sys.argv[0])]
|
||||
+ [
|
||||
arg
|
||||
for arg in sys.argv[1:]
|
||||
if not (arg.endswith("package.xml") and os.path.isfile(arg))
|
||||
]
|
||||
)
|
||||
derivation_text = f"# Automatically generated by: {our_cmd_line}\n"
|
||||
derivation_text += derivation.get_text(args.copyright_holder, args.license)
|
||||
except UnresolvedDependency as e:
|
||||
err(f"Failed to resolve required dependencies for package {pkg}!")
|
||||
raise e
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue