on iko/ghcjs-patch-master help sign in
Expose the plan.json file as `plan-nix.json` (#935)

Make the plan.json file available in case we need to debug plan-to-nix

commite4be77ee938d8903fe0c10d150f121ec62e50f8c authorHamish Mackenzie <Hamish.Mackenzie@iohk.io> dateMon 23 Nov 2020, 18:00 (6 years ago) parentc6f83ce
1 file changed+4
lib/call-cabal-project-to-nix.nix+4
lib/call-cabal-project-to-nix.nix+4
@@ -383,6 +383,7 @@ let
383383 LANG = "en_US.UTF-8";
384384 meta.platforms = pkgs.lib.platforms.all;
385385 preferLocalBuild = false;
386+ outputs = ["out" "json"];
386387 } ''
387388 tmp=$(mktemp -d)
388389 cd $tmp
@@ -471,6 +472,9 @@ let
471472 # proper relative paths.
472473 (cd $out${subDir'} && plan-to-nix --full --plan-json $tmp${subDir'}/dist-newstyle/cache/plan.json -o .)
473474
475+ # Make the plan.json file available in case we need to debug plan-to-nix
476+ cp $tmp${subDir'}/dist-newstyle/cache/plan.json $json
477+
474478 # Remove the non nix files ".project" ".cabal" "package.yaml" files
475479 # as they should not be in the output hash (they may change slightly
476480 # without affecting the nix).