!FBuJyWXTGcGtHTPphC:nixos.org

Nix Rust

673 Members
Rust152 Servers

Load older messages


SenderMessageTime
6 Nov 2021
@skamdart:matrix.orgSkamDart changed their display name from Cameron to SkamDart.21:12:36
@ralith:ralith.comRalitha lockfile wouldn't really make sense, since it would inevitably be inconsistent with whatever a dependency needs21:15:26
@figsoda:matrix.orgfigsoda buildRustPackage works pretty well too
cargoLock.lockFile is really useful outside of nixpkgs
22:03:30
@figsoda:matrix.orgfigsoda

I haven't found a workflow or tool yet that allows me to make cargo "nix aware" e.g. "cargo build" fetches build artifacts from the nix-store.

https://github.com/kolloch/crate2nix or https://github.com/cargo2nix/cargo2nix might be what you want

22:06:31
@figsoda:matrix.orgfigsoda or buildRustCrate and carnix 22:07:31
@skamdart:matrix.orgSkamDart figsoda Thanks for pointing out my lack of specification. I was implicitly referring to during development and across machines. One of the great things about using nix for C,C++, and Haskell what I believe the Rust ecosystem is currently lacking, is dependencies are pulled from the nix-store and not recompiled between projects, nix-builds, and development. Does help clarify? 23:47:26
7 Nov 2021
@legendofmiracles:matrix.orglegendofmiraclesAny reason why rust_Packages_1_45 was removed? I ran into a package today that would have needed it, if the fix wouldn’t have been trivial01:25:12
@hexa:lossy.networkhexathe last package to use it was firefox 78, so when I removed that due to being EOL I also removed rustPackages_1_4501:29:58
@hexa:lossy.networkhexa * the last package to use it was firefox 78, so when I removed that due to it being EOL I also removed rustPackages_1_4501:30:09
@legendofmiracles:matrix.orglegendofmiraclesIs it off the table to bring it back if needed?04:48:02
@andi:kack.itandi- legendofmiracles: why is it needed and why does the rust project fail on newer compilers? (I've seen such issues myself but usually the rust community tries to avoid that situation) 14:48:16
@wackbyte:matrix.orgwackbyte joined the room.18:40:16
8 Nov 2021
@jonringer:matrix.orgjonringer joined the room.13:02:15
@legendofmiracles:matrix.orglegendofmiraclesHow does nix handle cargo patches, like here: https://github.com/a-b-street/abstreet/blob/4717c3c8f7072cd0efc6c49403f724b95f8738fe/Cargo.toml#L3916:44:56
@legendofmiracles:matrix.orglegendofmiracles * How does nix handle cargo patches, like here?: https://github.com/a-b-street/abstreet/blob/4717c3c8f7072cd0efc6c49403f724b95f8738fe/Cargo.toml#L3916:45:02
@yuka:yuka.devYuka (she/her)If you use buildRustPackage, It mostly doesn't interact with them16:45:35
@legendofmiracles:matrix.orglegendofmiraclesBecause it's in the lockfile?16:46:00
@yuka:yuka.devYuka (she/her) If you use cargoSha256, then Nix doesn't care about the lockfile or Cargo.toml at all. It just runs cargo vendor, and then later cargo build with the vendored sources. 16:47:21
@yuka:yuka.devYuka (she/her) If you use the importCargoLock / cargoLock.lockFile thing, the cargo vendor part is replaced by a Nix derivation that downloads all the things in the lockfile, which is just the same as what cargo vendor would do 16:48:41
@yuka:yuka.devYuka (she/her) * If you use the importCargoLock / cargoLock.lockFile thing, the cargo vendor part is replaced by a Nix derivation that depends on fetchurl/fetchgit downloads of all the things in the lockfile, which is just the same as what cargo vendor would do 16:49:04
@yuka:yuka.devYuka (she/her)Either way the patch entries in Cargo.toml should be honored16:49:19
@jonringer:matrix.orgjonringer if you do need to apply patches before vendoring, you can declare them with cargoPatches 16:49:21
@yuka:yuka.devYuka (she/her)I don't think the question was about patching Cargo.toml / Cargo.lock16:50:13
@legendofmiracles:matrix.orglegendofmiracles
building
    Updating git repository `https://github.com/georust/geo`
error: failed to sync

Caused by:
  failed to load pkg lockfile

Caused by:
  failed to resolve patches for `https://github.com/rust-lang/crates.io-index`

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

Caused by:
  Unable to update https://github.com/georust/geo?branch=mkirk/concave-hull-fix-empty-crash#243ad260

Caused by:
  object not found - no match for id (243ad260ba9dec5fe6ab5d184ac625f6ed01b53b); class=Odb (9); code=NotFound (-3)
Traceback (most recent call last):
  File "/nix/store/c7cph7saraq1zq690ch368bjfdlmaypd-cargo-vendor-normalise/bin/.cargo-vendor-normalise-wrapped", line 42, in <module>
    main()
  File "/nix/store/c7cph7saraq1zq690ch368bjfdlmaypd-cargo-vendor-normalise/bin/.cargo-vendor-normalise-wrapped", line 17, in main
    assert list(data.keys()) == ["source"]
AssertionError
16:50:21
@legendofmiracles:matrix.orglegendofmiraclesThe reason I asked is because of these errors16:50:31
@legendofmiracles:matrix.orglegendofmiraclesbut now that I look at it again, it doesn't seem to have anything to do with nix16:51:15
@yuka:yuka.devYuka (she/her)maybe the lockfile is outdated?16:51:22
@yuka:yuka.devYuka (she/her)or some git branch/tag was yanked?16:51:30
@legendofmiracles:matrix.orglegendofmiraclesOr commit16:51:37
@legendofmiracles:matrix.orglegendofmiraclesI'll play around a bit, thanks for the hint16:51:52

Show newer messages


Back to Room ListRoom Version: 6