From 2b1d01d4553ef14e1c5be10f46a16320a41aeead Mon Sep 17 00:00:00 2001 From: Gaetan Lepage Date: Tue, 18 Jul 2023 08:44:03 +0200 Subject: [PATCH] rye: 0.6.0 -> 0.11.0 --- pkgs/development/tools/rye/Cargo.lock | 274 +++++++++++++++++++++++-- pkgs/development/tools/rye/default.nix | 25 ++- pkgs/top-level/all-packages.nix | 5 +- 3 files changed, 270 insertions(+), 34 deletions(-) diff --git a/pkgs/development/tools/rye/Cargo.lock b/pkgs/development/tools/rye/Cargo.lock index c528a5ec6094..23192dcfe6bb 100644 --- a/pkgs/development/tools/rye/Cargo.lock +++ b/pkgs/development/tools/rye/Cargo.lock @@ -34,7 +34,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d9e4dfef09bebad6d85efa8b6e1b2f7a809c4419d7135ab573c4fd133c0e8ead" dependencies = [ "age-core", - "base64", + "base64 0.13.1", "bech32", "chacha20poly1305", "cookie-factory", @@ -61,7 +61,7 @@ version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e3d2e815ac879dc23c1139e720d21c6cd4d1276345c772587285d965a69b8f32" dependencies = [ - "base64", + "base64 0.13.1", "chacha20poly1305", "cookie-factory", "hkdf", @@ -72,6 +72,17 @@ dependencies = [ "sha2", ] +[[package]] +name = "ahash" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fcb51a0695d8f838b1ee009b3fbf66bda078cd64590202a864a8f3e8c4315c47" +dependencies = [ + "getrandom 0.2.9", + "once_cell", + "version_check", +] + [[package]] name = "aho-corasick" version = "0.7.20" @@ -138,6 +149,12 @@ version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" +[[package]] +name = "base64" +version = "0.21.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "604178f6c5c21f02dc555784810edfb88d34ac2c73b2eae109655649ee73ce3d" + [[package]] name = "bech32" version = "0.9.1" @@ -246,6 +263,26 @@ dependencies = [ "zeroize", ] +[[package]] +name = "charset" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "18e9079d1a12a2cc2bffb5db039c43661836ead4082120d5844f02555aca2d46" +dependencies = [ + "base64 0.13.1", + "encoding_rs", +] + +[[package]] +name = "chumsky" +version = "0.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23170228b96236b5a7299057ac284a321457700bc8c41a4476052f0f4ba5349d" +dependencies = [ + "hashbrown", + "stacker", +] + [[package]] name = "cipher" version = "0.4.4" @@ -259,9 +296,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.2.7" +version = "4.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34d21f9bf1b425d2968943631ec91202fe5e837264063503708b83013f8fc938" +checksum = "2686c4115cb0810d9a984776e197823d08ec94f176549a89a9efded477c456dc" dependencies = [ "clap_builder", "clap_derive", @@ -270,9 +307,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.2.7" +version = "4.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "914c8c79fb560f238ef6429439a30023c862f7a28e688c58f7203f12b29970bd" +checksum = "2e53afce1efce6ed1f633cf0e57612fe51db54a1ee4fd8f8503d078fe02d69ae" dependencies = [ "anstyle", "bitflags", @@ -291,9 +328,9 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.2.0" +version = "4.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f9644cd56d6b87dbe899ef8b053e331c0637664e9e21a33dfcdc36093f5c5c4" +checksum = "b8cd2b2a819ad6eec39e8f1d6b53001af1e5469f8c177579cdaeb313115b825f" dependencies = [ "heck", "proc-macro2", @@ -303,9 +340,15 @@ dependencies = [ [[package]] name = "clap_lex" -version = "0.4.1" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a2dd5a6fe8c6e3502f568a6353e5273bbb15193ad9a89e457b9970798efbea1" +checksum = "2da6da31387c7e4ef160ffab6d5e7f00c42626fe39aea70a7b0f1773f7dd6c1b" + +[[package]] +name = "configparser" +version = "3.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5458d9d1a587efaf5091602c59d299696a3877a439c8f6d461a2d3cce11df87a" [[package]] name = "console" @@ -326,6 +369,12 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "396de984970346b0d9e93d1415082923c679e5ae5c3ee3dcbd104f5610af126b" +[[package]] +name = "core-foundation-sys" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e496a50fda8aacccc86d7529e2c1e0892dbd0f898a6b5645b5561b89c3210efa" + [[package]] name = "cpufeatures" version = "0.2.7" @@ -454,6 +503,12 @@ dependencies = [ "parking_lot_core", ] +[[package]] +name = "data-encoding" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2e66c9d817f1720209181c316d28635c050fa304f9c79e47a520882661b7308" + [[package]] name = "decompress" version = "0.6.0" @@ -562,6 +617,15 @@ version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f" +[[package]] +name = "encoding_rs" +version = "0.8.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "071a31f4ee85403370b58aca746f01041ede6f0da2730960ad001edc2b71b394" +dependencies = [ + "cfg-if", +] + [[package]] name = "errno" version = "0.3.1" @@ -610,7 +674,7 @@ version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "59a98bbaacea1c0eb6a0876280051b892eb73594fd90cf3b20e9c817029c57d2" dependencies = [ - "toml", + "toml 0.5.11", ] [[package]] @@ -682,6 +746,12 @@ dependencies = [ "percent-encoding", ] +[[package]] +name = "fs-err" +version = "2.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0845fa252299212f0389d64ba26f34fa32cfe41588355f21ed507c59a0f64541" + [[package]] name = "generic-array" version = "0.14.7" @@ -761,6 +831,9 @@ name = "hashbrown" version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" +dependencies = [ + "ahash", +] [[package]] name = "heck" @@ -808,7 +881,7 @@ dependencies = [ "serde", "serde_derive", "thiserror", - "toml", + "toml 0.5.11", "unic-langid", ] @@ -1053,6 +1126,17 @@ dependencies = [ "cfg-if", ] +[[package]] +name = "mailparse" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b56570f5f8c0047260d1c8b5b331f62eb9c660b9dd4071a8c46f8c7d3f280aa" +dependencies = [ + "charset", + "data-encoding", + "quoted_printable", +] + [[package]] name = "memchr" version = "2.5.0" @@ -1061,9 +1145,9 @@ checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" [[package]] name = "minijinja" -version = "0.31.1" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b1dbc390e4447b2500c4071d7bc2a808cf07e925bae6b92db8a3c3eae773c58" +checksum = "1f75e6f2b03d9292f6e18aaeeda21d58c91f6943a58ea19a2e8672dcf9d91d5b" dependencies = [ "serde", "serde_json", @@ -1093,6 +1177,21 @@ dependencies = [ "adler", ] +[[package]] +name = "monotrail-utils" +version = "0.0.1" +source = "git+https://github.com/konstin/poc-monotrail#596c51ed1955ada7117b09b526eba6140cbdc288" +dependencies = [ + "anyhow", + "fs-err", + "pep508_rs", + "serde", + "serde_json", + "toml 0.7.3", + "tracing", + "unscanny", +] + [[package]] name = "nix" version = "0.26.2" @@ -1121,6 +1220,15 @@ dependencies = [ "minimal-lexical", ] +[[package]] +name = "ntapi" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e8a3895c6391c39d7fe7ebc444a87eb2991b2a0bc718fdabd071eec617fc68e4" +dependencies = [ + "winapi", +] + [[package]] name = "number_prefix" version = "0.4.0" @@ -1222,6 +1330,7 @@ checksum = "fe1d15693a11422cfa7d401b00dc9ae9fb8edbfbcb711a77130663f4ddf67650" dependencies = [ "lazy_static", "regex", + "serde", "tracing", "unicode-width", ] @@ -1235,6 +1344,7 @@ dependencies = [ "once_cell", "pep440_rs", "regex", + "serde", "thiserror", "tracing", "unicode-width", @@ -1344,6 +1454,31 @@ dependencies = [ "unicode-ident", ] +[[package]] +name = "psm" +version = "0.1.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5787f7cda34e3033a72192c018bc5883100330f362ef279a8cbccfce8bb4e874" +dependencies = [ + "cc", +] + +[[package]] +name = "python-pkginfo" +version = "0.5.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e23988cc0f9fbe3c42ae6e399daa7c0273d6013784b744b1742c6e1060611b0e" +dependencies = [ + "flate2", + "fs-err", + "mailparse", + "rfc2047-decoder", + "serde", + "tar", + "thiserror", + "zip", +] + [[package]] name = "quote" version = "1.0.27" @@ -1353,6 +1488,12 @@ dependencies = [ "proc-macro2", ] +[[package]] +name = "quoted_printable" +version = "0.4.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a3866219251662ec3b26fc217e3e05bf9c4f84325234dfb96bf0bf840889e49" + [[package]] name = "rand" version = "0.7.3" @@ -1444,9 +1585,21 @@ dependencies = [ [[package]] name = "regex" -version = "1.8.1" +version = "1.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af83e617f331cc6ae2da5443c602dfa5af81e517212d9d611a5b3ba1777b5370" +checksum = "b2eae68fc220f7cf2532e4494aded17545fce192d59cd996e0fe7887f4ceb575" +dependencies = [ + "aho-corasick 1.0.1", + "memchr", + "regex-automata", + "regex-syntax", +] + +[[package]] +name = "regex-automata" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "39354c10dd07468c2e73926b23bb9c2caca74c5501e38a35da70406f1d923310" dependencies = [ "aho-corasick 1.0.1", "memchr", @@ -1455,9 +1608,9 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.7.1" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5996294f19bd3aae0453a862ad728f60e6600695733dd5df01da90c54363a3c" +checksum = "e5ea92a5b6195c6ef2a0295ea818b312502c6fc94dde986c5553242e18fd4ce2" [[package]] name = "reword" @@ -1468,6 +1621,20 @@ dependencies = [ "unicode-segmentation", ] +[[package]] +name = "rfc2047-decoder" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "61fc4b4e52897c3e30b12b7e9b04461215b647fbe66f6def60dd8edbce14ec2e" +dependencies = [ + "base64 0.21.2", + "charset", + "chumsky", + "memchr", + "quoted_printable", + "thiserror", +] + [[package]] name = "rust-embed" version = "6.6.1" @@ -1530,13 +1697,14 @@ dependencies = [ [[package]] name = "rye" -version = "0.6.0" +version = "0.11.0" dependencies = [ "age", "anyhow", "bzip2", "clap", "clap_complete", + "configparser", "console", "curl", "decompress", @@ -1550,11 +1718,13 @@ dependencies = [ "license", "memchr", "minijinja", + "monotrail-utils", "nix", "once_cell", "pathdiff", "pep440_rs", "pep508_rs", + "python-pkginfo", "regex", "same-file", "self-replace", @@ -1564,6 +1734,7 @@ dependencies = [ "shlex", "simple-home-dir", "slug", + "sysinfo", "tar", "tempfile", "toml_edit", @@ -1637,9 +1808,9 @@ dependencies = [ [[package]] name = "self-replace" -version = "1.3.2" +version = "1.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f21725f004568aa515e4699949b3453e0603a11e407e88c6fe0e6d548a4a20e" +checksum = "a0e7c919783db74b5995f13506069227e4721d388bea4a8ac3055acac864ac16" dependencies = [ "fastrand", "tempfile", @@ -1683,6 +1854,15 @@ dependencies = [ "serde", ] +[[package]] +name = "serde_spanned" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93107647184f6027e3b7dcb2e11034cf95ffa1e3a682c67951963ac69c1c007d" +dependencies = [ + "serde", +] + [[package]] name = "sha2" version = "0.10.6" @@ -1740,6 +1920,19 @@ dependencies = [ "winapi", ] +[[package]] +name = "stacker" +version = "0.1.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c886bd4480155fd3ef527d45e9ac8dd7118a898a46530b7b94c3e21866259fce" +dependencies = [ + "cc", + "cfg-if", + "libc", + "psm", + "winapi", +] + [[package]] name = "static_assertions" version = "1.1.0" @@ -1780,6 +1973,20 @@ dependencies = [ "unicode-ident", ] +[[package]] +name = "sysinfo" +version = "0.29.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "751e810399bba86e9326f5762b7f32ac5a085542df78da6a78d94e07d14d7c11" +dependencies = [ + "cfg-if", + "core-foundation-sys", + "libc", + "ntapi", + "once_cell", + "winapi", +] + [[package]] name = "tar" version = "0.4.38" @@ -1894,11 +2101,26 @@ dependencies = [ "serde", ] +[[package]] +name = "toml" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b403acf6f2bb0859c93c7f0d967cb4a75a7ac552100f9322faf64dc047669b21" +dependencies = [ + "serde", + "serde_spanned", + "toml_datetime", + "toml_edit", +] + [[package]] name = "toml_datetime" version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3ab8ed2edee10b50132aed5f331333428b011c99402b5a534154ed15746f9622" +dependencies = [ + "serde", +] [[package]] name = "toml_edit" @@ -1907,6 +2129,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "239410c8609e8125456927e6707163a3b1fdb40561e4b803bc041f466ccfdc13" dependencies = [ "indexmap", + "serde", + "serde_spanned", "toml_datetime", "winnow", ] @@ -2021,6 +2245,12 @@ dependencies = [ "subtle", ] +[[package]] +name = "unscanny" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e9df2af067a7953e9c3831320f35c1cc0600c30d44d9f7a12b01db1cd88d6b47" + [[package]] name = "url" version = "2.3.1" @@ -2318,9 +2548,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7e92305c174683d78035cbf1b70e18db6329cc0f1b9cae0a52ca90bf5bfe7125" dependencies = [ "byteorder", + "bzip2", "crc32fast", "crossbeam-utils", "flate2", + "time", ] [[package]] diff --git a/pkgs/development/tools/rye/default.nix b/pkgs/development/tools/rye/default.nix index 7d1eb3c59714..63873b7a6798 100644 --- a/pkgs/development/tools/rye/default.nix +++ b/pkgs/development/tools/rye/default.nix @@ -1,30 +1,29 @@ { lib -, fetchFromGitHub , rustPlatform -, git -, openssl +, fetchFromGitHub , pkg-config +, openssl , stdenv +, Libsystem , SystemConfiguration }: rustPlatform.buildRustPackage rec { pname = "rye"; - version = "0.6.0"; + version = "0.11.0"; src = fetchFromGitHub { owner = "mitsuhiko"; repo = pname; - rev = version; - # One of the tests runs git command so we need .git directory there - leaveDotGit = true; - sha256 = "llm4aqMfaVf3VbHudWjb9V2GFgJpP9S211Ui7xXdrAU="; + rev = "refs/tags/${version}"; + hash = "sha256-00Q+qvK1fq9CGb6umtCiUJZZ1M5LMxiSIM3/s7eOumM="; }; cargoLock = { lockFile = ./Cargo.lock; outputHashes = { "dialoguer-0.10.4" = "sha256-WDqUKOu7Y0HElpPxf2T8EpzAY3mY8sSn9lf0V0jyAFc="; + "monotrail-utils-0.0.1" = "sha256-4x5jnXczXnToU0QXpFalpG5A+7jeyaEBt8vBwxbFCKQ="; }; }; @@ -35,12 +34,16 @@ rustPlatform.buildRustPackage rec { nativeBuildInputs = [ pkg-config ]; buildInputs = [ - git openssl ] - ++ lib.optional stdenv.isDarwin SystemConfiguration; + ++ lib.optionals stdenv.isDarwin [ + Libsystem + SystemConfiguration + ]; - nativeCheckInputs = [ git ]; + checkFlags = [ + "--skip=utils::test_is_inside_git_work_tree" + ]; meta = with lib; { description = "A tool to easily manage python dependencies and environments"; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 8843f7d8664c..7e75a5bbac46 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -19650,8 +19650,9 @@ with pkgs; rufo = callPackage ../development/tools/rufo { }; - rye = callPackage ../development/tools/rye { - inherit (darwin.apple_sdk.frameworks) SystemConfiguration; + rye = darwin.apple_sdk_11_0.callPackage ../development/tools/rye { + inherit (darwin.apple_sdk_11_0) Libsystem; + inherit (darwin.apple_sdk_11_0.frameworks) SystemConfiguration; }; samurai = callPackage ../development/tools/build-managers/samurai { };