X-Git-Url: http://git.scottworley.com/nix-pin-deps/blobdiff_plain/107c5850403d88393a819538426fe9594f5746ec..ce81dce7f182bd1a4d0910d6c0915d93f9675188:/nix_pin_deps.py?ds=sidebyside diff --git a/nix_pin_deps.py b/nix_pin_deps.py index 6f12df8..0b83d5c 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 @@ -52,7 +59,7 @@ def getDrvInfo(drv: str) -> Any: with log(f"Loading {drv}..."): with subprocess.Popen( ["nix", "--experimental-features", "nix-command", - "show-derivation", "/nix/store/" + drv], + "derivation", "show", f"/nix/store/{drv}^*"], stdout=subprocess.PIPE) as process: assert process.stdout info = json.load(process.stdout)