NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
16.48k stars 12.97k forks source link

Update request: cargo-insta 1.33.0 → 1.39.0 #317404

Open MichaelOultram-pexip opened 1 month ago

MichaelOultram-pexip commented 1 month ago

Suspected issue It appears that this package should have been updated automatically by https://github.com/nix-community/nixpkgs-update, but this has been failing since 1.33.0 as the Cargo.lock file has been removed from the repo.

https://nixpkgs-update-logs.nix-community.org/cargo-insta/2024-06-05.log https://github.com/mitsuhiko/insta/pull/410

Notify maintainers

@figsoda @oxalica @matthiasbeyer


Note for maintainers: Please tag this issue in your PR.


Add a :+1: reaction to issues you find important.

oxalica commented 1 month ago

The upstream lockfile seems outdated, we may need to manually lock it in nixpkgs which may not be ideal. I opened https://github.com/mitsuhiko/insta/issues/498

emilazy commented 5 days ago

Would it be acceptable if I PR’d an update with a vendored lock file for now, pending resolution of https://github.com/mitsuhiko/insta/issues/498? The current version is missing features I’d like to use, but I don’t really know what the standards are for Rust packaging in Nixpkgs.

MichaelOultram-pexip commented 4 days ago

@emilazy I ended up using the version from crates.io as a temporary fix:

{
  lib,
  rustPlatform,
  fetchCrate,
}:
rustPlatform.buildRustPackage rec {
  pname = "cargo-insta";
  version = "1.39.0";

  src = fetchCrate {
    inherit pname version;
    hash = "sha256-LUgiTIVWjxPTCQ1gZq5zL2UMxnEfC09w9xudn/9AUwM=";
  };

  cargoHash = "sha256-FH1d8sub8oqUnEr7oO6vofdLoL6KIHgOuF3Exar75t0=";

  meta = with lib; {
    description = "A Cargo subcommand for snapshot testing";
    mainProgram = "cargo-insta";
    homepage = "https://github.com/mitsuhiko/insta";
    changelog = "https://github.com/mitsuhiko/insta/blob/${version}/CHANGELOG.md";
    license = licenses.asl20;
    maintainers = with maintainers; [figsoda oxalica matthiasbeyer];
  };
}