Nix Rust | 651 Members | |
| Rust | 147 Servers |
| Sender | Message | Time |
|---|---|---|
| 19 Jul 2025 | ||
I think you might be able to produce a buildRustPackage that bakes in a different compiler but trying to kill setEnv again may be more fruitful | 23:04:26 | |
| 20 Jul 2025 | ||
Unfortunately, no (not currently). setEnv uses pkgsBuildHost.stdenv.cc, which rustPlatform doesnโt provide a way to override. | 14:52:53 | |
This was a motivating use case for taking libSystem out of the stdenv in the SDK rework. Overriding the SDK prior to that varied from difficult to impossible. | 14:54:28 | |
| 21 Jul 2025 | ||
| Note: Some breaking changes to the JSON target format will probably be merged to rustc soonish. I know Nixpkgs exposes that as an API so for anyone relying on it, they should be aware. | 02:21:56 | |
| https://github.com/rust-lang/rust/pull/144218 | 02:22:16 | |
| 09:29:07 | ||
| 22 Jul 2025 | ||
| 06:11:48 | ||
| 18:27:45 | ||
| 23 Jul 2025 | ||
| 02:11:18 | ||
In reply to @glepage:matrix.orgOpened a PR with a fix: https://github.com/NixOS/nixpkgs/pull/427702 | 15:46:30 | |
| I think we can agree that fetchCargoVendor being a two step construction is not very good for the cache. Now I think I came up with a pretty clever workaround, which keeps the two layers, but makes the non-FOD layer essentially just an empty derivation except a binary that you can run to start the unpacking process. Though, this would make it so that we can't "easily" get derivation with the vendored dependencies unpacked from the tarball. (Also, I put in a symlink into the non-FOD part for vendorStaging for easier access) I made a very rudimentary POC: https://github.com/NixOS/nixpkgs/pull/427815 Note: I did not take into consideration cross/splicing What do you all think? | 17:45:49 | |
| "a dependency on fetch-cargo-vendor-util for every rust package" doesn't seem like an issue, does it? | 17:47:21 | |
| 17:47:31 | |
| * >90% of Rust packages will already have that dependency and it's just a lightweight Python script, yeah? | 17:47:36 | |
| I worry about inf-rec since the fetch-cargo-vendor-util depends on cargo, which depends on cargoSetupHook IIRC. I havr not tried it though | 17:50:46 | |
| * I worry about inf-rec since the fetch-cargo-vendor-util depends on cargo, which depends on cargoSetupHook IIRC. I have not tried it though | 17:51:03 | |
| usually we use overrides to solve that | 17:54:18 | |
(cargoSetupHook.override { fetch-cargo-vendor-util = null; }) | 17:54:29 | |
| True | 17:54:45 | |
| I'm assuming that some people are using a custom implementation for vendoring. (e.g. for some authentication logic IDK) and their logic assumes that cargoSetupHook expects an unpacked cargo vendor structure. But maybe I'm overthinking this. Yes getting rid of the two steps would be healthier for easier overriding of hashes via overrideAttrs Anyways, I have to go now... I'll be back in an hour or so, sorry! | 17:59:23 | |
| we could expect such users to override it out of the setup hook | 18:00:53 | |
| we probably should have added a marker though ๐ | 18:01:04 | |
| wait | 18:01:08 | |
can't we just add a passthru.isFetchCargoVendor to fetchCargoVendor | 18:01:17 | |
| and add the dep and logic conditionally based on that at eval time? | 18:01:24 | |
based on cargoDeps | 18:01:34 | |
oh the issue is that we don't have access to cargoDeps at that pointโฆ | 18:01:39 | |
| Yeah, setup hooks don't know nix values... | 18:03:30 | |
| | 18:06:12 | |
| 25 Jul 2025 | ||
| 01:43:15 | ||