I’m trying to do this as well. I tried following this discussion: Is it possible to override cargoSha256 in buildRustPackage? - #5 by Sandro and came up with this:
{ pkgs, ...}:
let
version = "6a58a5ce94f186884ec70a60b5afbd728521b1c5";
in
{
nixpkgs.overlays = [ (final: prev: {
wezterm = prev.wezterm.overrideAttrs (old: rec {
inherit version;
src = prev.fetchFromGitHub {
owner = "wez";
repo = "wezterm";
rev = version;
fetchSubmodules = true;
hash = "sha256-QXZjGIw5LvK+frigdCYGVOjLHM3Fnnqqi5FEySaKExs=";
};
cargoDeps = old.cargoDeps.overrideAttrs (prev.lib.const {
name = "wezterm-vendor.tar.gz";
inherit src;
outputHash = "sha256-b5OB42PDpw1uZ3agO/TOrWuRM2eCqC8/xWOAkivxTRg=";
outputHashMode = "recursive";
});
});
}) ];
home.packages = [ pkgs.wezterm ];
}
But it gets stuck here:
warning: The interpretation of store paths arguments ending in `.drv` recently changed. If this command is now failing try again with '/nix/store/in18x3ycwhz8lwn3hyg616gizv45i79x-wezterm-6a58a5ce94f186884ec70a60b5afbd728521b1c5.drv^*'
@nix { "action": "setPhase", "phase": "unpackPhase" }
unpacking sources
unpacking source archive /nix/store/i4ys5r1l889szbpfkz2h5zhflhbpkv1r-source
source root is source
Executing cargoSetupPostUnpackHook
unpacking source archive /nix/store/z1hwbawwl579xalk0wck66pk7mginpxa-wezterm-vendor.tar.gz
tar: /nix/store/z1hwbawwl579xalk0wck66pk7mginpxa-wezterm-vendor.tar.gz: Cannot open: No such file or direc>
tar: Error is not recoverable: exiting now
do not know how to unpack source archive /nix/store/z1hwbawwl579xalk0wck66pk7mginpxa-wezterm-vendor.tar.gz
The referenced file /nix/store/z1hwbawwl579xalk0wck66pk7mginpxa-wezterm-vendor.tar.gz really does not exist.