diff options
| -rw-r--r-- | topics/rust/guix-rust-bootstrap.gmi | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/topics/rust/guix-rust-bootstrap.gmi b/topics/rust/guix-rust-bootstrap.gmi index cf779d1..c459358 100644 --- a/topics/rust/guix-rust-bootstrap.gmi +++ b/topics/rust/guix-rust-bootstrap.gmi @@ -122,7 +122,7 @@ I just did above to build spoa-rs. Only had to add cmake to the shell packages. I just built sweepga. Only had the add clang to the shell: -``` +```sh guix shell --share=$HOME/.cargo --share=$HOME/.rustup -C -N -D -F -v 3 guix gcc-toolchain make libdeflate pkg-config xz coreutils sed zstd zlib nss-certs openssl curl zlib cmake clang . ~/.cargo/env env LD_LIBRARY_PATH=$GUIX_ENVIRONMENT/lib cargo build @@ -132,6 +132,20 @@ env LD_LIBRARY_PATH=$GUIX_ENVIRONMENT/lib ./target/debug/sweepga [sweepga] ERROR: No valid input provided ``` +To run on the cluster you likely don't want to use the container. Make a note of GUIX_ENVIRONMENT: + +``` +echo $GUIX_ENVIRONMENT/ +/gnu/store/6khi7iv7l75595hwlfc1nwmdcv72m24s-profile/ +``` + +It has your libs! So, outsite the container you can run + +``` +export GUIX_ENVIRONMENT=/gnu/store/6khi7iv7l75595hwlfc1nwmdcv72m24s-profile +env LD_LIBRARY_PATH=$GUIX_ENVIRONMENT/lib /home/wrk/tmp/sweepga/target/debug/sweepga +``` + # Updating the container Now your build may fail because you miss a crucial library or tool. This is a feature of guix containers as it makes dependencies explicit. |
