diff --git a/contrib/depends/packages/fcmp_pp_rust_deps.mk b/contrib/depends/packages/fcmp_pp_rust_deps.mk index c476029760f..433376498cb 100644 --- a/contrib/depends/packages/fcmp_pp_rust_deps.mk +++ b/contrib/depends/packages/fcmp_pp_rust_deps.mk @@ -2,7 +2,7 @@ package=fcmp_pp_rust_deps $(package)_version=0.0.0 $(package)_download_path=https://featherwallet.org/files/sources $(package)_file_name=fcmp_pp_rust-$($(package)_version)-deps.tar.gz -$(package)_sha256_hash=9a7c20d5571c0a82fe570122b4166dd4223672baaa1e25e52eb2426eefe3bc02 +$(package)_sha256_hash=06ab31925d4d84a8c811c7036abfdf1956288b12fbe4300176d53ab317a6f811 define $(package)_stage_cmds mkdir -p $($(package)_staging_prefix_dir)/cargo &&\ diff --git a/contrib/depends/packages/packages.mk b/contrib/depends/packages/packages.mk index 601250d2074..d14cc07a285 100644 --- a/contrib/depends/packages/packages.mk +++ b/contrib/depends/packages/packages.mk @@ -1,4 +1,4 @@ -native_packages:=fcmp_pp_rust_deps +native_packages:=fcmp_pp_rust_deps rust_src packages:=boost openssl zeromq expat unbound sodium hardware_packages := hidapi protobuf libusb diff --git a/contrib/depends/packages/rust_src.mk b/contrib/depends/packages/rust_src.mk new file mode 100644 index 00000000000..3e194d053cf --- /dev/null +++ b/contrib/depends/packages/rust_src.mk @@ -0,0 +1,10 @@ +package=rust_src +$(package)_version=1.82.0 +$(package)_download_path=https://static.rust-lang.org/dist +$(package)_file_name=rustc-$($(package)_version)-src.tar.gz +$(package)_sha256_hash=7c53f4509eda184e174efa6ba7d5eeb586585686ce8edefc781a2b11a7cf512a + +define $(package)_stage_cmds + mkdir -p $($(package)_staging_prefix_dir)/rust &&\ + mv library $($(package)_staging_prefix_dir)/rust +endef diff --git a/contrib/guix/guix-build b/contrib/guix/guix-build index 3a14b97f89e..d049ab604cd 100755 --- a/contrib/guix/guix-build +++ b/contrib/guix/guix-build @@ -374,6 +374,8 @@ EOF # --user="user" \ # --share="$PWD"=/monero \ # -- bash -c "cd /monero && bash contrib/guix/libexec/cargo.sh" +# +# exit 1 # Run the build script 'contrib/guix/libexec/build.sh' in the build # container specified by 'contrib/guix/manifest.scm'. diff --git a/contrib/guix/libexec/build.sh b/contrib/guix/libexec/build.sh index 7d17de3120e..428eca34eaa 100644 --- a/contrib/guix/libexec/build.sh +++ b/contrib/guix/libexec/build.sh @@ -77,7 +77,7 @@ store_path() { # includes/libs NATIVE_GCC="$(store_path gcc-toolchain)" NATIVE_GCC_STATIC="$(store_path gcc-toolchain static)" -RUST_SRC="$(store_path rust rust-src)/lib/rustlib/src/rust" +RUST_SRC="/monero/contrib/depends/$HOST/native/rust/library" unset LIBRARY_PATH unset CPATH diff --git a/contrib/guix/libexec/cargo.sh b/contrib/guix/libexec/cargo.sh index 6a02746b4e7..4a9d832db0c 100644 --- a/contrib/guix/libexec/cargo.sh +++ b/contrib/guix/libexec/cargo.sh @@ -10,21 +10,24 @@ export TZ="UTC" allowed_pattern=$(awk '{print "^./" $1 "$" }' /monero/contrib/guix/libexec/allowed_deps.txt | paste -sd '|' -) cd / -wget --no-check-certificate https://static.rust-lang.org/dist/rustc-1.77.1-src.tar.gz -echo "ee106e4c569f52dba3b5b282b105820f86bd8f6b3d09c06b8dce82fb1bb3a4a1 rustc-1.77.1-src.tar.gz" | sha256sum -c -tar xf rustc-1.77.1-src.tar.gz -cp rustc-1.77.1-src/Cargo.lock rustc-1.77.1-src/library/std/ +wget --no-check-certificate https://static.rust-lang.org/dist/rustc-1.82.0-src.tar.gz +echo "7c53f4509eda184e174efa6ba7d5eeb586585686ce8edefc781a2b11a7cf512a rustc-1.82.0-src.tar.gz" | sha256sum -c +tar xf rustc-1.82.0-src.tar.gz +cp rustc-1.82.0-src/Cargo.lock rustc-1.82.0-src/library/std/ # Vendor fcmp_pp_rust deps cd /monero/src/fcmp_pp/fcmp_pp_rust -RUSTC_BOOTSTRAP=1 cargo vendor --locked --sync /rustc-1.77.1-src/library/std/Cargo.toml /vendor +RUSTC_BOOTSTRAP=1 cargo vendor --locked --sync /rustc-1.82.0-src/library/std/Cargo.toml /vendor # Create deterministic dependency archive cd /vendor -find . -mindepth 1 -maxdepth 1 -type d | grep -Ev "($allowed_pattern)" | xargs rm -rf +#find . -mindepth 1 -maxdepth 1 -type d | grep -Ev "($allowed_pattern)" | xargs rm -rf + +#find . -type f -regex ".*\.\(a\|dll\|exe\|lib\)$" -delete +#find . -type f -name ".cargo-checksum.json" -print0 | xargs -0 -I% sh -c 'echo "{\"package\":null,\"files\":{}}" > "%"' +#find . -type f -name "Cargo.lock" -delete -find . -type f -regex ".*\.\(a\|dll\|exe\|lib\)$" -delete find . -print0 \ | sort --zero-terminated \ | tar --create --no-recursion --mode='u+rw,go+r-w,a+X' --null --files-from=- \ diff --git a/contrib/guix/libexec/prelude.bash b/contrib/guix/libexec/prelude.bash index 1540692a52f..92cfc5ca371 100644 --- a/contrib/guix/libexec/prelude.bash +++ b/contrib/guix/libexec/prelude.bash @@ -51,7 +51,7 @@ fi time-machine() { # shellcheck disable=SC2086 guix time-machine --url=https://github.com/monero-project/guix.git \ - --commit=0ba20c76349709fdb04baa8d263e3c0c7bd7b4e7 \ + --commit=9d09b0cf841fb657a1aec12e9bab68e00c2b493c \ --cores="$JOBS" \ --keep-failed \ --fallback \ diff --git a/contrib/guix/manifest.scm b/contrib/guix/manifest.scm index a55a0427a26..c3f44fcd927 100644 --- a/contrib/guix/manifest.scm +++ b/contrib/guix/manifest.scm @@ -260,7 +260,6 @@ chain for " target " development.")) cmake-minimal rust `(,rust "cargo") - `(,rust "rust-src") ;; Scripting perl python-minimal