| 14 Apr 2025 |
| @fxomt:tchncs.de left the room. | 01:00:20 |
Gaétan Lepage | Does some cargo hook initialize the $OUT_DIR environment variable? | 13:00:16 |
Gaétan Lepage | Redacted or Malformed Event | 13:00:27 |
Gaé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 | rust libaries shouldn't be packaged in nixpkgs right? just asking because of this pr: https://github.com/NixOS/nixpkgs/pull/398124 | 21:20:16 |
K900 | Correct | 21:22:03 |
K900 | Posted on the PR | 21:22:05 |
| 15 Apr 2025 |
Marie | there's another PR by the same person packaging a rust library: https://github.com/NixOS/nixpkgs/pull/398285 | 09:18:52 |
| @snowty.cundl.01:4d2.org joined the room. | 14:50:22 |
| @snowty.cundl.01:4d2.org left the room. | 14:58:41 |
| 16 Apr 2025 |
hexa | trying to package https://github.com/getsentry/relay/tree/25.4.0 and I'm hitting a bump in the road | 00:11:16 |
hexa | the Cargo.toml defines a git dependency, so I fetched the lockfile and used rustPlatform.importCargoLock | 00:12:08 |
hexa | I subsequently get asked to provide a hash for the git dependency | 00:12:30 |
hexa | 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 | but during the build it tries to fetch the sysinfo git sources | 00:13:10 |
hexa | 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 | Cargo.toml for reference | 00:13:54 |
@aloisw:julia0815.de | Can you share the nix code? | 04:29:34 |
Toma | 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 | https://github.com/mweinelt/nixpkgs/tree/sentry | 14:20:35 |
hexa | same error | 14:20:56 |
hexa | * https://github.com/mweinelt/nixpkgs/blob/sentry/pkgs/development/python-modules/sentry-relay/default.nix | 14:21:42 |
emily | (licence is wrong btw) | 14:30:59 |
emily | it looks like you haven't set cargoRoot on the fetchCargoVendor, I think that may be required | 14:31:43 |
@aloisw:julia0815.de | The rustPlatform.cargoSetupHook is missing too. | 14:33:00 |
emily | oh | 14:33:11 |
hexa | oops | 14:33:21 |
emily | that's probably the main issue, yes | 14:33:22 |
@aloisw:julia0815.de | Well one of the issues, the build still fails with the hook present but with a different error. | 14:33:49 |
emily | "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 |