From: Scott Worley Date: Fri, 20 May 2022 07:31:00 +0000 (-0700) Subject: __main__ thing X-Git-Tag: v1.0.0~2 X-Git-Url: http://git.scottworley.com/nix-pin-deps/commitdiff_plain/107c5850403d88393a819538426fe9594f5746ec?ds=sidebyside __main__ thing --- diff --git a/nix_pin_deps.py b/nix_pin_deps.py index 30aef6d..6f12df8 100644 --- a/nix_pin_deps.py +++ b/nix_pin_deps.py @@ -96,6 +96,11 @@ def pinBuiltThings(thing: str, pinBuiltThings(dep, done, deps) -dep_graph = getDeps(sys.argv[1]) -for root in dep_graph.roots: - pinBuiltThings(root, set(), dep_graph.deps) +def main() -> None: + dep_graph = getDeps(sys.argv[1]) + for root in dep_graph.roots: + pinBuiltThings(root, set(), dep_graph.deps) + + +if __name__ == '__main__': + main()