File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2525 - name : run checks & test import
2626 run : |
2727 cd etc/nix
28+ ./get-latest-pypi-deps-db.sh --in-place
2829 nix --print-build-logs flake check
2930 ./test-import-using-nix.sh alpine
Original file line number Diff line number Diff line change @@ -7,6 +7,16 @@ COMMIT=$(sed '1q;d' <<< "$DATA")
77DATE=$( sed ' 2q;d' <<< " $DATA" )
88SHA256=$( nix-prefetch-url --unpack --type sha256 " https://github.com/$USER_SLASH_REPO /tarball/$COMMIT " | tail -n 1)
99
10+ NIX_REV_ATTR=" pypiDataRev = \" $COMMIT \" ; # $DATE "
11+ NIX_SHA_ATTR=" pypiDataSha256 = \" $SHA256 \" ;"
12+
1013echo " "
11- echo " pypiDataRev = \" $COMMIT \" ; # $DATE "
12- echo " pypiDataSha256 = \" $SHA256 \" ;"
14+ echo $NIX_REV_ATTR
15+ echo $NIX_SHA_ATTR
16+
17+ if [[ " $1 " = " --in-place" ]] ; then
18+ # Replace the values in the flake.
19+ PATTERN=" \s*\n?\s*\" [^\n]+" # <space><newline><space>"content...<newline>
20+ perl -i.bak1 -0777 -pe " s/pypiDataRev =$PATTERN /$NIX_REV_ATTR /" flake.nix
21+ perl -i.bak2 -0777 -pe " s/pypiDataSha256 =$PATTERN /$NIX_SHA_ATTR /" flake.nix
22+ fi
You can’t perform that action at this time.
0 commit comments