diff --git a/Makefile b/Makefile index 4609b5648337..ae4cacbcc88c 100755 --- a/Makefile +++ b/Makefile @@ -53,32 +53,6 @@ LIBP2P_HELPER_SIG := $(shell cd src/app/libp2p_helper ; find . -type f -print0 help: ## Display this help information @grep -E '^[a-zA-Z0-9_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' - -######################################## -.PHONY: add-o1labs-opam-repo -add-o1labs-opam-repo: - opam repository add --yes --all --set-default o1-labs https://github.com/o1-labs/opam-repository.git - -.PHONY: prepare -prepare: add-o1labs-opam-repo - @echo "Preparing the environment and installing dependencies..." - @# Check Go installation and version - @command -v go >/dev/null 2>&1 || { echo >&2 "Error: Go is not installed. Please install Go before continuing. You can use gvm to install the appropriate Go environment."; exit 1; } - @GO_VERSION=$$(go version | awk '{print $$3}' | sed 's/go//'); \ - GO_MOD_PATH="src/app/libp2p_helper/src/go.mod"; \ - REQUIRED_GO_VERSION=$$(grep -E "^go [0-9]+\.[0-9]" $$GO_MOD_PATH | awk '{print $$2}'); \ - if ! printf '%s\n%s\n' "$$REQUIRED_GO_VERSION" "$$GO_VERSION" | sort -V | head -n1 | grep -q "^$$REQUIRED_GO_VERSION$$"; then \ - echo "Error: Go version $$GO_VERSION is not compatible. Required version is $$REQUIRED_GO_VERSION or newer (only minor)."; \ - exit 1; \ - fi; \ - echo "Go version $$GO_VERSION detected (requirement: $$REQUIRED_GO_VERSION or newer (only minor))" - opam switch import --switch mina --yes opam.export - eval $(opam env --switch=mina --set-switch) - chmod +x scripts/pin-external-packages.sh - ./scripts/pin-external-packages.sh - @echo "Environment prepared. You can now run 'make build' to build the project." - - ######################################## ## Code diff --git a/dockerfiles/stages/1-build-deps b/dockerfiles/stages/1-build-deps index fe09ce38cbee..9452a4431152 100644 --- a/dockerfiles/stages/1-build-deps +++ b/dockerfiles/stages/1-build-deps @@ -45,7 +45,7 @@ ARG OPAM_VERSION=2.3.0 # `nix flake update opam-repository`). # - scripts/update_opam_switch.sh ARG OPAM_REPOSITORY_COMMIT=08d8c16c16dc6b23a5278b06dff0ac6c7a217356 -ARG O1LABS_OPAM_REPOSITORY_COMMIT=dd90c5c72b7b7caeca3db3224b2503924deea08a +ARG O1LABS_OPAM_REPOSITORY_COMMIT=da14ce5463751e5b5b9ac565d8d37e04b4c1edc5 # Golang version number used to detemine tarball name ARG GO_VERSION=1.19.11 diff --git a/flake.lock b/flake.lock index 7536b98649e0..0b9fe1569fce 100644 --- a/flake.lock +++ b/flake.lock @@ -361,17 +361,17 @@ "o1-opam-repository": { "flake": false, "locked": { - "lastModified": 1760589013, - "narHash": "sha256-pugmvJB2/Ajr9sRujabatKJKwjheZMYgDpg17djfX3Y=", + "lastModified": 1764102744, + "narHash": "sha256-qgdYesr01yxTpl7/udKAE9Hx/YgyTcGyBY6Qt5WNwY4=", "owner": "o1-labs", "repo": "opam-repository", - "rev": "dd90c5c72b7b7caeca3db3224b2503924deea08a", + "rev": "da14ce5463751e5b5b9ac565d8d37e04b4c1edc5", "type": "github" }, "original": { "owner": "o1-labs", "repo": "opam-repository", - "rev": "dd90c5c72b7b7caeca3db3224b2503924deea08a", + "rev": "da14ce5463751e5b5b9ac565d8d37e04b4c1edc5", "type": "github" } }, diff --git a/flake.nix b/flake.nix index 9885bd0d3332..464ff98ea29e 100644 --- a/flake.nix +++ b/flake.nix @@ -31,7 +31,7 @@ inputs.describe-dune.inputs.nixpkgs.follows = "nixpkgs"; inputs.describe-dune.inputs.flake-utils.follows = "utils"; - inputs.o1-opam-repository.url = "github:o1-labs/opam-repository/dd90c5c72b7b7caeca3db3224b2503924deea08a"; + inputs.o1-opam-repository.url = "github:o1-labs/opam-repository/da14ce5463751e5b5b9ac565d8d37e04b4c1edc5"; inputs.o1-opam-repository.flake = false; # The version must be the same as the version used in: diff --git a/scripts/update-opam-switch.sh b/scripts/update-opam-switch.sh index 24af72561cde..f9fd71fcc405 100755 --- a/scripts/update-opam-switch.sh +++ b/scripts/update-opam-switch.sh @@ -30,7 +30,7 @@ ocaml_version=4.14.2 # `nix flake update opam-repository`). # - scripts/update_opam_switch.sh OPAM_REPOSITORY_COMMIT=08d8c16c16dc6b23a5278b06dff0ac6c7a217356 -O1LABS_OPAM_REPOSITORY_COMMIT=dd90c5c72b7b7caeca3db3224b2503924deea08a +O1LABS_OPAM_REPOSITORY_COMMIT=da14ce5463751e5b5b9ac565d8d37e04b4c1edc5 if [[ -d _opam ]]; then read -rp "Directory '_opam' exists and will be removed. You can also bypass the check by setting the variable BYPASS_OPAM_SWITCH_UPDATE to any value. Continue? [y/N] " \