mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-26 07:31:20 +00:00
nix-prefetch-scripts: make nix-prefetch-git report fetchSubmodules in its JSON output
Previously, nix-prefetch-git would report the same JSON whether submodules were being fetched or not; with this change, the --fetch-submodules option will cause the JSON output to include "fetchSubmodules": true, so that fetchgit (builtins.fromJSON (builtins.readFile ./path/to/output.json)) will work.
This commit is contained in:
parent
5bb0aa3bac
commit
be30ba8e0e
|
@ -327,7 +327,12 @@ print_results() {
|
||||||
echo "{"
|
echo "{"
|
||||||
echo " \"url\": \"$url\","
|
echo " \"url\": \"$url\","
|
||||||
echo " \"rev\": \"$fullRev\","
|
echo " \"rev\": \"$fullRev\","
|
||||||
echo " \"$hashType\": \"$hash\""
|
echo -n " \"$hashType\": \"$hash\""
|
||||||
|
if test -n "$fetchSubmodules"; then
|
||||||
|
echo ","
|
||||||
|
echo -n " \"fetchSubmodules\": true"
|
||||||
|
fi
|
||||||
|
echo ""
|
||||||
echo "}"
|
echo "}"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue