query
On this page

writeClosure

pkgs.writeClosure

Docs pulled from | This Revision | about 1 hour ago


See https://nixos.org/manual/nixpkgs/unstable/#trivial-builder-writeClosure


Noogle detected

Implementation

The following is the current implementation of this function.

writeClosure = paths: runCommand "runtime-deps"
    {
      # Get the cleaner exportReferencesGraph interface
      __structuredAttrs = true;
      exportReferencesGraph.graph = paths;
      nativeBuildInputs = [ jq ];
    }
    ''
      jq -r ".graph | map(.path) | sort | .[]" "$NIX_ATTRS_JSON_FILE" > "$out"
    '';