Hi!

I've started packaging a Rust application for my very first time so I'm
a little nervous UwU

But jokes aside, I've found and followed last year's blog post and
cookbook entry and got to this state¹.  The sources are listed in
rust-crates.scm but the `unpack-rust-crates' phase looks somewhat weird
(at least to my untrained eye):

--8<---------------cut here---------------start------------->8---
find-files: 
/gnu/store/id5d8y6cj67zc92dripl9ws18g44awkv-rust-egui-extras-0.33.3.tar.gz/share/cargo/registry:
 Not a directory
find-files: 
/gnu/store/idgpq0why4d802kj92i4wc196jifv0zm-rust-egui-glow-0.33.3.tar.gz/share/cargo/registry:
 Not a directory
find-files: 
/gnu/store/2xbg0l90b6awhp5lliilc4g3im2yp5wc-rust-egui-plot-0.34.0.tar.gz/share/cargo/registry:
 Not a directory
find-files: 
/gnu/store/93cyym8qsncvx2lacag9vpgcc123cpm7-rust-egui-skia-renderer-0.2.0.279dfdd-checkout/share/cargo/registry:
 No such file or directory
find-files: 
/gnu/store/s695iyf83xfxnxh5758c27rfsjrz0rsq-rust-either-1.15.0.tar.gz/share/cargo/registry:
 Not a directory
find-files: 
/gnu/store/73ahyiha0jd878zvjrs806pdj4nbsmvy-rust-emath-0.33.3.tar.gz/share/cargo/registry:
 Not a directory
find-files: 
/gnu/store/jx2a1z31rp5pdscy0zwqcmcz6yzafvcb-rust-embedded-io-0.4.0.tar.gz/share/cargo/registry:
 Not a directory
find-files: 
/gnu/store/h83bbkj28l610fzqyhvavy4gm0rjzxgm-rust-embedded-io-0.6.1.tar.gz/share/cargo/registry:
 Not a directory
--8<---------------cut here---------------end--------------->8---

I guess that is how it is supposed to look, since most(?) crates land in
the build process.  Even rust-egui-skia-renderer², which looks even more
suspicious in the paste above, because different.  The `unpack' phase
yields this output:

--8<---------------cut here---------------start------------->8---
`/gnu/store/93cyym8qsncvx2lacag9vpgcc123cpm7-rust-egui-skia-renderer-0.2.0.279dfdd-checkout/LICENSE'
 -> `guix-vendor/rust-egui-skia-renderer-0.2.0.279dfdd-checkout/LICENSE'
`/gnu/store/93cyym8qsncvx2lacag9vpgcc123cpm7-rust-egui-skia-renderer-0.2.0.279dfdd-checkout/Cargo.lock'
 -> `guix-vendor/rust-egui-skia-renderer-0.2.0.279dfdd-checkout/Cargo.lock'
`/gnu/store/93cyym8qsncvx2lacag9vpgcc123cpm7-rust-egui-skia-renderer-0.2.0.279dfdd-checkout/README.md'
 -> `guix-vendor/rust-egui-skia-renderer-0.2.0.279dfdd-checkout/README.md'
`/gnu/store/93cyym8qsncvx2lacag9vpgcc123cpm7-rust-egui-skia-renderer-0.2.0.279dfdd-checkout/.gitignore'
 -> `guix-vendor/rust-egui-skia-renderer-0.2.0.279dfdd-checkout/.gitignore'
`/gnu/store/93cyym8qsncvx2lacag9vpgcc123cpm7-rust-egui-skia-renderer-0.2.0.279dfdd-checkout/Cargo.toml'
 -> `guix-vendor/rust-egui-skia-renderer-0.2.0.279dfdd-checkout/Cargo.toml'
`/gnu/store/93cyym8qsncvx2lacag9vpgcc123cpm7-rust-egui-skia-renderer-0.2.0.279dfdd-checkout/examples/color_test.rs'
 -> 
`guix-vendor/rust-egui-skia-renderer-0.2.0.279dfdd-checkout/examples/color_test.rs'
`/gnu/store/93cyym8qsncvx2lacag9vpgcc123cpm7-rust-egui-skia-renderer-0.2.0.279dfdd-checkout/examples/rasterize.rs'
 -> 
`guix-vendor/rust-egui-skia-renderer-0.2.0.279dfdd-checkout/examples/rasterize.rs'
`/gnu/store/93cyym8qsncvx2lacag9vpgcc123cpm7-rust-egui-skia-renderer-0.2.0.279dfdd-checkout/src/lib.rs'
 -> `guix-vendor/rust-egui-skia-renderer-0.2.0.279dfdd-checkout/src/lib.rs'
`/gnu/store/93cyym8qsncvx2lacag9vpgcc123cpm7-rust-egui-skia-renderer-0.2.0.279dfdd-checkout/src/painter.rs'
 -> `guix-vendor/rust-egui-skia-renderer-0.2.0.279dfdd-checkout/src/painter.rs'
`/gnu/store/93cyym8qsncvx2lacag9vpgcc123cpm7-rust-egui-skia-renderer-0.2.0.279dfdd-checkout/src/egui_skia.rs'
 -> 
`guix-vendor/rust-egui-skia-renderer-0.2.0.279dfdd-checkout/src/egui_skia.rs'
--8<---------------cut here---------------end--------------->8---

Yet the build fails like this:

--8<---------------cut here---------------start------------->8---
starting phase `build'
warning: both `/tmp/guix-build-surfer-0.6.0.drv-0/source/.cargo/config` and 
`/tmp/guix-build-surfer-0.6.0.drv-0/source/.cargo/config.toml` exist. Using 
`/tmp/guix-build-surfer-0.6.0.drv-0/source/.cargo/config`
error: failed to get `egui_skia_renderer` as a dependency of package `libsurfer 
v0.6.0 (/tmp/guix-build-surfer-0.6.0.drv-0/source/libsurfer)`

Caused by:
  failed to load source for dependency `egui_skia_renderer`

Caused by:
  Unable to update 
https://gitlab.com/oscargus/egui_skia_renderer.git?rev=279dfddcc8f4982309935d368827019e9736dc89

Caused by:
  can't checkout from 'https://gitlab.com/oscargus/egui_skia_renderer.git': you 
are in the offline mode (--offline)
error: in phase 'build': uncaught exception:
%exception #<&invoke-error program: "cargo" arguments: ("build" "--offline" 
"-j" "24" "--release") exit-status: 101 term-signal: #f stop-signal: #f> 
phase `build' failed after 0.2 seconds
command "cargo" "build" "--offline" "-j" "24" "--release" failed with status 101
build process 18 exited with status 256
note: keeping build directory `/tmp/guix-build-surfer-0.6.0.drv-0'
builder for `/gnu/store/jibcnvvc2y6451kaiicb9gkrs2pfmja4-surfer-0.6.0.drv' 
failed with exit code 1
build of /gnu/store/jibcnvvc2y6451kaiicb9gkrs2pfmja4-surfer-0.6.0.drv failed
View build log at 
'/var/log/guix/drvs/ji/bcnvvc2y6451kaiicb9gkrs2pfmja4-surfer-0.6.0.drv.gz'.
guix build: error: build of 
`/gnu/store/jibcnvvc2y6451kaiicb9gkrs2pfmja4-surfer-0.6.0.drv' failed
--8<---------------cut here---------------end--------------->8---

Usually—meaning in other package builds—this would be a hint towards a
missing dependency.  But I am very puzzled about the dependency
seemingly being part of this process.  Why does it still fail?  Do I
have to patch some source files so the cargo build knows where to "look"
for egui-skia-renderer source input?

Thanks for any and all pointers
gabber


¹ https://codeberg.org/guix/guix/pulls/5637
² 
https://gitlab.com/oscargus/egui_skia_renderer?rev=279dfddcc8f4982309935d368827019e9736dc89

Reply via email to