Skip to content

Using extraPackages for cargo plugins #443

@DavSanchez

Description

@DavSanchez

Hi! Apologies if this should be obvious, but I'm having trouble getting extraPackages (#430) to work on a certain setup. Suppose that I have a custom hook defined like this:

# ...
custom-hook = {
  enable = true;
  name = "tests";
  entry = "${pkgs.gnumake}/bin/make -C somedir some-make-target";
  language = "rust";
  pass_filenames = false;
  extraPackages = with pkgs; [
    rustToolchain # Created with fenix, working for building the package
    cargo-deny
    git
  ] ++ lib.optionals stdenv.isDarwin [
    libiconv
  ];
};
# ...

And the make target runs cargo deny then cargo run and then git. I am having trouble for cargo to detect that it has the cargo-deny plugin, as if for example I try to run cargo run -- <CARGO_DENY_OUTPUT> the contents of CARGO_DENY_OUTPUT are actually 'error: no such command: "deny" Did you mean "bench"? View all installed commands with "cargo --list" Find a package to install "deny" with "cargo search cargo-deny" '.

What could be missing? Do you have any way to help me troubleshoot this?

Thanks a lot!

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions