diff --git a/contrib/guix/build.sh b/contrib/guix/build.sh index f5c3c6f3..7c9f00a5 100755 --- a/contrib/guix/build.sh +++ b/contrib/guix/build.sh @@ -8,7 +8,7 @@ set -ex mkdir -p ~/.cargo cat <~/.cargo/config.toml [source.vendored_sources] -directory = "$VENDOR_DIR" +directory = "/vendor" [source.crates-io] replace-with = "vendored_sources" @@ -33,13 +33,13 @@ RUSTC_BOOTSTRAP=1 cargo -vvv \ rustc \ --jobs "$JOBS" \ --release \ - --target-dir "$TARGET_DIR" + --target-dir "/out" # Assume 64bits. Even bitcoind doesn't ship 32bits binaries for x86. # FIXME: is there a cleaner way than using patchelf for this? -patchelf --set-interpreter /lib64/ld-linux-x86-64.so.2 "$TARGET_DIR/release/$BINARY_NAME" +patchelf --set-interpreter /lib64/ld-linux-x86-64.so.2 "/out/release/$BINARY_NAME" # FIXME: Find a way to use GUIX_LD_WRAPPER_DISABLE_RPATH=yes instead -patchelf --remove-rpath "$TARGET_DIR/release/$BINARY_NAME" +patchelf --remove-rpath "/out/release/$BINARY_NAME" set +ex diff --git a/contrib/guix/guix-build.sh b/contrib/guix/guix-build.sh index e749bc00..816b3466 100755 --- a/contrib/guix/guix-build.sh +++ b/contrib/guix/guix-build.sh @@ -123,8 +123,8 @@ for project_folder in "" "gui"; do --expose="$PROJECT_ROOT/Cargo.toml=/liana/Cargo.toml" \ --expose="$BUILD_ROOT/Cargo.lock=/liana/Cargo.lock" \ --expose="$PWD/contrib/guix/build.sh=/liana/build.sh" \ - --expose="$PROJECT_VENDOR_DIR=$PROJECT_VENDOR_DIR" \ - --share="$PROJECT_OUT_DIR=$PROJECT_OUT_DIR" \ + --expose="$PROJECT_VENDOR_DIR=/vendor" \ + --share="$PROJECT_OUT_DIR=/out" \ --cores="$JOBS" \ --container \ --pure \