19 Aug 2024 |
blitz | In reply to @simon.brandner:envs.net Here: https://discourse.nixos.org/t/nixos-module-using-system-nixpkgs-instead-of-the-nixpkgs-specified-in-the-modules-flake/50816 The response you got looks good! | 10:15:38 |
blitz | I hope it helps you! | 10:15:50 |
Šimon Brandner | I'll give it a go later | 10:15:58 |
Šimon Brandner | It did do the trick! | 11:25:06 |
| cafkafk changed their profile picture. | 12:45:30 |
damccull | Is it possible to have a flake with nativeBuildInputs listed such that one particular package is built from source with a specific version of rustc/cargo that is different than the version my devShell would then use? | 19:17:19 |
damccull | * Is it possible to have a flake with nativeBuildInputs listed such that one particular package is built from source with a specific version of rustc/cargo that is different than the version my devShell would then use? Where I (hopefully) specify it instead of making a new flake/overlay for it | 19:18:17 |
Sashanoraa.gay (she/her, ze/zir) | In reply to @damccull:matrix.org Is it possible to have a flake with nativeBuildInputs listed such that one particular package is built from source with a specific version of rustc/cargo that is different than the version my devShell would then use? Where I (hopefully) specify it instead of making a new flake/overlay for it I think something like that might be possile using the rust overlay https://github.com/oxalica/rust-overlay | 19:38:43 |
damccull | In reply to @sasha:the-apothecary.club I think something like that might be possile using the rust overlay https://github.com/oxalica/rust-overlay Excellent. Now to figure out how. I'm already using oxilica's overlay. It's nice. | 19:39:38 |
damccull | Makes it easy to have multiple version of rust where I can jus tlaunch the right version devShell, but I need to figure out how a 1.80 devShell can build a specific dependency with 1.78 :D | 19:40:13 |
Alyssa Ross | Are you sure it isn't easier to update that dependency? | 20:09:09 |
Alyssa Ross | (assuming this is because of the inference changes in 1.80, it's usually a very easy fix) | 20:09:51 |
20 Aug 2024 |
| WeetHet joined the room. | 00:09:38 |
Ralith | you can't mix and match different rustc versions, anyway | 00:49:45 |
| benwebb changed their display name from benjaminedwardwebb to benwebb. | 12:44:09 |
blitz | Hey! Is there a good way to patch rust dependencies? Specifically I have a patch file for one dependency that I would like to apply. But cargo [patch] can't do this and I also don't see anything for buildRustPackage. Does anyone have a pointer? | 14:46:19 |
emily | I think you can patch it in the vendor/ directory | 14:49:44 |
emily | but it's ugly | 14:49:46 |
blitz | is cargoPatches the right way to go? | 14:50:42 |
blitz | or do I have to manually patch it in one of the phases? | 14:50:51 |
emily | should just be patches | 14:53:50 |
emily | unless you are touching Cargo.lock stuff | 14:53:58 |
blitz | https://github.com/NixOS/nixpkgs/blob/master/doc/languages-frameworks/rust.section.md#vendoring-of-dependencies-vendoring-of-dependencies <- this looks like it could work. let me try... | 14:55:51 |
blitz | emily
| 15:13:52 |
blitz | * emily
| 15:13:59 |
blitz | * emily
postPatch = ''
patch -d ../cargo-vendor-dir/somecrate-0.10.0 -p2 -i ${./some.patch}
'';
| 15:14:22 |
blitz | this works | 15:14:28 |
emily | you can probably just use patchFlags also | 15:15:14 |
emily | but yeah, sure :) | 15:15:22 |
emily | (why do you need to do this anyway?) | 15:15:27 |