X-Git-Url: http://git.scottworley.com/nix-pin-deps/blobdiff_plain/07fdf1857a827f51d951444ec7f4fd41dfdaa11e..571797a87ed13e280c797fc2e56bafde69ab4ead:/nix_pin_deps.py?ds=sidebyside diff --git a/nix_pin_deps.py b/nix_pin_deps.py index 30aef6d..297f7c1 100644 --- a/nix_pin_deps.py +++ b/nix_pin_deps.py @@ -1,3 +1,10 @@ +# nix-pin-deps: gc-pin dependencies of a partially-built derivation +# +# This program is free software: you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by the +# Free Software Foundation, version 3. + + from contextlib import contextmanager import json import os @@ -96,6 +103,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()