nixpkgs/pkgs/by-name/ca/cargo-insta/package.nix
aleksana 571c71e6f7 treewide: migrate packages to pkgs/by-name, take 1
We are migrating packages that meet below requirements:

1. using `callPackage`
2. called path is a directory
3. overriding set is empty (`{ }`)
4. not containing path expressions other than relative path (to
makenixpkgs-vet happy)
5. not referenced by nix files outside of the directory, other
than`pkgs/top-level/all-packages.nix`
6. not referencing nix files outside of the directory
7. not referencing `default.nix` (since it's changed to `package.nix`)
8. `outPath` doesn't change after migration

The tool is here: https://github.com/Aleksanaa/by-name-migrate.
2024-11-09 20:04:51 +08:00

35 lines
941 B
Nix

{ lib
, rustPlatform
, fetchFromGitHub
}:
rustPlatform.buildRustPackage rec {
pname = "cargo-insta";
version = "1.40";
src = fetchFromGitHub {
owner = "mitsuhiko";
repo = "insta";
rev = "83f33653b687c84823fe6af00806107e1dd4f4b8";
hash = "sha256-eau5h75oZpxufTrf0fLHfr+3TIOFXB/kSgHX+o2GtiE=";
};
cargoHash = "sha256-OqM8SERSWHtbvW6SZfM7lOrQZu66uzsv5wiD3Iqaf3s=";
checkFlags = [
# Depends on `rustfmt` and does not matter for packaging.
"--skip=utils::test_format_rust_expression"
# Requires networking
"--skip=test_force_update_snapshots"
];
meta = with lib; {
description = "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 ];
};
}