]> git.scottworley.com Git - nix-pin-deps/blobdiff - nix_pin_deps.py
__main__ thing
[nix-pin-deps] / nix_pin_deps.py
index 30aef6d144d4b73d074658768e094579f23916fa..6f12df84ca468d63551afb6e8b8c7f85083a88c3 100644 (file)
@@ -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()