How do I pin the pkg version on Nix?

I want to edit Replit.nix and pin the pkg version.
I want to specify the version of Cargo.
current replit.nix:

{ pkgs }: {
    deps = [
      pkgs.rustup
      pkgs.rustc
      pkgs.rustfmt
      pkgs.cargo
      pkgs.cargo-edit
      pkgs.rust-analyzer
    ];
}

Please help me.

pkgs.cargo-X_X_X is the format I think, here is a related nix forum post

1 Like

You need to make sure that the version is available on Nix first though, just use the search feature on Nix.

2 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.