SimpleX-Chat/scripts/nix/update-sha256.awk
Evgeny Poberezkin b33fe01e49
core: switch to GHC 9.6.3 (#3307)
* Various fixes aggregated
- windows definisions
- set compile rto 9.6.3
- flake adjust to 9.6.3
- update haskellNix
- add various patches

* Unbreak iOS

* update script and sha256map.nix

* ios: update core lib

---------

Co-authored-by: Moritz Angermann <moritz.angermann@gmail.com>
2023-11-06 11:43:43 +00:00

23 lines
481 B
Awk

BEGIN {
print "{"
loc=""
ref=""
isGit=false
}
/source-repository-package/ { loc=""; ref=""; isGit=false; }
/type: git/ { isGit=true; }
/location/ && isGit == true { loc=$2 }
/tag/ && isGit == true { ref=$2 }
isGit == true && loc != "" && ref != "" {
cmd = "nix-prefetch-git --fetch-submodules --quiet "loc" "ref" | jq -r .sha256"
cmd | getline sha256
close(cmd)
print " \""loc"\".\""ref"\" = \""sha256"\";";
isGit=false; loc=""; ref="";
}
END {
print "}"
}