From 71c0dbd5a4963c1fc24dc3a20628cfc3ac95b033 Mon Sep 17 00:00:00 2001 From: oxalica Date: Thu, 18 Jun 2020 19:13:04 +0800 Subject: [PATCH] cargo-insta: init at 0.16.0 --- .../tools/rust/cargo-insta/cargo-lock.patch | 780 ++++++++++++++++++ .../tools/rust/cargo-insta/default.nix | 27 + .../cargo-insta/ignore-rustfmt-test.patch | 10 + pkgs/top-level/all-packages.nix | 1 + 4 files changed, 818 insertions(+) create mode 100644 pkgs/development/tools/rust/cargo-insta/cargo-lock.patch create mode 100644 pkgs/development/tools/rust/cargo-insta/default.nix create mode 100644 pkgs/development/tools/rust/cargo-insta/ignore-rustfmt-test.patch diff --git a/pkgs/development/tools/rust/cargo-insta/cargo-lock.patch b/pkgs/development/tools/rust/cargo-insta/cargo-lock.patch new file mode 100644 index 00000000000..96f7d9ffb66 --- /dev/null +++ b/pkgs/development/tools/rust/cargo-insta/cargo-lock.patch @@ -0,0 +1,780 @@ +--- a/Cargo.lock ++++ b/Cargo.lock +@@ -0,0 +1,777 @@ ++# This file is automatically @generated by Cargo. ++# It is not intended for manual editing. ++[[package]] ++name = "addr2line" ++version = "0.12.1" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "a49806b9dadc843c61e7c97e72490ad7f7220ae249012fbda9ad0609457c0543" ++dependencies = [ ++ "gimli", ++] ++ ++[[package]] ++name = "adler32" ++version = "1.1.0" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "567b077b825e468cc974f0020d4082ee6e03132512f207ef1a02fd5d00d1f32d" ++ ++[[package]] ++name = "aho-corasick" ++version = "0.7.10" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "8716408b8bc624ed7f65d223ddb9ac2d044c0547b6fa4b0d554f3a9540496ada" ++dependencies = [ ++ "memchr", ++] ++ ++[[package]] ++name = "ansi_term" ++version = "0.11.0" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "ee49baf6cb617b853aa8d93bf420db2383fab46d314482ca2803b40d5fde979b" ++dependencies = [ ++ "winapi", ++] ++ ++[[package]] ++name = "atty" ++version = "0.2.14" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" ++dependencies = [ ++ "hermit-abi", ++ "libc", ++ "winapi", ++] ++ ++[[package]] ++name = "autocfg" ++version = "1.0.0" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "f8aac770f1885fd7e387acedd76065302551364496e46b3dd00860b2f8359b9d" ++ ++[[package]] ++name = "backtrace" ++version = "0.3.49" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "05100821de9e028f12ae3d189176b41ee198341eb8f369956407fea2f5cc666c" ++dependencies = [ ++ "addr2line", ++ "cfg-if", ++ "libc", ++ "miniz_oxide", ++ "object", ++ "rustc-demangle", ++] ++ ++[[package]] ++name = "base64" ++version = "0.10.1" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "0b25d992356d2eb0ed82172f5248873db5560c4721f564b13cb5193bda5e668e" ++dependencies = [ ++ "byteorder", ++] ++ ++[[package]] ++name = "bitflags" ++version = "1.2.1" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693" ++ ++[[package]] ++name = "block-buffer" ++version = "0.7.3" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "c0940dc441f31689269e10ac70eb1002a3a1d3ad1390e030043662eb7fe4688b" ++dependencies = [ ++ "block-padding", ++ "byte-tools", ++ "byteorder", ++ "generic-array", ++] ++ ++[[package]] ++name = "block-padding" ++version = "0.1.5" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "fa79dedbb091f449f1f39e53edf88d5dbe95f895dae6135a8d7b881fb5af73f5" ++dependencies = [ ++ "byte-tools", ++] ++ ++[[package]] ++name = "bstr" ++version = "0.2.13" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "31accafdb70df7871592c058eca3985b71104e15ac32f64706022c58867da931" ++dependencies = [ ++ "memchr", ++] ++ ++[[package]] ++name = "byte-tools" ++version = "0.3.1" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "e3b5ca7a04898ad4bcd41c90c5285445ff5b791899bb1b0abdd2a2aa791211d7" ++ ++[[package]] ++name = "byteorder" ++version = "1.3.4" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "08c48aae112d48ed9f069b33538ea9e3e90aa263cfa3d1c24309612b1f7472de" ++ ++[[package]] ++name = "cargo-insta" ++version = "0.16.0" ++dependencies = [ ++ "clap", ++ "console", ++ "difference", ++ "glob", ++ "insta", ++ "proc-macro2", ++ "serde", ++ "serde_json", ++ "structopt", ++ "syn", ++ "walkdir", ++] ++ ++[[package]] ++name = "cfg-if" ++version = "0.1.10" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" ++ ++[[package]] ++name = "clap" ++version = "2.33.1" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "bdfa80d47f954d53a35a64987ca1422f495b8d6483c0fe9f7117b36c2a792129" ++dependencies = [ ++ "ansi_term", ++ "atty", ++ "bitflags", ++ "strsim", ++ "textwrap", ++ "unicode-width", ++ "vec_map", ++] ++ ++[[package]] ++name = "clicolors-control" ++version = "1.0.1" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "90082ee5dcdd64dc4e9e0d37fbf3ee325419e39c0092191e0393df65518f741e" ++dependencies = [ ++ "atty", ++ "lazy_static", ++ "libc", ++ "winapi", ++] ++ ++[[package]] ++name = "console" ++version = "0.10.3" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "2586208b33573b7f76ccfbe5adb076394c88deaf81b84d7213969805b0a952a7" ++dependencies = [ ++ "clicolors-control", ++ "encode_unicode", ++ "lazy_static", ++ "libc", ++ "regex", ++ "terminal_size", ++ "termios", ++ "unicode-width", ++ "winapi", ++] ++ ++[[package]] ++name = "crossbeam-utils" ++version = "0.7.2" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "c3c7c73a2d1e9fc0886a08b93e98eb643461230d5f1925e4036204d5f2e261a8" ++dependencies = [ ++ "autocfg", ++ "cfg-if", ++ "lazy_static", ++] ++ ++[[package]] ++name = "difference" ++version = "2.0.0" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "524cbf6897b527295dff137cec09ecf3a05f4fddffd7dfcd1585403449e74198" ++ ++[[package]] ++name = "digest" ++version = "0.8.1" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "f3d0c8c8752312f9713efd397ff63acb9f85585afbf179282e720e7704954dd5" ++dependencies = [ ++ "generic-array", ++] ++ ++[[package]] ++name = "dtoa" ++version = "0.4.6" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "134951f4028bdadb9b84baf4232681efbf277da25144b9b0ad65df75946c422b" ++ ++[[package]] ++name = "encode_unicode" ++version = "0.3.6" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f" ++ ++[[package]] ++name = "fake-simd" ++version = "0.1.2" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "e88a8acf291dafb59c2d96e8f59828f3838bb1a70398823ade51a84de6a6deed" ++ ++[[package]] ++name = "fnv" ++version = "1.0.7" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" ++ ++[[package]] ++name = "generic-array" ++version = "0.12.3" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "c68f0274ae0e023facc3c97b2e00f076be70e254bc851d972503b328db79b2ec" ++dependencies = [ ++ "typenum", ++] ++ ++[[package]] ++name = "gimli" ++version = "0.21.0" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "bcc8e0c9bce37868955864dbecd2b1ab2bdf967e6f28066d65aaac620444b65c" ++ ++[[package]] ++name = "glob" ++version = "0.3.0" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "9b919933a397b79c37e33b77bb2aa3dc8eb6e165ad809e58ff75bc7db2e34574" ++ ++[[package]] ++name = "globset" ++version = "0.4.5" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "7ad1da430bd7281dde2576f44c84cc3f0f7b475e7202cd503042dff01a8c8120" ++dependencies = [ ++ "aho-corasick", ++ "bstr", ++ "fnv", ++ "log", ++ "regex", ++] ++ ++[[package]] ++name = "globwalk" ++version = "0.8.0" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "178270263374052c40502e9f607134947de75302c1348d1a0e31db67c1691446" ++dependencies = [ ++ "bitflags", ++ "ignore", ++ "walkdir", ++] ++ ++[[package]] ++name = "heck" ++version = "0.3.1" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "20564e78d53d2bb135c343b3f47714a56af2061f1c928fdb541dc7b9fdd94205" ++dependencies = [ ++ "unicode-segmentation", ++] ++ ++[[package]] ++name = "hermit-abi" ++version = "0.1.14" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "b9586eedd4ce6b3c498bc3b4dd92fc9f11166aa908a914071953768066c67909" ++dependencies = [ ++ "libc", ++] ++ ++[[package]] ++name = "ignore" ++version = "0.4.16" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "22dcbf2a4a289528dbef21686354904e1c694ac642610a9bff9e7df730d9ec72" ++dependencies = [ ++ "crossbeam-utils", ++ "globset", ++ "lazy_static", ++ "log", ++ "memchr", ++ "regex", ++ "same-file", ++ "thread_local", ++ "walkdir", ++ "winapi-util", ++] ++ ++[[package]] ++name = "insta" ++version = "0.16.0" ++dependencies = [ ++ "backtrace", ++ "console", ++ "difference", ++ "globwalk", ++ "lazy_static", ++ "pest", ++ "pest_derive", ++ "ron", ++ "serde", ++ "serde_json", ++ "serde_yaml", ++] ++ ++[[package]] ++name = "itoa" ++version = "0.4.6" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "dc6f3ad7b9d11a0c00842ff8de1b60ee58661048eb8049ed33c73594f359d7e6" ++ ++[[package]] ++name = "lazy_static" ++version = "1.4.0" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" ++ ++[[package]] ++name = "libc" ++version = "0.2.71" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "9457b06509d27052635f90d6466700c65095fdf75409b3fbdd903e988b886f49" ++ ++[[package]] ++name = "linked-hash-map" ++version = "0.5.3" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "8dd5a6d5999d9907cda8ed67bbd137d3af8085216c2ac62de5be860bd41f304a" ++ ++[[package]] ++name = "log" ++version = "0.4.8" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "14b6052be84e6b71ab17edffc2eeabf5c2c3ae1fdb464aae35ac50c67a44e1f7" ++dependencies = [ ++ "cfg-if", ++] ++ ++[[package]] ++name = "maplit" ++version = "1.0.2" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "3e2e65a1a2e43cfcb47a895c4c8b10d1f4a61097f9f254f183aee60cad9c651d" ++ ++[[package]] ++name = "memchr" ++version = "2.3.3" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "3728d817d99e5ac407411fa471ff9800a778d88a24685968b36824eaf4bee400" ++ ++[[package]] ++name = "miniz_oxide" ++version = "0.3.7" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "791daaae1ed6889560f8c4359194f56648355540573244a5448a83ba1ecc7435" ++dependencies = [ ++ "adler32", ++] ++ ++[[package]] ++name = "object" ++version = "0.20.0" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "1ab52be62400ca80aa00285d25253d7f7c437b7375c4de678f5405d3afe82ca5" ++ ++[[package]] ++name = "opaque-debug" ++version = "0.2.3" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "2839e79665f131bdb5782e51f2c6c9599c133c6098982a54c794358bf432529c" ++ ++[[package]] ++name = "pest" ++version = "2.1.3" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "10f4872ae94d7b90ae48754df22fd42ad52ce740b8f370b03da4835417403e53" ++dependencies = [ ++ "ucd-trie", ++] ++ ++[[package]] ++name = "pest_derive" ++version = "2.1.0" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "833d1ae558dc601e9a60366421196a8d94bc0ac980476d0b67e1d0988d72b2d0" ++dependencies = [ ++ "pest", ++ "pest_generator", ++] ++ ++[[package]] ++name = "pest_generator" ++version = "2.1.3" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "99b8db626e31e5b81787b9783425769681b347011cc59471e33ea46d2ea0cf55" ++dependencies = [ ++ "pest", ++ "pest_meta", ++ "proc-macro2", ++ "quote", ++ "syn", ++] ++ ++[[package]] ++name = "pest_meta" ++version = "2.1.3" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "54be6e404f5317079812fc8f9f5279de376d8856929e21c184ecf6bbd692a11d" ++dependencies = [ ++ "maplit", ++ "pest", ++ "sha-1", ++] ++ ++[[package]] ++name = "proc-macro-error" ++version = "1.0.2" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "98e9e4b82e0ef281812565ea4751049f1bdcdfccda7d3f459f2e138a40c08678" ++dependencies = [ ++ "proc-macro-error-attr", ++ "proc-macro2", ++ "quote", ++ "syn", ++ "version_check", ++] ++ ++[[package]] ++name = "proc-macro-error-attr" ++version = "1.0.2" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "4f5444ead4e9935abd7f27dc51f7e852a0569ac888096d5ec2499470794e2e53" ++dependencies = [ ++ "proc-macro2", ++ "quote", ++ "syn", ++ "syn-mid", ++ "version_check", ++] ++ ++[[package]] ++name = "proc-macro2" ++version = "1.0.18" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "beae6331a816b1f65d04c45b078fd8e6c93e8071771f41b8163255bbd8d7c8fa" ++dependencies = [ ++ "unicode-xid", ++] ++ ++[[package]] ++name = "quote" ++version = "1.0.7" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "aa563d17ecb180e500da1cfd2b028310ac758de548efdd203e18f283af693f37" ++dependencies = [ ++ "proc-macro2", ++] ++ ++[[package]] ++name = "regex" ++version = "1.3.9" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "9c3780fcf44b193bc4d09f36d2a3c87b251da4a046c87795a0d35f4f927ad8e6" ++dependencies = [ ++ "aho-corasick", ++ "memchr", ++ "regex-syntax", ++ "thread_local", ++] ++ ++[[package]] ++name = "regex-syntax" ++version = "0.6.18" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "26412eb97c6b088a6997e05f69403a802a92d520de2f8e63c2b65f9e0f47c4e8" ++ ++[[package]] ++name = "ron" ++version = "0.5.1" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "2ece421e0c4129b90e4a35b6f625e472e96c552136f5093a2f4fa2bbb75a62d5" ++dependencies = [ ++ "base64", ++ "bitflags", ++ "serde", ++] ++ ++[[package]] ++name = "rustc-demangle" ++version = "0.1.16" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "4c691c0e608126e00913e33f0ccf3727d5fc84573623b8d65b2df340b5201783" ++ ++[[package]] ++name = "ryu" ++version = "1.0.5" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "71d301d4193d031abdd79ff7e3dd721168a9572ef3fe51a1517aba235bd8f86e" ++ ++[[package]] ++name = "same-file" ++version = "1.0.6" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" ++dependencies = [ ++ "winapi-util", ++] ++ ++[[package]] ++name = "serde" ++version = "1.0.112" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "736aac72d1eafe8e5962d1d1c3d99b0df526015ba40915cb3c49d042e92ec243" ++dependencies = [ ++ "serde_derive", ++] ++ ++[[package]] ++name = "serde_derive" ++version = "1.0.112" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "bf0343ce212ac0d3d6afd9391ac8e9c9efe06b533c8d33f660f6390cc4093f57" ++dependencies = [ ++ "proc-macro2", ++ "quote", ++ "syn", ++] ++ ++[[package]] ++name = "serde_json" ++version = "1.0.55" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "ec2c5d7e739bc07a3e73381a39d61fdb5f671c60c1df26a130690665803d8226" ++dependencies = [ ++ "itoa", ++ "ryu", ++ "serde", ++] ++ ++[[package]] ++name = "serde_yaml" ++version = "0.8.13" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "ae3e2dd40a7cdc18ca80db804b7f461a39bb721160a85c9a1fa30134bf3c02a5" ++dependencies = [ ++ "dtoa", ++ "linked-hash-map", ++ "serde", ++ "yaml-rust", ++] ++ ++[[package]] ++name = "sha-1" ++version = "0.8.2" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "f7d94d0bede923b3cea61f3f1ff57ff8cdfd77b400fb8f9998949e0cf04163df" ++dependencies = [ ++ "block-buffer", ++ "digest", ++ "fake-simd", ++ "opaque-debug", ++] ++ ++[[package]] ++name = "strsim" ++version = "0.8.0" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a" ++ ++[[package]] ++name = "structopt" ++version = "0.3.15" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "de2f5e239ee807089b62adce73e48c625e0ed80df02c7ab3f068f5db5281065c" ++dependencies = [ ++ "clap", ++ "lazy_static", ++ "structopt-derive", ++] ++ ++[[package]] ++name = "structopt-derive" ++version = "0.4.8" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "510413f9de616762a4fbeab62509bf15c729603b72d7cd71280fbca431b1c118" ++dependencies = [ ++ "heck", ++ "proc-macro-error", ++ "proc-macro2", ++ "quote", ++ "syn", ++] ++ ++[[package]] ++name = "syn" ++version = "1.0.31" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "b5304cfdf27365b7585c25d4af91b35016ed21ef88f17ced89c7093b43dba8b6" ++dependencies = [ ++ "proc-macro2", ++ "quote", ++ "unicode-xid", ++] ++ ++[[package]] ++name = "syn-mid" ++version = "0.5.0" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "7be3539f6c128a931cf19dcee741c1af532c7fd387baa739c03dd2e96479338a" ++dependencies = [ ++ "proc-macro2", ++ "quote", ++ "syn", ++] ++ ++[[package]] ++name = "terminal_size" ++version = "0.1.12" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "8038f95fc7a6f351163f4b964af631bd26c9e828f7db085f2a84aca56f70d13b" ++dependencies = [ ++ "libc", ++ "winapi", ++] ++ ++[[package]] ++name = "termios" ++version = "0.3.2" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "6f0fcee7b24a25675de40d5bb4de6e41b0df07bc9856295e7e2b3a3600c400c2" ++dependencies = [ ++ "libc", ++] ++ ++[[package]] ++name = "textwrap" ++version = "0.11.0" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060" ++dependencies = [ ++ "unicode-width", ++] ++ ++[[package]] ++name = "thread_local" ++version = "1.0.1" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "d40c6d1b69745a6ec6fb1ca717914848da4b44ae29d9b3080cbee91d72a69b14" ++dependencies = [ ++ "lazy_static", ++] ++ ++[[package]] ++name = "typenum" ++version = "1.12.0" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "373c8a200f9e67a0c95e62a4f52fbf80c23b4381c05a17845531982fa99e6b33" ++ ++[[package]] ++name = "ucd-trie" ++version = "0.1.3" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "56dee185309b50d1f11bfedef0fe6d036842e3fb77413abef29f8f8d1c5d4c1c" ++ ++[[package]] ++name = "unicode-segmentation" ++version = "1.6.0" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "e83e153d1053cbb5a118eeff7fd5be06ed99153f00dbcd8ae310c5fb2b22edc0" ++ ++[[package]] ++name = "unicode-width" ++version = "0.1.7" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "caaa9d531767d1ff2150b9332433f32a24622147e5ebb1f26409d5da67afd479" ++ ++[[package]] ++name = "unicode-xid" ++version = "0.2.0" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "826e7639553986605ec5979c7dd957c7895e93eabed50ab2ffa7f6128a75097c" ++ ++[[package]] ++name = "vec_map" ++version = "0.8.2" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191" ++ ++[[package]] ++name = "version_check" ++version = "0.9.2" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "b5a972e5669d67ba988ce3dc826706fb0a8b01471c088cb0b6110b805cc36aed" ++ ++[[package]] ++name = "walkdir" ++version = "2.3.1" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "777182bc735b6424e1a57516d35ed72cb8019d85c8c9bf536dccb3445c1a2f7d" ++dependencies = [ ++ "same-file", ++ "winapi", ++ "winapi-util", ++] ++ ++[[package]] ++name = "winapi" ++version = "0.3.8" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "8093091eeb260906a183e6ae1abdba2ef5ef2257a21801128899c3fc699229c6" ++dependencies = [ ++ "winapi-i686-pc-windows-gnu", ++ "winapi-x86_64-pc-windows-gnu", ++] ++ ++[[package]] ++name = "winapi-i686-pc-windows-gnu" ++version = "0.4.0" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" ++ ++[[package]] ++name = "winapi-util" ++version = "0.1.5" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" ++dependencies = [ ++ "winapi", ++] ++ ++[[package]] ++name = "winapi-x86_64-pc-windows-gnu" ++version = "0.4.0" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" ++ ++[[package]] ++name = "yaml-rust" ++version = "0.4.4" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "39f0c922f1a334134dc2f7a8b67dc5d25f0735263feec974345ff706bcf20b0d" ++dependencies = [ ++ "linked-hash-map", ++] diff --git a/pkgs/development/tools/rust/cargo-insta/default.nix b/pkgs/development/tools/rust/cargo-insta/default.nix new file mode 100644 index 00000000000..3b21fbf153c --- /dev/null +++ b/pkgs/development/tools/rust/cargo-insta/default.nix @@ -0,0 +1,27 @@ +{ lib, rustPlatform, fetchFromGitHub, runCommand }: + +rustPlatform.buildRustPackage rec { + pname = "cargo-insta"; + version = "0.16.0"; + + src = fetchFromGitHub { + owner = "mitsuhiko"; + repo = "insta"; + rev = version; + sha256 = "1lcbdzh139lhmpz3pyik8nbgrbfc42z9ydz2hkg2lzjdpfdsz3ag"; + }; + + cargoPatches = [ ./cargo-lock.patch ]; + cargoSha256 = "0qjzbcaznnmb0p0r23s82jjbfs5mhhkacg26lf8fq4vvlkr1hsqf"; + + patches = [ ./ignore-rustfmt-test.patch ]; + + cargoBuildFlags = [ "-p cargo-insta" ]; + + meta = with lib; { + description = "A Cargo subcommand for snapshot testing"; + homepage = "https://github.com/mitsuhiko/insta"; + license = licenses.asl20; + maintainers = with lib.maintainers; [ oxalica ]; + }; +} diff --git a/pkgs/development/tools/rust/cargo-insta/ignore-rustfmt-test.patch b/pkgs/development/tools/rust/cargo-insta/ignore-rustfmt-test.patch new file mode 100644 index 00000000000..6c38158d596 --- /dev/null +++ b/pkgs/development/tools/rust/cargo-insta/ignore-rustfmt-test.patch @@ -0,0 +1,10 @@ +--- a/src/runtime.rs ++++ b/src/runtime.rs +@@ -85,6 +85,7 @@ fn format_rust_expression(value: &str) -> Cow<'_, str> { + } + + #[test] ++#[ignore] + fn test_format_rust_expression() { + use crate::assert_snapshot; + assert_snapshot!(format_rust_expression("vec![1,2,3]"), @"vec![1, 2, 3]"); diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 2b75778322f..46bb13bdf1d 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -9225,6 +9225,7 @@ in cargo-inspect = callPackage ../development/tools/rust/cargo-inspect { inherit (darwin.apple_sdk.frameworks) Security; }; + cargo-insta = callPackage ../development/tools/rust/cargo-insta { }; cargo-make = callPackage ../development/tools/rust/cargo-make { inherit (darwin.apple_sdk.frameworks) Security; };