!FBuJyWXTGcGtHTPphC:nixos.org

Nix Rust

673 Members
Rust151 Servers

You have reached the beginning of time (for this room).


SenderMessageTime
15 Nov 2025
@louis2747:matrix.orgLouis2747 joined the room.11:31:57
@k900:0upti.meK900I'm dumb, how do I patch a fetchCargoVendor14:03:33
@ghpzin:envs.net@ghpzin:envs.net I saw somebody do rustPlatform.fetchCargoVendor similar to what it does by default, then change it with runCommand and set cargoDeps attr to result.
Not sure whether it is the most "accepted" way to do it.
14:09:53
@k900:0upti.meK900OK that's too much effort14:10:57
@ghpzin:envs.net@ghpzin:envs.net I saw somebody do rustPlatform.fetchCargoVendor similar to what it does by default, then change it with runCommand and set cargoDeps attr to result.
Not sure whether it is the most "accepted" way to do it.
https://github.com/NixOS/nixpkgs/blob/321f80c3e2a7ebefde46ef112e88e73774bc9fc7/pkgs/by-name/fl/flare-signal/package.nix#L49-L69
14:11:00
@niklaskorz:matrix.orgniklaskorz there's depsExtraArgs 14:24:47
@niklaskorz:matrix.orgniklaskorzhttps://github.com/NixOS/nixpkgs/blob/c5ae371f1a6a7fd27823bc500d9390b38c05fa55/pkgs/by-name/ze/zed-editor/package.nix#L131-L13514:24:54
@niklaskorz:matrix.orgniklaskorzbut it's undocumented14:25:26
@niklaskorz:matrix.orgniklaskorzbut that doesn't do anything else than passing extraArgs to buildRustPackage's implicit fetchCargoVendor call, so probably not what you are looking for if you already use fetchCargoVendor directly14:26:57
@niklaskorz:matrix.orgniklaskorz* but that doesn't do anything else than passing extra args to buildRustPackage's implicit fetchCargoVendor call, so probably not what you are looking for if you already use fetchCargoVendor directly14:27:06
@niklaskorz:matrix.orgniklaskorz if you need to patch a dependency's own code then the common solution is to do that in your package's postPatch on $cargoDepsCopy 14:28:20
@k900:0upti.meK900Bleh14:28:54
@ghpzin:envs.net@ghpzin:envs.net fetchCargoVendor is just runCommand at the very end, so you can probably do the same on top of it.
Or applyPatches on top.
14:33:25

Show newer messages


Back to Room ListRoom Version: 6