Nix Rust | 664 Members | |
| Rust | 148 Servers |
| Sender | Message | Time |
|---|---|---|
| 21 Jul 2025 | ||
| 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 | ||
| 26 Jul 2025 | ||
| 08:28:46 | ||
| @Toma I rebased + reran your treewide to resolve the merge conflicts, will also run nixpkgs-review for darwin and linux in a bit, but otherwise I think itβs good to go? | 08:46:24 | |
| oh great already new merge conflicts since I rebased π« | 08:47:52 | |
individual PRs removing useFetchCargoVendor by themselves makes this pretty hard | 08:50:23 | |
| Iβd suggest anyone reading here to stop requesting PRs to remove it themselves, except for new packages of course | 08:50:47 | |