Im trying to install wezterm but there are a few feature i need which haven’t made it too release yet, I’ve been trying to figure out a way to install the package from git and this is the closest i’ve come so far
But it tells me that cargoHash is out of date. it suggests setting it to an empty string and doing exactly the same as you do with the hash for fetchFromGitHub, but i set it to an empty string and it gives me the same error and no hash
any ideas as to what im missing for this final peice of the puzzle? that is, if i haven’t done it entirely wrong and should be doing a different method completely
this doesn’t seem to work, if I try to set cargoLock.lockfile to ./Cargo.toml (as it is set in the original nixpkgs derivation), it gives me an error because it cannot coerce a set into a string. I don’t understand why it expects cargoLock to be a string, and if i set it to an empty string similarly to what the original error message suggested, I still get the same first error message
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.
I came across this issue as well and ended up with this solution before seeing this thread
The issue is overrideAttrrs overrides the attribute set passed to stdenv.mkDerivation, so you don’t have direct access to buildRustPackage from my understanding
But you can just call override instead. This has the advantage of also being able to override the rustc/cargo versions for when the latest version in nixpkgs isn’t up to date
My own flake is a bit complex because of my use of std/hive. So my snippet below is outside of the overlay context, and nixpkgs is an unaltered nixpkgs whereas pkgs is nixpkgs + overlays
And you do still need to have a local copy of the Cargo.toml like in the nixpkgs drv
Hey! I have a custom tool chain for Rust, every time I try to run the build I get an error:
error: builder for '/nix/store/zi39rz1hgx0g5nqdllcgk18i5wwd74p3-wezterm-deps-20240624-135522-552bb1d6.drv' failed with exit code 101;
last 10 log lines:
> cargo build $cargo_release -j "$NIX_BUILD_CORES" --message-format=$cargo_message_format --features distro-defaults
> warning: both `/build/dummy-src/.cargo-home/config` and `/build/dummy-src/.cargo-home/config.toml` exist. Using `/build/dummy-src/.cargo-home/config`
> error: rustc 1.78.0 is not supported by the following packages:
> bitstream-io@2.4.2 requires rustc 1.79
> ravif@0.11.7 requires rustc 1.79
> Either upgrade rustc or select compatible dependency versions with
> `cargo update <name>@<current-ver> --precise <compatible-ver>`
> where `<compatible-ver>` is the latest version supporting rustc 1.78.0
>
> [naersk] cargo returned with exit code 101, exiting
Are you familiar on how I can build with Naersk using a custom tool chain?