about summary refs log blame commit diff
path: root/tests/export-graph.nix
blob: b7afa2a85b9b9ff97b0079a2e36852c52fe074fb (plain) (tree)
1
2
3
4
5
6





                                                           















                                                                             
with import ./config.nix;

rec {

  buildGraphBuilder = builtins.toFile "build-graph-builder"
    ''
      while read path; do
          read drv
          read nrRefs
          echo "$path has $nrRefs references"
          echo -n "$path" >> $out
          for ((n = 0; n < $nrRefs; n++)); do read ref; echo "ref $ref"; done
      done < refs
    '';

  buildGraph = mkDerivation {
    name = "dependencies";
    builder = buildGraphBuilder;
    exportReferencesGraph = ["refs" (import ./dependencies.nix)];
  };

}