!FBuJyWXTGcGtHTPphC:nixos.org

Nix Rust

687 Members
Rust154 Servers

Load older messages


SenderMessageTime
14 Apr 2025
@fxomt:tchncs.de@fxomt:tchncs.de left the room.01:00:20
@glepage:matrix.orgGaétan Lepage Does some cargo hook initialize the $OUT_DIR environment variable? 13:00:16
@glepage:matrix.orgGaétan LepageRedacted or Malformed Event13:00:27
@glepage:matrix.orgGaétan Lepage Hmm apparently yes: https://github.com/NixOS/nixpkgs/blob/857a0fe739831b591f3c972698cec75bb6f7a24d/pkgs/build-support/rust/build-rust-crate/configure-crate.nix#L166 13:03:49
@awwpotato:envs.net@awwpotato:envs.netrust libaries shouldn't be packaged in nixpkgs right? just asking because of this pr: https://github.com/NixOS/nixpkgs/pull/39812421:20:16
@k900:0upti.meK900Correct21:22:03
@k900:0upti.meK900Posted on the PR21:22:05
15 Apr 2025
@marie:marie.cologneMariethere's another PR by the same person packaging a rust library: https://github.com/NixOS/nixpkgs/pull/39828509:18:52
@snowty.cundl.01:4d2.org@snowty.cundl.01:4d2.org joined the room.14:50:22
@snowty.cundl.01:4d2.org@snowty.cundl.01:4d2.org left the room.14:58:41
16 Apr 2025
@hexa:lossy.networkhexatrying to package https://github.com/getsentry/relay/tree/25.4.0 and I'm hitting a bump in the road00:11:16
@hexa:lossy.networkhexa the Cargo.toml defines a git dependency, so I fetched the lockfile and used rustPlatform.importCargoLock 00:12:08
@hexa:lossy.networkhexaI subsequently get asked to provide a hash for the git dependency00:12:30
@hexa:lossy.networkhexa
error: No hash was found while vendoring the git dependency sysinfo-0.33.1. You can add
a hash through the `outputHashes` argument of `importCargoLock`:

outputHashes = {
  "sysinfo-0.33.1" = "<hash>";
};

If you use `buildRustPackage`, you can add this attribute to the `cargoLock`
attribute set.
00:12:33
@hexa:lossy.networkhexabut during the build it tries to fetch the sysinfo git sources00:13:10
@hexa:lossy.networkhexa
sentry-relay> pypa build flags: --no-isolation --outdir dist/ --wheel
sentry-relay> * Getting build dependencies for wheel...
sentry-relay> * Building wheel...
sentry-relay> running bdist_wheel
sentry-relay> running build
sentry-relay> running build_py
sentry-relay> creating build/lib/sentry_relay
sentry-relay> copying sentry_relay/__init__.py -> build/lib/sentry_relay
sentry-relay> copying sentry_relay/processing.py -> build/lib/sentry_relay
sentry-relay> copying sentry_relay/utils.py -> build/lib/sentry_relay
sentry-relay> copying sentry_relay/exceptions.py -> build/lib/sentry_relay
sentry-relay> copying sentry_relay/auth.py -> build/lib/sentry_relay
sentry-relay> copying sentry_relay/consts.py -> build/lib/sentry_relay
sentry-relay> copying sentry_relay/py.typed -> build/lib/sentry_relay
sentry-relay>     Updating crates.io index
sentry-relay> warning: spurious network error (3 tries remaining): [6] Could not resolve hostname (Could not resolve host: index.crates.io)
sentry-relay> warning: spurious network error (2 tries remaining): [6] Could not resolve hostname (Could not resolve host: index.crates.io)
sentry-relay> warning: spurious network error (1 tries remaining): [6] Could not resolve hostname (Could not resolve host: index.crates.io)
sentry-relay>     Updating git repository `https://github.com/getsentry/sysinfo.git`
sentry-relay> warning: spurious network error (3 tries remaining): failed to resolve address for github.com: Temporary failure in name resolution; class=Net (12)
sentry-relay> warning: spurious network error (2 tries remaining): failed to resolve address for github.com: Temporary failure in name resolution; class=Net (12)
sentry-relay> warning: spurious network error (1 tries remaining): failed to resolve address for github.com: Temporary failure in name resolution; class=Net (12)
sentry-relay> error: failed to get `sysinfo` as a dependency of package `relay-server v25.4.0 (/build/source/relay-server)`
sentry-relay> 
sentry-relay> Caused by:
sentry-relay>   failed to load source for dependency `sysinfo`
sentry-relay> 
sentry-relay> Caused by:
sentry-relay>   Unable to update https://github.com/getsentry/sysinfo.git?rev=15b3be3273ba286740122fed7bb7dccd2a79dc8f#15b3be32
sentry-relay> 
sentry-relay> Caused by:
sentry-relay>   failed to clone into: /build/.home/.cargo/git/db/sysinfo-bfa15ca2329ff574
sentry-relay> 
sentry-relay> Caused by:
sentry-relay>   revision 15b3be3273ba286740122fed7bb7dccd2a79dc8f not found
sentry-relay> 
sentry-relay> Caused by:
sentry-relay>   network failure seems to have happened
sentry-relay>   if a proxy or similar is necessary `net.git-fetch-with-cli` may help here
sentry-relay>   https://doc.rust-lang.org/cargo/reference/config.html#netgit-fetch-with-cli
sentry-relay> 
sentry-relay> Caused by:
sentry-relay>   failed to resolve address for github.com: Temporary failure in name resolution; class=Net (12)
sentry-relay> 
sentry-relay> ERROR Backend subprocess exited when trying to invoke build_wheel
00:13:28
@hexa:lossy.networkhexa Cargo.toml for reference 00:13:54
@aloisw:julia0815.de@aloisw:julia0815.deCan you share the nix code?04:29:34
@tomasajt:matrix.orgToma
In reply to @hexa:lossy.network
trying to package https://github.com/getsentry/relay/tree/25.4.0 and I'm hitting a bump in the road

You could try using rustPlatform.fetchCargoVendor instead, hopefully it will have more obvious error messages

(also it doesn't need a hash for every git dep)

06:22:21
@hexa:lossy.networkhexahttps://github.com/mweinelt/nixpkgs/tree/sentry14:20:35
@hexa:lossy.networkhexasame error14:20:56
@hexa:lossy.networkhexa* https://github.com/mweinelt/nixpkgs/blob/sentry/pkgs/development/python-modules/sentry-relay/default.nix14:21:42
@emilazy:matrix.orgemily(licence is wrong btw)14:30:59
@emilazy:matrix.orgemily it looks like you haven't set cargoRoot on the fetchCargoVendor, I think that may be required 14:31:43
@aloisw:julia0815.de@aloisw:julia0815.de The rustPlatform.cargoSetupHook is missing too. 14:33:00
@emilazy:matrix.orgemilyoh14:33:11
@hexa:lossy.networkhexaoops14:33:21
@emilazy:matrix.orgemilythat's probably the main issue, yes14:33:22
@aloisw:julia0815.de@aloisw:julia0815.deWell one of the issues, the build still fails with the hook present but with a different error.14:33:49
@emilazy:matrix.orgemily"A Competing Use means making the Software available to others in a commercial product or service that: … substitutes for any other product or service we offer using the Software that exists as of the date we make the Software available" I like how they get to rugpull by starting a competing service that copies your product.14:34:27

Show newer messages


Back to Room ListRoom Version: 6