File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -401,6 +401,23 @@ deep-clean: clean git-clean
401401tidy :
402402 go mod tidy
403403
404+ # Temporarily redirect the well-known `vendor` target to `vendor-hash`.
405+ # This target will be removed in the future.
406+ vendor : vendor-hash
407+
408+ # https://gitlab.com/peerdb/peerdb/-/blob/d1dbd0c6533dca16bf57322b57cc8fb6ab897a66/nix-update.sh
409+ # After stopping vendoring https://github.com/status-im/status-go/pull/6951,
410+ # we have to manually update `vendorHash` in the nix derivation.
411+ # This target runs the nix build, extracts the expected vendorHash and updates with it the nix derivation.
412+ vendor-hash :
413+ @echo " $( GREEN) Running nix build...$( RESET) " ; \
414+ NIX_OUTPUT=" $$ (nix build --extra-experimental-features 'nix-command flakes' '.?submodules=1#status-go-library' 2>&1)" ; \
415+ CURRENT_VENDOR_HASH=" $$ (echo $$ {NIX_OUTPUT} | sed -n 's/.*specified:[[:space:]]*\(sha256-[A-Za-z0-9+/=]*\).*/\1/p' | head -1)" ; \
416+ NEW_VENDOR_HASH=" $$ (echo $$ {NIX_OUTPUT} | sed -n 's/.*got:[[:space:]]*\(sha256-[A-Za-z0-9+/=]*\).*/\1/p' | head -1)" ; \
417+ sed -i ' ' " s|vendorHash = \" $$ {CURRENT_VENDOR_HASH}\" ;|vendorHash = \" $$ {NEW_VENDOR_HASH}\" ;|g" ./nix/pkgs/status-go/library/default.nix; \
418+ echo " Replaced vendorHash $$ {CURRENT_VENDOR_HASH} with $$ {NEW_VENDOR_HASH}"
419+
420+
404421migration : DEFAULT_MIGRATION_PATH := appdatabase/migrations/sql
405422migration :
406423 touch $(DEFAULT_MIGRATION_PATH ) /$$(date '+%s' ) _$(D ) .up.sql
You can’t perform that action at this time.
0 commit comments