]> git.scottworley.com Git - nix-pin-deps/commitdiff
__main__ thing
authorScott Worley <scottworley@scottworley.com>
Fri, 20 May 2022 07:31:00 +0000 (00:31 -0700)
committerScott Worley <scottworley@scottworley.com>
Fri, 20 May 2022 07:31:00 +0000 (00:31 -0700)
nix_pin_deps.py

index 30aef6d144d4b73d074658768e094579f23916fa..6f12df84ca468d63551afb6e8b8c7f85083a88c3 100644 (file)
@@ -96,6 +96,11 @@ def pinBuiltThings(thing: str,
         pinBuiltThings(dep, done, deps)
 
 
         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()