From da5ae1bd60b4c4a9398f38b457b2b15774f1a0d3 Mon Sep 17 00:00:00 2001 From: Diogo Correia Date: Fri, 21 Jun 2024 23:34:56 +0100 Subject: [PATCH 01/65] postgresqlPackages.pgvecto-rs: 0.2.1 -> 0.3.0 --- .../rust/cargo-pgrx/buildPgrxExtension.nix | 5 +- .../tools/rust/cargo-pgrx/default.nix | 6 + ...001-read-clang-flags-from-environment.diff | 8 +- .../0002-std-detect-use-upstream.diff | 25 - .../sql/postgresql/ext/pgvecto-rs/Cargo.lock | 2201 ++++++++--------- .../sql/postgresql/ext/pgvecto-rs/default.nix | 25 +- pkgs/top-level/all-packages.nix | 1 + 7 files changed, 998 insertions(+), 1273 deletions(-) delete mode 100644 pkgs/servers/sql/postgresql/ext/pgvecto-rs/0002-std-detect-use-upstream.diff diff --git a/pkgs/development/tools/rust/cargo-pgrx/buildPgrxExtension.nix b/pkgs/development/tools/rust/cargo-pgrx/buildPgrxExtension.nix index f75bab143936..a3c94a8d6d89 100644 --- a/pkgs/development/tools/rust/cargo-pgrx/buildPgrxExtension.nix +++ b/pkgs/development/tools/rust/cargo-pgrx/buildPgrxExtension.nix @@ -56,6 +56,7 @@ # dependency here. Set to false and provide rustfmt in nativeBuildInputs, if you need it, e.g. # if you include the generated code in the output via postInstall. , useFakeRustfmt ? true +, usePgTestCheckFeature ? true , ... } @ args: let @@ -96,7 +97,7 @@ let pg_ctl stop ''; - argsForBuildRustPackage = builtins.removeAttrs args [ "postgresql" "useFakeRustfmt" ]; + argsForBuildRustPackage = builtins.removeAttrs args [ "postgresql" "useFakeRustfmt" "usePgTestCheckFeature" ]; # so we don't accidentally `(rustPlatform.buildRustPackage argsForBuildRustPackage) // { ... }` because # we forgot parentheses @@ -154,7 +155,7 @@ let RUST_BACKTRACE = "full"; checkNoDefaultFeatures = true; - checkFeatures = (args.checkFeatures or [ ]) ++ [ "pg_test pg${pgrxPostgresMajor}" ]; + checkFeatures = (args.checkFeatures or [ ]) ++ (lib.optionals usePgTestCheckFeature [ "pg_test" ]) ++ [ "pg${pgrxPostgresMajor}" ]; }; in rustPlatform.buildRustPackage finalArgs diff --git a/pkgs/development/tools/rust/cargo-pgrx/default.nix b/pkgs/development/tools/rust/cargo-pgrx/default.nix index 3aa7003b7567..ca7014cf1e3a 100644 --- a/pkgs/development/tools/rust/cargo-pgrx/default.nix +++ b/pkgs/development/tools/rust/cargo-pgrx/default.nix @@ -71,4 +71,10 @@ in hash = "sha256-UHIfwOdXoJvR4Svha6ud0FxahP1wPwUtviUwUnTmLXU="; cargoHash = "sha256-j4HnD8Zt9uhlV5N7ldIy9564o9qFEqs5KfXHmnQ1WEw="; }; + + cargo-pgrx_0_12_0_alpha_1 = generic { + version = "0.12.0-alpha.1"; + hash = "sha256-0m9oaqjU42RYyttkTihADDrRMjr2WoK/8sInZALeHws="; + cargoHash = "sha256-9XTIcpoCnROP63ZTDgMMMmj0kPggiTazKlKQfCgXKzk="; + }; } diff --git a/pkgs/servers/sql/postgresql/ext/pgvecto-rs/0001-read-clang-flags-from-environment.diff b/pkgs/servers/sql/postgresql/ext/pgvecto-rs/0001-read-clang-flags-from-environment.diff index 2b145445cf15..d05a5cd34e16 100644 --- a/pkgs/servers/sql/postgresql/ext/pgvecto-rs/0001-read-clang-flags-from-environment.diff +++ b/pkgs/servers/sql/postgresql/ext/pgvecto-rs/0001-read-clang-flags-from-environment.diff @@ -4,16 +4,16 @@ index 8d822e5..8b7e371 100644 +++ b/crates/c/build.rs @@ -1,9 +1,13 @@ fn main() { - println!("cargo:rerun-if-changed=src/c.h"); - println!("cargo:rerun-if-changed=src/c.c"); + println!("cargo:rerun-if-changed=src/f16.h"); + println!("cargo:rerun-if-changed=src/f16.c"); + println!("cargo:rerun-if-env-changed=BINDGEN_EXTRA_CLANG_ARGS"); cc::Build::new() - .compiler("clang-16") + .compiler("@clang@") - .file("./src/c.c") + .file("./src/f16.c") + // read env var set by rustPlatform.bindgenHook + .try_flags_from_environment("BINDGEN_EXTRA_CLANG_ARGS") + .expect("the BINDGEN_EXTRA_CLANG_ARGS environment variable must be specified and UTF-8") .opt_level(3) .debug(true) - .compile("pgvectorsc"); + .compile("vectorsc"); diff --git a/pkgs/servers/sql/postgresql/ext/pgvecto-rs/0002-std-detect-use-upstream.diff b/pkgs/servers/sql/postgresql/ext/pgvecto-rs/0002-std-detect-use-upstream.diff deleted file mode 100644 index bd20cf6619a7..000000000000 --- a/pkgs/servers/sql/postgresql/ext/pgvecto-rs/0002-std-detect-use-upstream.diff +++ /dev/null @@ -1,25 +0,0 @@ -diff --git a/Cargo.lock b/Cargo.lock -index a52b978..092bc1d 100644 ---- a/Cargo.lock -+++ b/Cargo.lock -@@ -2788,7 +2788,7 @@ checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" - [[package]] - name = "std_detect" - version = "0.1.5" --source = "git+https://github.com/tensorchord/stdarch.git?branch=avx512fp16#db0cdbc9b02074bfddabfd23a4a681f21640eada" -+source = "git+https://github.com/rust-lang/stdarch.git?branch=master#d2b1a070afc72d9ba4df80e055109ede5fc0a81f" - dependencies = [ - "cfg-if", - "libc", -diff --git a/crates/detect/Cargo.toml b/crates/detect/Cargo.toml -index b3ac782..c671c6a 100644 ---- a/crates/detect/Cargo.toml -+++ b/crates/detect/Cargo.toml -@@ -4,6 +4,6 @@ version.workspace = true - edition.workspace = true - - [dependencies] --std_detect = { git = "https://github.com/tensorchord/stdarch.git", branch = "avx512fp16" } -+std_detect = { git = "https://github.com/rust-lang/stdarch.git", branch = "master" } - ctor = "0.2.6" - rustix.workspace = true diff --git a/pkgs/servers/sql/postgresql/ext/pgvecto-rs/Cargo.lock b/pkgs/servers/sql/postgresql/ext/pgvecto-rs/Cargo.lock index 092bc1d2e31c..52dd4913b5a2 100644 --- a/pkgs/servers/sql/postgresql/ext/pgvecto-rs/Cargo.lock +++ b/pkgs/servers/sql/postgresql/ext/pgvecto-rs/Cargo.lock @@ -4,9 +4,9 @@ version = 3 [[package]] name = "addr2line" -version = "0.21.0" +version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" +checksum = "6e4503c46a5c0c7844e948c9a4d6acd9f50cccb4de1c48eb9e291ea17470c678" dependencies = [ "gimli", ] @@ -19,39 +19,94 @@ checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" [[package]] name = "aho-corasick" -version = "1.1.2" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2969dcb958b36655471fc61f7e416fa76033bdd4bfed0678d8fee1e2d07a1f0" +checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" dependencies = [ "memchr", ] [[package]] -name = "anstyle" -version = "1.0.4" +name = "android-tzdata" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7079075b41f533b8c61d2a4d073c4676e1f8b249ff94a393b0595db304e0dd87" +checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" + +[[package]] +name = "android_system_properties" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" +dependencies = [ + "libc", +] + +[[package]] +name = "anstream" +version = "0.6.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "418c75fa768af9c03be99d17643f93f79bbba589895012a80e3452a19ddda15b" +dependencies = [ + "anstyle", + "anstyle-parse", + "anstyle-query", + "anstyle-wincon", + "colorchoice", + "is_terminal_polyfill", + "utf8parse", +] + +[[package]] +name = "anstyle" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "038dfcf04a5feb68e9c60b21c9625a54c2c0616e79b72b0fd87075a056ae1d1b" + +[[package]] +name = "anstyle-parse" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c03a11a9034d92058ceb6ee011ce58af4a9bf61491aa7e1e59ecd24bd40d22d4" +dependencies = [ + "utf8parse", +] + +[[package]] +name = "anstyle-query" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ad186efb764318d35165f1758e7dcef3b10628e26d41a44bc5550652e6804391" +dependencies = [ + "windows-sys 0.52.0", +] + +[[package]] +name = "anstyle-wincon" +version = "3.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "61a38449feb7068f52bb06c12759005cf459ee52bb4adc1d5a7c4322d716fb19" +dependencies = [ + "anstyle", + "windows-sys 0.52.0", +] [[package]] name = "anyhow" -version = "1.0.77" +version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9d19de80eff169429ac1e9f48fffb163916b448a44e8e046186232046d9e1f9" +checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da" [[package]] name = "arc-swap" -version = "1.6.0" +version = "1.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bddcadddf5e9015d310179a59bb28c4d4b9920ad0f11e8e14dbadf654890c9a6" +checksum = "69f7f8c3906b62b754cd5326047894316021dcfe5a194c8ea52bdd94934a3457" [[package]] name = "arrayvec" version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" -dependencies = [ - "serde", -] [[package]] name = "ascii-canvas" @@ -72,6 +127,16 @@ dependencies = [ "serde_json", ] +[[package]] +name = "async-attributes" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a3203e79f4dd9bdda415ed03cf14dae5a2bf775c683a00f94e9cd1faf0f596e5" +dependencies = [ + "quote", + "syn 1.0.109", +] + [[package]] name = "async-channel" version = "1.9.0" @@ -85,12 +150,11 @@ dependencies = [ [[package]] name = "async-channel" -version = "2.1.1" +version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ca33f4bc4ed1babef42cad36cc1f51fa88be00420404e5b1e80ab1b18f7678c" +checksum = "89b47800b0be77592da0afd425cc03468052844aff33b84e33cc696f64e77b6a" dependencies = [ "concurrent-queue", - "event-listener 4.0.1", "event-listener-strategy", "futures-core", "pin-project-lite", @@ -98,15 +162,14 @@ dependencies = [ [[package]] name = "async-executor" -version = "1.8.0" +version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17ae5ebefcc48e7452b4987947920dac9450be1110cadf34d1b8c116bdbaf97c" +checksum = "c8828ec6e544c02b0d6691d21ed9f9218d0384a82542855073c2a3f58304aaf0" dependencies = [ - "async-lock 3.2.0", "async-task", "concurrent-queue", - "fastrand 2.0.1", - "futures-lite 2.1.0", + "fastrand 2.1.0", + "futures-lite 2.3.0", "slab", ] @@ -116,12 +179,12 @@ version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "05b1b633a2115cd122d73b955eadd9916c18c8f510ec9cd1686404c60ad1c29c" dependencies = [ - "async-channel 2.1.1", + "async-channel 2.3.1", "async-executor", - "async-io 2.2.2", - "async-lock 3.2.0", + "async-io 2.3.3", + "async-lock 3.4.0", "blocking", - "futures-lite 2.1.0", + "futures-lite 2.3.0", "once_cell", ] @@ -147,18 +210,18 @@ dependencies = [ [[package]] name = "async-io" -version = "2.2.2" +version = "2.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6afaa937395a620e33dc6a742c593c01aced20aa376ffb0f628121198578ccc7" +checksum = "0d6baa8f0178795da0e71bc42c9e5d13261aac7ee549853162e66a241ba17964" dependencies = [ - "async-lock 3.2.0", + "async-lock 3.4.0", "cfg-if", "concurrent-queue", "futures-io", - "futures-lite 2.1.0", + "futures-lite 2.3.0", "parking", - "polling 3.3.1", - "rustix 0.38.28", + "polling 3.7.1", + "rustix 0.38.34", "slab", "tracing", "windows-sys 0.52.0", @@ -175,11 +238,11 @@ dependencies = [ [[package]] name = "async-lock" -version = "3.2.0" +version = "3.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7125e42787d53db9dd54261812ef17e937c95a51e4d291373b670342fa44310c" +checksum = "ff6e472cdea888a4bd64f342f09b3f50e1886d32afe8df3d663c01140b811b18" dependencies = [ - "event-listener 4.0.1", + "event-listener 5.3.1", "event-listener-strategy", "pin-project-lite", ] @@ -206,26 +269,26 @@ dependencies = [ "cfg-if", "event-listener 3.1.0", "futures-lite 1.13.0", - "rustix 0.38.28", + "rustix 0.38.34", "windows-sys 0.48.0", ] [[package]] name = "async-signal" -version = "0.2.5" +version = "0.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e47d90f65a225c4527103a8d747001fc56e375203592b25ad103e1ca13124c5" +checksum = "329972aa325176e89114919f2a80fdae4f4c040f66a370b1a1159c6c0f94e7aa" dependencies = [ - "async-io 2.2.2", - "async-lock 2.8.0", + "async-io 2.3.3", + "async-lock 3.4.0", "atomic-waker", "cfg-if", "futures-core", "futures-io", - "rustix 0.38.28", + "rustix 0.38.34", "signal-hook-registry", "slab", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] @@ -234,6 +297,7 @@ version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "62565bb4402e926b29953c785397c6dc0391b7b446e45008b0049eb43cec6f5d" dependencies = [ + "async-attributes", "async-channel 1.9.0", "async-global-executor", "async-io 1.13.0", @@ -257,28 +321,19 @@ dependencies = [ [[package]] name = "async-task" -version = "4.6.0" +version = "4.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1d90cd0b264dfdd8eb5bad0a2c217c1f88fa96a8573f40e7b12de23fb468f46" +checksum = "8b75356056920673b02621b35afd0f7dda9306d03c79a30f5c56c44cf256e3de" [[package]] name = "async-trait" -version = "0.1.75" +version = "0.1.80" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fdf6721fb0140e4f897002dd086c06f6c27775df19cfe1fccb21181a48fd2c98" +checksum = "c6fa2087f2753a7da8cc1c0dbfcf89579dd57458e36769de5ac750b4671737ca" dependencies = [ "proc-macro2", "quote", - "syn 2.0.43", -] - -[[package]] -name = "atomic-polyfill" -version = "1.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8cf2bce30dfe09ef0bfaef228b9d414faaf7e563035494d7fe092dba54b300f4" -dependencies = [ - "critical-section", + "syn 2.0.66", ] [[package]] @@ -288,7 +343,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b29ec3788e96fb4fdb275ccb9d62811f2fa903d76c5eb4dd6fe7d09a7ed5871f" dependencies = [ "cfg-if", - "rustc_version 0.3.3", + "rustc_version", ] [[package]] @@ -298,16 +353,27 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" [[package]] -name = "autocfg" -version = "1.1.0" +name = "atty" +version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" +checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" +dependencies = [ + "hermit-abi 0.1.19", + "libc", + "winapi", +] + +[[package]] +name = "autocfg" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" [[package]] name = "backtrace" -version = "0.3.69" +version = "0.3.72" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2089b7e3f35b9dd2d0ed921ead4f6d318c27680d4a5bd167b3ee120edb105837" +checksum = "17c6a35df3749d2e8bb1b7b21a976d82b15548788d2735b9d82f329268f71a11" dependencies = [ "addr2line", "cc", @@ -318,17 +384,45 @@ dependencies = [ "rustc-demangle", ] +[[package]] +name = "base" +version = "0.0.0" +dependencies = [ + "base_macros", + "bytemuck", + "c", + "detect", + "half 2.4.1", + "libc", + "num-traits", + "rand", + "serde", + "thiserror", + "toml", + "uuid", + "validator", +] + [[package]] name = "base64" -version = "0.21.5" +version = "0.21.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35636a1494ede3b646cc98f74f8e62c773a38a659ebc777a2cf26b9b74171df9" +checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" + +[[package]] +name = "base_macros" +version = "0.0.0" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.66", +] [[package]] name = "basic-cookies" -version = "0.1.4" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb53b6b315f924c7f113b162e53b3901c05fc9966baf84d201dfcc7432a4bb38" +checksum = "67bd8fd42c16bdb08688243dc5f0cc117a3ca9efeeaba3a345a18a6159ad96f7" dependencies = [ "lalrpop", "lalrpop-util", @@ -346,22 +440,22 @@ dependencies = [ [[package]] name = "bindgen" -version = "0.68.1" +version = "0.69.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "726e4313eb6ec35d2730258ad4e15b547ee75d6afaa1361a922e78e59b7d8078" +checksum = "a00dc851838a2120612785d195287475a3ac45514741da670b735818822129a0" dependencies = [ - "bitflags 2.4.1", + "bitflags 2.5.0", "cexpr", "clang-sys", + "itertools 0.12.1", "lazy_static", "lazycell", - "peeking_take_while", "proc-macro2", "quote", "regex", "rustc-hash", "shlex", - "syn 2.0.43", + "syn 2.0.66", ] [[package]] @@ -387,9 +481,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.4.1" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "327762f6e5a765692301e5bb513e0d9fef63be86bbc14528052b1cd3e6f03e07" +checksum = "cf4b9d6a944f767f8e5e0db018570623c85f3d925ac718db4e06d0187adb21c1" [[package]] name = "bitvec" @@ -403,55 +497,43 @@ dependencies = [ "wyz", ] -[[package]] -name = "block-buffer" -version = "0.10.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" -dependencies = [ - "generic-array", -] - [[package]] name = "blocking" -version = "1.5.1" +version = "1.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a37913e8dc4ddcc604f0c6d3bf2887c995153af3611de9e23c352b44c1b9118" +checksum = "703f41c54fc768e63e091340b424302bb1c29ef4aa0c7f10fe849dfb114d29ea" dependencies = [ - "async-channel 2.1.1", - "async-lock 3.2.0", + "async-channel 2.3.1", "async-task", - "fastrand 2.0.1", "futures-io", - "futures-lite 2.1.0", + "futures-lite 2.3.0", "piper", - "tracing", ] [[package]] name = "bumpalo" -version = "3.14.0" +version = "3.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f30e7476521f6f8af1a1c4c0b8cc94f0bee37d91763d0ca2665f299b6cd8aec" +checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" [[package]] name = "bytemuck" -version = "1.14.0" +version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "374d28ec25809ee0e23827c2ab573d729e293f281dfe393500e7ad618baa61c6" +checksum = "78834c15cb5d5efe3452d58b1e8ba890dd62d21907f867f383358198e56ebca5" dependencies = [ "bytemuck_derive", ] [[package]] name = "bytemuck_derive" -version = "1.5.0" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "965ab7eb5f8f97d2a083c799f3a1b994fc397b2fe2da5d1da1626ce15a39f2b1" +checksum = "1ee891b04274a59bd38b412188e24b849617b2e45a0fd8d057deb63e7403761b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.43", + "syn 2.0.66", ] [[package]] @@ -462,9 +544,9 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.5.0" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223" +checksum = "514de17de45fdb8dc022b1a7975556c53c86f9f0aa5f534b98977b171857c2c9" [[package]] name = "c" @@ -472,32 +554,33 @@ version = "0.0.0" dependencies = [ "cc", "detect", - "half 2.3.1", + "half 2.4.1", "rand", ] [[package]] name = "cargo_toml" -version = "0.16.3" +version = "0.19.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3f9629bc6c4388ea699781dc988c2b99766d7679b151c81990b4fa1208fafd3" +checksum = "a98356df42a2eb1bd8f1793ae4ee4de48e384dd974ce5eac8eee802edb7492be" dependencies = [ "serde", "toml", ] [[package]] -name = "castaway" -version = "0.1.2" +name = "cc" +version = "1.0.98" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2698f953def977c68f935bb0dfa959375ad4638570e969e2f1e9f433cbf1af6" +checksum = "41c270e7540d725e65ac7f1b212ac8ce349719624d7bcff99f8e2e488e8cf03f" [[package]] -name = "cc" -version = "1.0.83" +name = "cee-scape" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" +checksum = "4d67dfb052149f779f77e9ce089cea126e00657e8f0d11dafc7901fde4291101" dependencies = [ + "cc", "libc", ] @@ -517,10 +600,24 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] -name = "clang-sys" -version = "1.6.1" +name = "chrono" +version = "0.4.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c688fc74432808e3eb684cae8830a86be1d66a2bd58e1f248ed0960a590baf6f" +checksum = "a21f936df1771bf62b77f047b726c4625ff2e8aa607c01ec06e5a05bd8463401" +dependencies = [ + "android-tzdata", + "iana-time-zone", + "js-sys", + "num-traits", + "wasm-bindgen", + "windows-targets 0.52.5", +] + +[[package]] +name = "clang-sys" +version = "1.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b023947811758c97c59bf9d1c188fd619ad4718dcaa767947df1cadb14f39f4" dependencies = [ "glob", "libc", @@ -528,58 +625,28 @@ dependencies = [ ] [[package]] -name = "clap" -version = "4.4.12" +name = "colorchoice" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcfab8ba68f3668e89f6ff60f5b205cea56aa7b769451a59f34b8682f51c056d" -dependencies = [ - "clap_builder", - "clap_derive", -] +checksum = "0b6a852b24ab71dffc585bcb46eaf7959d175cb865a7152e35b348d1b2960422" [[package]] -name = "clap-cargo" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25122ca6ebad5f53578c26638afd9f0160426969970dc37ec6c363ff6b082ebd" +name = "common" +version = "0.0.0" dependencies = [ - "clap", - "doc-comment", + "bytemuck", + "log", + "memmap2", + "rustix 0.38.34", + "serde", + "serde_json", ] -[[package]] -name = "clap_builder" -version = "4.4.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb7fb5e4e979aec3be7791562fcba452f94ad85e954da024396433e0e25a79e9" -dependencies = [ - "anstyle", - "clap_lex", -] - -[[package]] -name = "clap_derive" -version = "4.4.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf9804afaaf59a91e75b022a30fb7229a7901f60c755489cc61c9b423b836442" -dependencies = [ - "heck", - "proc-macro2", - "quote", - "syn 2.0.43", -] - -[[package]] -name = "clap_lex" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "702fc72eb24e5a1e48ce58027a675bc24edd52096d5397d4aea7c6dd9eca0bd1" - [[package]] name = "concurrent-queue" -version = "2.4.0" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d16048cd947b08fa32c24458a22f5dc5e835264f689f4f5653210c69fd107363" +checksum = "4ca0197aee26d1ae37445ee532fefce43251d24cc7c166799f4d46817f1d3973" dependencies = [ "crossbeam-utils", ] @@ -593,43 +660,37 @@ dependencies = [ "unicode-segmentation", ] +[[package]] +name = "core-foundation" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f" +dependencies = [ + "core-foundation-sys", + "libc", +] + [[package]] name = "core-foundation-sys" version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" -[[package]] -name = "cpufeatures" -version = "0.2.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce420fe07aecd3e67c5f910618fe65e94158f6dcc0adf44e00d69ce2bdfe0fd0" -dependencies = [ - "libc", -] - [[package]] name = "crc32fast" -version = "1.3.2" +version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b540bd8bc810d3885c6ea91e2018302f68baba2129ab3e88f32389ee9370880d" +checksum = "a97769d94ddab943e4510d138150169a2758b5ef3eb191a9ee688de3e23ef7b3" dependencies = [ "cfg-if", ] -[[package]] -name = "critical-section" -version = "1.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7059fff8937831a9ae6f0fe4d658ffabf58f2ca96aa9dec1c889f936f705f216" - [[package]] name = "crossbeam" -version = "0.8.3" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6eb9105919ca8e40d437fc9cbb8f1975d916f1bd28afe795a48aae32a2cc8920" +checksum = "1137cd7e7fc0fb5d3c5a8678be38ec56e819125d8d7907411fe24ccb943faca8" dependencies = [ - "cfg-if", "crossbeam-channel", "crossbeam-deque", "crossbeam-epoch", @@ -639,54 +700,46 @@ dependencies = [ [[package]] name = "crossbeam-channel" -version = "0.5.10" +version = "0.5.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82a9b73a36529d9c47029b9fb3a6f0ea3cc916a261195352ba19e770fc1748b2" +checksum = "33480d6946193aa8033910124896ca395333cae7e2d1113d1fef6c3272217df2" dependencies = [ - "cfg-if", "crossbeam-utils", ] [[package]] name = "crossbeam-deque" -version = "0.8.4" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fca89a0e215bab21874660c67903c5f143333cab1da83d041c7ded6053774751" +checksum = "613f8cc01fe9cf1a3eb3d7f488fd2fa8388403e97039e2f73692932e291a770d" dependencies = [ - "cfg-if", "crossbeam-epoch", "crossbeam-utils", ] [[package]] name = "crossbeam-epoch" -version = "0.9.17" +version = "0.9.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e3681d554572a651dda4186cd47240627c3d0114d45a95f6ad27f2f22e7548d" +checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e" dependencies = [ - "autocfg", - "cfg-if", "crossbeam-utils", ] [[package]] name = "crossbeam-queue" -version = "0.3.10" +version = "0.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adc6598521bb5a83d491e8c1fe51db7296019d2ca3cb93cc6c2a20369a4d78a2" +checksum = "df0346b5d5e76ac2fe4e327c5fd1118d6be7c51dfb18f9b7922923f287471e35" dependencies = [ - "cfg-if", "crossbeam-utils", ] [[package]] name = "crossbeam-utils" -version = "0.8.18" +version = "0.8.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3a430a770ebd84726f584a90ee7f020d28db52c6d02138900f22341f866d39c" -dependencies = [ - "cfg-if", -] +checksum = "22ec99545bb0ed0ea7bb9b8e1e9122ea386ff8a48c0922e43f36d45ab09e0e80" [[package]] name = "crunchy" @@ -695,23 +748,24 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" [[package]] -name = "crypto-common" -version = "0.1.6" +name = "csv" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" +checksum = "ac574ff4d437a7b5ad237ef331c17ccca63c46479e5b5453eb8e10bb99a759fe" dependencies = [ - "generic-array", - "typenum", + "csv-core", + "itoa", + "ryu", + "serde", ] [[package]] -name = "ctor" -version = "0.2.6" +name = "csv-core" +version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30d2b3721e861707777e3195b0158f950ae6dc4a27e4d02ff9f67e3eb3de199e" +checksum = "5efa2b3d7902f4b634a20cae3c9c4e6209dc4779feb6863329607560143efa70" dependencies = [ - "quote", - "syn 2.0.43", + "memchr", ] [[package]] @@ -721,34 +775,38 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b365fabc795046672053e29c954733ec3b05e4be654ab130fe8f1f94d7051f35" [[package]] -name = "curl" -version = "0.4.44" +name = "darling" +version = "0.20.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "509bd11746c7ac09ebd19f0b17782eae80aadee26237658a6b4808afb5c11a22" +checksum = "83b2eb4d90d12bdda5ed17de686c2acb4c57914f8f921b8da7e112b5a36f3fe1" dependencies = [ - "curl-sys", - "libc", - "openssl-probe", - "openssl-sys", - "schannel", - "socket2 0.4.10", - "winapi", + "darling_core", + "darling_macro", ] [[package]] -name = "curl-sys" -version = "0.4.70+curl-8.5.0" +name = "darling_core" +version = "0.20.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c0333d8849afe78a4c8102a429a446bfdd055832af071945520e835ae2d841e" +checksum = "622687fe0bac72a04e5599029151f5796111b90f1baaa9b544d807a5e31cd120" dependencies = [ - "cc", - "libc", - "libnghttp2-sys", - "libz-sys", - "openssl-sys", - "pkg-config", - "vcpkg", - "windows-sys 0.48.0", + "fnv", + "ident_case", + "proc-macro2", + "quote", + "strsim", + "syn 2.0.66", +] + +[[package]] +name = "darling_macro" +version = "0.20.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "733cabb43482b1a1b53eee8583c2b9e8684d592215ea83efd305dd31bc2f0178" +dependencies = [ + "darling_core", + "quote", + "syn 2.0.66", ] [[package]] @@ -768,35 +826,17 @@ dependencies = [ name = "detect" version = "0.0.0" dependencies = [ - "ctor", - "rustix 0.38.28", - "std_detect", + "detect_macros", + "rustix 0.38.34", ] [[package]] -name = "diff" -version = "0.1.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56254986775e3233ffa9c4d7d3faaf6d36a2c09d30b20687e9f88bc8bafc16c8" - -[[package]] -name = "digest" -version = "0.10.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" +name = "detect_macros" +version = "0.0.0" dependencies = [ - "block-buffer", - "crypto-common", - "subtle", -] - -[[package]] -name = "dirs" -version = "5.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44c45a9d03d6676652bcb5e724c7e988de1acad23a711b5217ab9cbecbec2225" -dependencies = [ - "dirs-sys", + "proc-macro2", + "quote", + "syn 2.0.66", ] [[package]] @@ -809,18 +849,6 @@ dependencies = [ "dirs-sys-next", ] -[[package]] -name = "dirs-sys" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "520f05a5cbd335fae5a99ff7a6ab8627577660ee5cfd6a94a6a929b52ff0321c" -dependencies = [ - "libc", - "option-ext", - "redox_users", - "windows-sys 0.48.0", -] - [[package]] name = "dirs-sys-next" version = "0.1.2" @@ -832,38 +860,49 @@ dependencies = [ "winapi", ] -[[package]] -name = "doc-comment" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fea41bba32d969b513997752735605054bc0dfa92b4c56bf1189f2e174be7a10" - -[[package]] -name = "downcast" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1435fa1053d8b2fbbe9be7e97eca7f33d37b28409959813daefc1446a14247f1" - [[package]] name = "either" -version = "1.9.0" +version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" +checksum = "3dca9240753cf90908d7e4aac30f630662b02aebaa1b58a3cadabdb23385b58b" + +[[package]] +name = "elkan_k_means" +version = "0.0.0" +dependencies = [ + "base", + "bytemuck", + "common", + "num-traits", + "rand", + "rayon 0.0.0", +] + +[[package]] +name = "embedding" +version = "0.0.0" +dependencies = [ + "httpmock", + "reqwest", + "serde", + "serde_json", + "thiserror", +] [[package]] name = "ena" -version = "0.14.2" +version = "0.14.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c533630cf40e9caa44bd91aadc88a75d75a4c3a12b4cfde353cbed41daa1e1f1" +checksum = "3d248bdd43ce613d87415282f69b9bb99d947d290b10962dd6c56233312c2ad5" dependencies = [ "log", ] [[package]] name = "encoding_rs" -version = "0.8.33" +version = "0.8.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7268b386296a025e474d5140678f75d6de9493ae55a5d709eeb9dd08149945e1" +checksum = "b45de904aa0b010bce2ab45264d0631681847fa7b6f2eaa7dab7619943bc4f59" dependencies = [ "cfg-if", ] @@ -885,20 +924,30 @@ checksum = "f282cfdfe92516eb26c2af8589c274c7c17681f5ecc03c18255fe741c6aa64eb" dependencies = [ "proc-macro2", "quote", - "syn 2.0.43", + "syn 2.0.66", +] + +[[package]] +name = "env_filter" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a009aa4810eb158359dda09d0c87378e4bbb89b5a801f016885a4707ba24f7ea" +dependencies = [ + "log", + "regex", ] [[package]] name = "env_logger" -version = "0.10.1" +version = "0.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95b3f3e67048839cb0d0781f445682a35113da7121f7c949db0e2be96a4fbece" +checksum = "38b35839ba51819680ba087cd351788c9a3c476841207e0b8cee0b04722343b9" dependencies = [ + "anstream", + "anstyle", + "env_filter", "humantime", - "is-terminal", "log", - "regex", - "termcolor", ] [[package]] @@ -909,9 +958,9 @@ checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] name = "errno" -version = "0.3.8" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a258e46cdc063eb8519c00b9fc845fc47bcfca4130e2f08e88665ceda8474245" +checksum = "534c5cf6194dfab3db3242765c03bbe257cf92f22b38f6bc0c58d59108a820ba" dependencies = [ "libc", "windows-sys 0.52.0", @@ -936,9 +985,9 @@ dependencies = [ [[package]] name = "event-listener" -version = "4.0.1" +version = "5.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84f2cdcf274580f2d63697192d744727b3198894b1bf02923643bf59e2c26712" +checksum = "6032be9bd27023a771701cc49f9f053c751055f71efb2e0ae5c15809093675ba" dependencies = [ "concurrent-queue", "parking", @@ -947,30 +996,24 @@ dependencies = [ [[package]] name = "event-listener-strategy" -version = "0.4.0" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "958e4d70b6d5e81971bebec42271ec641e7ff4e170a6fa605f2b8a8b65cb97d3" +checksum = "0f214dc438f977e6d4e3500aaa277f5ad94ca83fbbd9b1a15713ce2344ccc5a1" dependencies = [ - "event-listener 4.0.1", + "event-listener 5.3.1", "pin-project-lite", ] [[package]] name = "eyre" -version = "0.6.11" +version = "0.6.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6267a1fa6f59179ea4afc8e50fd8612a3cc60bc858f786ff877a4a8cb042799" +checksum = "7cd915d99f24784cdc19fd37ef22b97e3ff0ae756c7e492e9fbfe897d61e2aec" dependencies = [ "indenter", "once_cell", ] -[[package]] -name = "fallible-iterator" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4443176a9f2c162692bd3d352d745ef9413eec5782a80d8fd6f8a1ac692a07f7" - [[package]] name = "fastrand" version = "1.9.0" @@ -982,15 +1025,9 @@ dependencies = [ [[package]] name = "fastrand" -version = "2.0.1" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25cbce373ec4653f1a01a31e8a5e5ec0c622dc27ff9c4e6606eefef5cbbed4a5" - -[[package]] -name = "finl_unicode" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fcfdc7a0362c9f4444381a9e697c79d435fe65b52a37466fc2c1184cee9edc6" +checksum = "9fc0510504f03c51ada170672ac806f1f105a88aa97a5281117e1ddc3368e51a" [[package]] name = "fixedbitset" @@ -999,13 +1036,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" [[package]] -name = "flate2" -version = "1.0.28" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46303f565772937ffe1d394a4fac6f411c6013172fadde9dcdb1e147a086940e" +name = "flat" +version = "0.0.0" dependencies = [ - "crc32fast", - "miniz_oxide", + "base", + "common", + "quantization", + "rayon 0.0.0", + "storage", ] [[package]] @@ -1023,12 +1061,6 @@ dependencies = [ "percent-encoding", ] -[[package]] -name = "fragile" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c2141d6d6c8512188a7891b4b01590a45f6dac67afb4f255c4124dbb86d4eaa" - [[package]] name = "funty" version = "2.0.0" @@ -1042,7 +1074,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eac8f7d7865dcb88bd4373ab671c8cf4508703796caa2b1985a9ca867b3fcb78" dependencies = [ "futures-core", - "futures-sink", ] [[package]] @@ -1074,11 +1105,11 @@ dependencies = [ [[package]] name = "futures-lite" -version = "2.1.0" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aeee267a1883f7ebef3700f262d2d54de95dfaf38189015a74fdc4e0c7ad8143" +checksum = "52527eb5074e35e9339c6b4e8d12600c7128b68fb25dcb9fa9dec18f7c25f3a5" dependencies = [ - "fastrand 2.0.1", + "fastrand 2.1.0", "futures-core", "futures-io", "parking", @@ -1093,7 +1124,7 @@ checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.43", + "syn 2.0.66", ] [[package]] @@ -1115,29 +1146,20 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3d6401deb83407ab3da39eba7e33987a73c3df0c82b4bb5813ee871c19c41d48" dependencies = [ "futures-core", + "futures-io", "futures-macro", - "futures-sink", "futures-task", + "memchr", "pin-project-lite", "pin-utils", "slab", ] -[[package]] -name = "generic-array" -version = "0.14.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" -dependencies = [ - "typenum", - "version_check", -] - [[package]] name = "getrandom" -version = "0.2.11" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe9006bed769170c11f845cf00c7c1e9092aeb3f268e007c3e760ac68008070f" +checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" dependencies = [ "cfg-if", "libc", @@ -1146,9 +1168,9 @@ dependencies = [ [[package]] name = "gimli" -version = "0.28.1" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" +checksum = "40ecd4077b5ae9fd2e9e169b102c6c330d0605168eb0e8bf79952b256dbefffd" [[package]] name = "glob" @@ -1169,16 +1191,35 @@ dependencies = [ ] [[package]] -name = "half" -version = "1.8.2" +name = "h2" +version = "0.3.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eabb4a44450da02c90444cf74558da904edde8fb4e9035a9a6a4e15445af0bd7" +checksum = "81fe527a889e1532da5c525686d96d4c2e74cdd345badf8dfef9f6b39dd5f5e8" +dependencies = [ + "bytes", + "fnv", + "futures-core", + "futures-sink", + "futures-util", + "http", + "indexmap", + "slab", + "tokio", + "tokio-util", + "tracing", +] [[package]] name = "half" -version = "2.3.1" +version = "1.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc52e53916c08643f1b56ec082790d1e86a32e58dc5268f897f313fbae7b4872" +checksum = "1b43ede17f21864e81be2fa654110bf1e793774238d86ef8555c37e6519c0403" + +[[package]] +name = "half" +version = "2.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6dd08c532ae367adf81c312a4580bc67f1d0fe8bc9c460520283f4c0ff277888" dependencies = [ "bytemuck", "cfg-if", @@ -1191,58 +1232,71 @@ dependencies = [ [[package]] name = "hash32" -version = "0.2.1" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0c35f58762feb77d74ebe43bdbc3210f09be9fe6742234d573bacc26ed92b67" +checksum = "47d60b12902ba28e2730cd37e95b8c9223af2808df9e902d4df49588d1470606" dependencies = [ "byteorder", ] [[package]] name = "hashbrown" -version = "0.14.3" +version = "0.14.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" +checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" [[package]] name = "heapless" -version = "0.7.17" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cdc6457c0eb62c71aac4bc17216026d8410337c4126773b9c5daba343f17964f" +checksum = "0bfb9eb618601c89945a70e254898da93b13be0388091d42117462b265bb3fad" dependencies = [ - "atomic-polyfill", "hash32", - "rustc_version 0.4.0", - "spin", "stable_deref_trait", ] [[package]] -name = "heck" -version = "0.4.1" +name = "hermit-abi" +version = "0.1.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" +checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" +dependencies = [ + "libc", +] [[package]] name = "hermit-abi" -version = "0.3.3" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d77f7ec81a6d05a3abb01ab6eb7590f6083d08449fe5a1c8b1e620283546ccb7" +checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" [[package]] -name = "hmac" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" +name = "hnsw" +version = "0.0.0" dependencies = [ - "digest", + "base", + "bytemuck", + "common", + "parking_lot", + "quantization", + "rayon 0.0.0", + "storage", +] + +[[package]] +name = "home" +version = "0.5.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3d1354bf6b7235cb4a0576c2619fd4ed18183f689b12b006a0ee7329eeff9a5" +dependencies = [ + "windows-sys 0.52.0", ] [[package]] name = "http" -version = "0.2.11" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8947b1a6fad4393052c7ba1f4cd97bed3e953a95c79c92ad9b051a04611d9fbb" +checksum = "601cbb57e577e2f5ef5be8e7b83f0f63994f25aa94d673e54a92d5c516d101f1" dependencies = [ "bytes", "fnv", @@ -1274,12 +1328,13 @@ checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" [[package]] name = "httpmock" -version = "0.6.8" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b02e044d3b4c2f94936fb05f9649efa658ca788f44eb6b87554e2033fc8ce93" +checksum = "08ec9586ee0910472dec1a1f0f8acf52f0fdde93aea74d70d4a3107b4be0fd5b" dependencies = [ "assert-json-diff", "async-object-pool", + "async-std", "async-trait", "base64", "basic-cookies", @@ -1287,7 +1342,6 @@ dependencies = [ "form_urlencoded", "futures-util", "hyper", - "isahc", "lazy_static", "levenshtein", "log", @@ -1308,21 +1362,22 @@ checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" [[package]] name = "hyper" -version = "0.14.28" +version = "0.14.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf96e135eb83a2a8ddf766e426a841d8ddd7449d5f00d34ea02b41d2f19eef80" +checksum = "f361cde2f109281a220d4307746cdfd5ee3f410da58a70377762396775634b33" dependencies = [ "bytes", "futures-channel", "futures-core", "futures-util", + "h2", "http", "http-body", "httparse", "httpdate", "itoa", "pin-project-lite", - "socket2 0.5.5", + "socket2 0.5.7", "tokio", "tower-service", "tracing", @@ -1330,15 +1385,48 @@ dependencies = [ ] [[package]] -name = "idna" -version = "0.4.0" +name = "hyper-rustls" +version = "0.24.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d20d6b07bfbc108882d88ed8e37d39636dcc260e15e30c45e6ba089610b917c" +checksum = "ec3efd23720e2049821a693cbc7e65ea87c72f1c58ff2f9522ff332b1491e590" dependencies = [ - "unicode-bidi", - "unicode-normalization", + "futures-util", + "http", + "hyper", + "rustls", + "tokio", + "tokio-rustls", ] +[[package]] +name = "iana-time-zone" +version = "0.1.60" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7ffbb5a1b541ea2561f8c41c087286cc091e21e556a4f09a8f6cbf17b69b141" +dependencies = [ + "android_system_properties", + "core-foundation-sys", + "iana-time-zone-haiku", + "js-sys", + "wasm-bindgen", + "windows-core", +] + +[[package]] +name = "iana-time-zone-haiku" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" +dependencies = [ + "cc", +] + +[[package]] +name = "ident_case" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" + [[package]] name = "idna" version = "0.5.0" @@ -1349,23 +1437,46 @@ dependencies = [ "unicode-normalization", ] -[[package]] -name = "if_chain" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb56e1aa765b4b4f3aadfab769793b7087bb03a4ea4920644a6d238e2df5b9ed" - [[package]] name = "indenter" version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ce23b50ad8242c51a442f3ff322d56b02f08852c77e4c0b4d3fd684abc89c683" +[[package]] +name = "index" +version = "0.0.0" +dependencies = [ + "arc-swap", + "base", + "bincode", + "byteorder", + "common", + "crc32fast", + "crossbeam", + "dashmap", + "elkan_k_means", + "flat", + "hnsw", + "ivf", + "log", + "parking_lot", + "quantization", + "rand", + "rayon 0.0.0", + "serde", + "serde_json", + "storage", + "thiserror", + "uuid", + "validator", +] + [[package]] name = "indexmap" -version = "2.1.0" +version = "2.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d530e1a18b1cb4c484e6e34556a0d948706958449fca0cab753d649f2bce3d1f" +checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26" dependencies = [ "equivalent", "hashbrown", @@ -1373,70 +1484,49 @@ dependencies = [ [[package]] name = "instant" -version = "0.1.12" +version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" +checksum = "e0242819d153cba4b4b05a5a8f2a7e9bbf97b6055b2a002b395c96b5ff3c0222" dependencies = [ "cfg-if", ] +[[package]] +name = "interprocess_atomic_wait" +version = "0.0.0" +dependencies = [ + "libc", + "ulock-sys", +] + [[package]] name = "io-lifetimes" version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eae7b9aee968036d54dce06cebaefd919e4472e753296daccd6d344e3e2df0c2" dependencies = [ - "hermit-abi", + "hermit-abi 0.3.9", "libc", "windows-sys 0.48.0", ] [[package]] -name = "is-terminal" -version = "0.4.10" +name = "ipnet" +version = "2.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0bad00257d07be169d870ab665980b06cdb366d792ad690bf2e76876dc503455" -dependencies = [ - "hermit-abi", - "rustix 0.38.28", - "windows-sys 0.52.0", -] +checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" [[package]] -name = "isahc" -version = "1.7.2" +name = "is_ci" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "334e04b4d781f436dc315cb1e7515bd96826426345d498149e4bde36b67f8ee9" -dependencies = [ - "async-channel 1.9.0", - "castaway", - "crossbeam-utils", - "curl", - "curl-sys", - "encoding_rs", - "event-listener 2.5.3", - "futures-lite 1.13.0", - "http", - "log", - "mime", - "once_cell", - "polling 2.8.0", - "slab", - "sluice", - "tracing", - "tracing-futures", - "url", - "waker-fn", -] +checksum = "7655c9839580ee829dfacba1d1278c2b7883e50a277ff7541299489d6bdfdc45" [[package]] -name = "itertools" -version = "0.10.5" +name = "is_terminal_polyfill" +version = "1.70.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" -dependencies = [ - "either", -] +checksum = "f8478577c03552c21db0e2724ffb8986a5ce7af88107e6be5d2ee6e158c12800" [[package]] name = "itertools" @@ -1448,16 +1538,40 @@ dependencies = [ ] [[package]] -name = "itoa" -version = "1.0.10" +name = "itertools" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1a46d1a171d865aa5f83f92695765caa047a9b4cbae2cbf37dbd613a793fd4c" +checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569" +dependencies = [ + "either", +] + +[[package]] +name = "itoa" +version = "1.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" + +[[package]] +name = "ivf" +version = "0.0.0" +dependencies = [ + "base", + "common", + "elkan_k_means", + "num-traits", + "quantization", + "rand", + "rayon 0.0.0", + "serde_json", + "storage", +] [[package]] name = "js-sys" -version = "0.3.66" +version = "0.3.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cee9c64da59eae3b50095c18d3e74f8b73c0b86d2792824ff01bbce68ba229ca" +checksum = "29c15563dc2726973df627357ce0c9ddddbea194836909d655df6a75d2cf296d" dependencies = [ "wasm-bindgen", ] @@ -1473,33 +1587,33 @@ dependencies = [ [[package]] name = "lalrpop" -version = "0.19.12" +version = "0.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a1cbf952127589f2851ab2046af368fd20645491bb4b376f04b7f94d7a9837b" +checksum = "55cb077ad656299f160924eb2912aa147d7339ea7d69e1b5517326fdcec3c1ca" dependencies = [ "ascii-canvas", "bit-set", - "diff", "ena", - "is-terminal", - "itertools 0.10.5", + "itertools 0.11.0", "lalrpop-util", "petgraph", + "pico-args", "regex", - "regex-syntax 0.6.29", + "regex-syntax", "string_cache", "term", "tiny-keccak", "unicode-xid", + "walkdir", ] [[package]] name = "lalrpop-util" -version = "0.19.12" +version = "0.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3c48237b9604c5a4702de6b824e02006c3214327564636aef27c1028a8fa0ed" +checksum = "507460a910eb7b32ee961886ff48539633b788a36b65692b95f225b844c82553" dependencies = [ - "regex", + "regex-automata", ] [[package]] @@ -1522,18 +1636,18 @@ checksum = "db13adb97ab515a3691f56e4dbab09283d0b86cb45abd991d8634a9d6f501760" [[package]] name = "libc" -version = "0.2.151" +version = "0.2.155" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "302d7ab3130588088d277783b1e2d2e10c9e9e4a16dd9050e6ec93fb3e7048f4" +checksum = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c" [[package]] name = "libloading" -version = "0.7.4" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b67380fd3b2fbe7527a606e18729d21c6f3951633d0500574c4dc22d2d638b9f" +checksum = "0c2a198fb6b0eada2a8df47933734e6d35d350665a33a3593d7164fa52c75c19" dependencies = [ "cfg-if", - "winapi", + "windows-targets 0.52.5", ] [[package]] @@ -1542,37 +1656,14 @@ version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4ec2a862134d2a7d32d7983ddcdd1c4923530833c9f2ea1a44fc5fa473989058" -[[package]] -name = "libnghttp2-sys" -version = "0.1.8+1.55.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fae956c192dadcdb5dace96db71fa0b827333cce7c7b38dc71446f024d8a340" -dependencies = [ - "cc", - "libc", -] - [[package]] name = "libredox" -version = "0.0.1" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85c833ca1e66078851dba29046874e38f08b2c883700aa29a03ddd3b23814ee8" +checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d" dependencies = [ - "bitflags 2.4.1", + "bitflags 2.5.0", "libc", - "redox_syscall", -] - -[[package]] -name = "libz-sys" -version = "1.1.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d97137b25e321a73eef1418d1d5d2eda4d77e12813f8e6dead84bc52c5870a7b" -dependencies = [ - "cc", - "libc", - "pkg-config", - "vcpkg", ] [[package]] @@ -1583,15 +1674,15 @@ checksum = "ef53942eb7bf7ff43a617b3e2c1c4a5ecf5944a7c1bc12d7ee39bbb15e5c1519" [[package]] name = "linux-raw-sys" -version = "0.4.12" +version = "0.4.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4cd1a83af159aa67994778be9070f0ae1bd732942279cabb14f86f986a21456" +checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" [[package]] name = "lock_api" -version = "0.4.11" +version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c168f8615b12bc01f9c17e2eb0cc07dcae1940121185446edc3744920e8ef45" +checksum = "07af8b9cdd281b7915f413fa73f29ebd5d55d0d3f0155584dade1ff18cea1b17" dependencies = [ "autocfg", "scopeguard", @@ -1599,47 +1690,37 @@ dependencies = [ [[package]] name = "log" -version = "0.4.20" +version = "0.4.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" +checksum = "90ed8c1e510134f979dbc4f070f87d4313098b704861a105fe34231c70a3901c" dependencies = [ "value-bag", ] [[package]] -name = "md-5" -version = "0.10.6" +name = "memchr" +version = "2.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d89e7ee0cfbedfc4da3340218492196241d89eefb6dab27de5df917a6d2e78cf" -dependencies = [ - "cfg-if", - "digest", -] +checksum = "6c8640c5d730cb13ebd907d8d04b52f55ac9a2eec55b440c8892f40d56c76c1d" [[package]] -name = "memchr" -version = "2.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "523dc4f511e55ab87b694dc30d0f820d60906ef06413f93d4d7a1385599cc149" +name = "memfd" +version = "0.0.0" +dependencies = [ + "detect", + "rand", + "rustix 0.38.34", +] [[package]] name = "memmap2" -version = "0.9.3" +version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45fd3a57831bf88bc63f8cebc0cf956116276e97fef3966103e96416209f7c92" +checksum = "fe751422e4a8caa417e13c3ea66452215d7d63e19e604f4980461212f3ae1322" dependencies = [ "libc", ] -[[package]] -name = "memoffset" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a634b1c61a95585bd15607c6ab0c4e5b226e695ff2800ba0cdccddf208c406c" -dependencies = [ - "autocfg", -] - [[package]] name = "mime" version = "0.3.17" @@ -1654,78 +1735,29 @@ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" [[package]] name = "miniz_oxide" -version = "0.7.1" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7810e0be55b428ada41041c41f32c9f1a42817901b4ccf45fa3d4b6561e74c7" +checksum = "87dfd01fe195c66b572b37921ad8803d010623c0aca821bea2302239d155cdae" dependencies = [ "adler", ] [[package]] name = "mio" -version = "0.8.10" +version = "0.8.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f3d0b296e374a4e6f3c7b0a1f5a51d748a0d34c85e7dc48fc3fa9a87657fe09" +checksum = "a4a650543ca06a924e8b371db273b2756685faae30f8487da1b56505a8f78b0c" dependencies = [ "libc", "wasi", "windows-sys 0.48.0", ] -[[package]] -name = "mockall" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43766c2b5203b10de348ffe19f7e54564b64f3d6018ff7648d1e2d6d3a0f0a48" -dependencies = [ - "cfg-if", - "downcast", - "fragile", - "lazy_static", - "mockall_derive", - "predicates", - "predicates-tree", -] - -[[package]] -name = "mockall_derive" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af7cbce79ec385a1d4f54baa90a76401eb15d9cab93685f62e7e9f942aa00ae2" -dependencies = [ - "cfg-if", - "proc-macro2", - "quote", - "syn 2.0.43", -] - -[[package]] -name = "multiversion" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2c7b9d7fe61760ce5ea19532ead98541f6b4c495d87247aff9826445cf6872a" -dependencies = [ - "multiversion-macros", - "target-features", -] - -[[package]] -name = "multiversion-macros" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26a83d8500ed06d68877e9de1dde76c1dbb83885dcdbda4ef44ccbc3fbda2ac8" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", - "target-features", -] - [[package]] name = "new_debug_unreachable" -version = "1.0.4" +version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4a24736216ec316047a1fc4252e27dabb04218aa4a3f37c6e7ddbf1f9782b54" +checksum = "650eef8c711430f1a879fdd01d4745a7deea475becfb90269c06775983bbf086" [[package]] name = "nom" @@ -1737,20 +1769,11 @@ 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 = "num-traits" -version = "0.2.17" +version = "0.2.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39e3200413f237f41ab11ad6d161bc7239c84dcb631773ccd7de3dfe4b5c267c" +checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" dependencies = [ "autocfg", "libm", @@ -1762,15 +1785,15 @@ version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" dependencies = [ - "hermit-abi", + "hermit-abi 0.3.9", "libc", ] [[package]] name = "object" -version = "0.32.2" +version = "0.35.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6a622008b6e321afc04970976f62ee297fdbaa6f95318ca343e3eebb9648441" +checksum = "b8ec7ab813848ba4522158d5517a6093db1ded27575b070f4177b8d12b41db5e" dependencies = [ "memchr", ] @@ -1781,48 +1804,14 @@ version = "1.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" -[[package]] -name = "openai_api_rust" -version = "0.1.8" -source = "git+https://github.com/tensorchord/openai-api.git?rev=228d54b6002e98257b3c81501a054942342f585f#228d54b6002e98257b3c81501a054942342f585f" -dependencies = [ - "log", - "mime", - "rand", - "serde", - "serde_json", - "ureq", -] - -[[package]] -name = "openssl-probe" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" - -[[package]] -name = "openssl-sys" -version = "0.9.98" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1665caf8ab2dc9aef43d1c0023bd904633a6a05cb30b0ad59bec2ae986e57a7" -dependencies = [ - "cc", - "libc", - "pkg-config", - "vcpkg", -] - -[[package]] -name = "option-ext" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" - [[package]] name = "owo-colors" version = "3.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c1b04fb49957986fdce4d6ee7a65027d55d4b6d2265e5848bbb507b58ccfdb6f" +dependencies = [ + "supports-color", +] [[package]] name = "parking" @@ -1832,9 +1821,9 @@ checksum = "bb813b8af86854136c6922af0598d719255ecb2179515e6e7730d468f05c9cae" [[package]] name = "parking_lot" -version = "0.12.1" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" +checksum = "f1bf18183cf54e8d6059647fc3063646a1801cf30896933ec2311622cc4b9a27" dependencies = [ "lock_api", "parking_lot_core", @@ -1842,17 +1831,23 @@ dependencies = [ [[package]] name = "parking_lot_core" -version = "0.9.9" +version = "0.9.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c42a9226546d68acdd9c0a280d17ce19bfe27a46bf68784e4066115788d008e" +checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" dependencies = [ "cfg-if", "libc", "redox_syscall", "smallvec", - "windows-targets 0.48.5", + "windows-targets 0.52.5", ] +[[package]] +name = "paste" +version = "1.0.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" + [[package]] name = "pathsearch" version = "0.2.0" @@ -1863,12 +1858,6 @@ dependencies = [ "libc", ] -[[package]] -name = "peeking_take_while" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19b17cddbe7ec3f8bc800887bab5e717348c95ea2ca0b1bf0837fb964dc67099" - [[package]] name = "percent-encoding" version = "2.3.1" @@ -1877,9 +1866,9 @@ checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" [[package]] name = "pest" -version = "2.7.5" +version = "2.7.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae9cee2a55a544be8b89dc6848072af97a20f2422603c10865be2a42b580fff5" +checksum = "560131c633294438da9f7c4b08189194b20946c8274c6b9e38881a7874dc8ee8" dependencies = [ "memchr", "thiserror", @@ -1888,9 +1877,9 @@ dependencies = [ [[package]] name = "petgraph" -version = "0.6.4" +version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1d3afd2628e69da2be385eb6f2fd57c8ac7977ceeff6dc166ff1657b0e386a9" +checksum = "b4c5cc86750666a3ed20bdaf5ca2a0344f9c67674cae0515bec2da16fbaa47db" dependencies = [ "fixedbitset", "indexmap", @@ -1898,22 +1887,21 @@ dependencies = [ [[package]] name = "pgrx" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb44171122605250e719ca2ae49afb357bdb2fce4b3c876fcf2225165237328a" +version = "0.12.0-alpha.1" +source = "git+https://github.com/tensorchord/pgrx.git?branch=v0.12.0-alpha.1-patch3#6a89f963209e9d4ed18d2fb868b8d2e967421785" dependencies = [ "atomic-traits", - "bitflags 2.4.1", + "bitflags 2.5.0", "bitvec", "enum-map", "heapless", "libc", "once_cell", + "paste", "pgrx-macros", "pgrx-pg-sys", "pgrx-sql-entity-graph", "seahash", - "seq-macro", "serde", "serde_cbor", "serde_json", @@ -1923,46 +1911,42 @@ dependencies = [ [[package]] name = "pgrx-macros" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a18ac8628b7de2f29a93d0abdbdcaee95a0e0ef4b59fd4de99cc117e166e843b" +version = "0.12.0-alpha.1" +source = "git+https://github.com/tensorchord/pgrx.git?branch=v0.12.0-alpha.1-patch3#6a89f963209e9d4ed18d2fb868b8d2e967421785" dependencies = [ "pgrx-sql-entity-graph", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.66", ] [[package]] name = "pgrx-pg-config" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "acd45ac6eb1142c5690df63c4e0bdfb74f27c9f93a7af84f064dc2c0a2c2d6f7" +version = "0.12.0-alpha.1" +source = "git+https://github.com/tensorchord/pgrx.git?branch=v0.12.0-alpha.1-patch3#6a89f963209e9d4ed18d2fb868b8d2e967421785" dependencies = [ "cargo_toml", - "dirs", "eyre", + "home", "owo-colors", "pathsearch", "serde", - "serde_derive", "serde_json", + "thiserror", "toml", "url", ] [[package]] name = "pgrx-pg-sys" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81c6207939582934fc26fceb651cb5338e363c06ddc6b2d50ca71867f7c70ffe" +version = "0.12.0-alpha.1" +source = "git+https://github.com/tensorchord/pgrx.git?branch=v0.12.0-alpha.1-patch3#6a89f963209e9d4ed18d2fb868b8d2e967421785" dependencies = [ "bindgen", + "cee-scape", "clang-sys", "eyre", "libc", - "memoffset", - "once_cell", "pgrx-macros", "pgrx-pg-config", "pgrx-sql-entity-graph", @@ -1971,56 +1955,23 @@ dependencies = [ "serde", "shlex", "sptr", - "syn 1.0.109", + "syn 2.0.66", "walkdir", ] [[package]] name = "pgrx-sql-entity-graph" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a50083de83b1fac2484e8f2c2a7da5fed0193904e2578fa6c4ce02262c455c2b" +version = "0.12.0-alpha.1" +source = "git+https://github.com/tensorchord/pgrx.git?branch=v0.12.0-alpha.1-patch3#6a89f963209e9d4ed18d2fb868b8d2e967421785" dependencies = [ "convert_case", "eyre", "petgraph", "proc-macro2", "quote", - "syn 1.0.109", - "unescape", -] - -[[package]] -name = "pgrx-tests" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ba0115cd80d9e3ca1d5d2a8ab8b7320d6ed614a53d025b86152696a8b3caa75" -dependencies = [ - "clap-cargo", - "eyre", - "libc", - "once_cell", - "owo-colors", - "pgrx", - "pgrx-macros", - "pgrx-pg-config", - "postgres", - "proptest", - "rand", - "regex", - "serde", - "serde_json", - "sysinfo", + "syn 2.0.66", "thiserror", -] - -[[package]] -name = "phf" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ade2d8b8f33c7333b51bcf0428d37e217e9f32192ae4772156f65063b8ce03dc" -dependencies = [ - "phf_shared 0.11.2", + "unescape", ] [[package]] @@ -2033,39 +1984,16 @@ dependencies = [ ] [[package]] -name = "phf_shared" -version = "0.11.2" +name = "pico-args" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90fcb95eef784c2ac79119d1dd819e162b5da872ce6f3c3abe1e8ca1c082f72b" -dependencies = [ - "siphasher", -] - -[[package]] -name = "pin-project" -version = "1.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fda4ed1c6c173e3fc7a83629421152e01d7b1f9b7f65fb301e490e8cfc656422" -dependencies = [ - "pin-project-internal", -] - -[[package]] -name = "pin-project-internal" -version = "1.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4359fd9c9171ec6e8c62926d6faaf553a8dc3f64e1507e76da7911b4f6a04405" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.43", -] +checksum = "5be167a7af36ee22fe3115051bc51f6e6c7054c9348e28deb4f49bd6f705a315" [[package]] name = "pin-project-lite" -version = "0.2.13" +version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58" +checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02" [[package]] name = "pin-utils" @@ -2075,21 +2003,15 @@ checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" [[package]] name = "piper" -version = "0.2.1" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "668d31b1c4eba19242f2088b2bf3316b82ca31082a8335764db4e083db7485d4" +checksum = "ae1d5c74c9876f070d3e8fd503d748c7d974c3e48da8f41350fa5222ef9b4391" dependencies = [ "atomic-waker", - "fastrand 2.0.1", + "fastrand 2.1.0", "futures-io", ] -[[package]] -name = "pkg-config" -version = "0.3.28" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69d3587f8a9e599cc7ec2c00e331f71c4e69a5f9a4b8a6efd5b07466b9736f9a" - [[package]] name = "polling" version = "2.8.0" @@ -2108,61 +2030,19 @@ dependencies = [ [[package]] name = "polling" -version = "3.3.1" +version = "3.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf63fa624ab313c11656b4cda960bfc46c410187ad493c41f6ba2d8c1e991c9e" +checksum = "5e6a007746f34ed64099e88783b0ae369eaa3da6392868ba262e2af9b8fbaea1" dependencies = [ "cfg-if", "concurrent-queue", + "hermit-abi 0.3.9", "pin-project-lite", - "rustix 0.38.28", + "rustix 0.38.34", "tracing", "windows-sys 0.52.0", ] -[[package]] -name = "postgres" -version = "0.19.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7915b33ed60abc46040cbcaa25ffa1c7ec240668e0477c4f3070786f5916d451" -dependencies = [ - "bytes", - "fallible-iterator", - "futures-util", - "log", - "tokio", - "tokio-postgres", -] - -[[package]] -name = "postgres-protocol" -version = "0.6.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49b6c5ef183cd3ab4ba005f1ca64c21e8bd97ce4699cfea9e8d9a2c4958ca520" -dependencies = [ - "base64", - "byteorder", - "bytes", - "fallible-iterator", - "hmac", - "md-5", - "memchr", - "rand", - "sha2", - "stringprep", -] - -[[package]] -name = "postgres-types" -version = "0.2.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d2234cdee9408b523530a9b6d2d6b373d1db34f6a8e51dc03ded1828d7fb67c" -dependencies = [ - "bytes", - "fallible-iterator", - "postgres-protocol", -] - [[package]] name = "ppv-lite86" version = "0.2.17" @@ -2175,33 +2055,6 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c" -[[package]] -name = "predicates" -version = "3.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6dfc28575c2e3f19cb3c73b93af36460ae898d426eba6fc15b9bd2a5220758a0" -dependencies = [ - "anstyle", - "itertools 0.11.0", - "predicates-core", -] - -[[package]] -name = "predicates-core" -version = "1.0.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b794032607612e7abeb4db69adb4e33590fa6cf1149e95fd7cb00e634b92f174" - -[[package]] -name = "predicates-tree" -version = "1.0.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "368ba315fb8c5052ab692e68a0eefec6ec57b23a36959c14496f0b0df2c0cecf" -dependencies = [ - "predicates-core", - "termtree", -] - [[package]] name = "proc-macro-error" version = "1.0.4" @@ -2228,44 +2081,31 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.71" +version = "1.0.85" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75cb1540fadbd5b8fbccc4dddad2734eba435053f725621c070711a14bb5f4b8" +checksum = "22244ce15aa966053a896d1accb3a6e68469b97c7f33f284b99f0d576879fc23" dependencies = [ "unicode-ident", ] [[package]] -name = "proptest" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31b476131c3c86cb68032fdc5cb6d5a1045e3e42d96b69fa599fd77701e1f5bf" +name = "quantization" +version = "0.0.0" dependencies = [ - "bit-set", - "bit-vec", - "bitflags 2.4.1", - "lazy_static", + "base", + "common", + "detect", + "elkan_k_means", "num-traits", "rand", - "rand_chacha", - "rand_xorshift", - "regex-syntax 0.8.2", - "rusty-fork", - "tempfile", - "unarray", + "serde_json", ] -[[package]] -name = "quick-error" -version = "1.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" - [[package]] name = "quote" -version = "1.0.33" +version = "1.0.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" +checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" dependencies = [ "proc-macro2", ] @@ -2317,19 +2157,18 @@ dependencies = [ ] [[package]] -name = "rand_xorshift" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d25bf25ec5ae4a3f1b92f929810509a2f53d7dca2f50b794ff57e3face536c8f" +name = "rayon" +version = "0.0.0" dependencies = [ - "rand_core", + "log", + "rayon 1.10.0", ] [[package]] name = "rayon" -version = "1.8.0" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c27db03db7734835b3f53954b534c91069375ce6ccaa2e065441e07d9b6cdb1" +checksum = "b418a60154510ca1a002a752ca9714984e21e4241e804d32555251faf8b78ffa" dependencies = [ "either", "rayon-core", @@ -2337,9 +2176,9 @@ dependencies = [ [[package]] name = "rayon-core" -version = "1.12.0" +version = "1.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ce3fb6ad83f861aac485e76e1985cd109d9a3713802152be56c3b1f0e0658ed" +checksum = "1465873a3dfdaa8ae7cb14b4383657caab0b3e8a0aa9ae8e04b044854c8dfce2" dependencies = [ "crossbeam-deque", "crossbeam-utils", @@ -2347,18 +2186,18 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.4.1" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" +checksum = "469052894dcb553421e483e4209ee581a45100d31b4018de03e5a7ad86374a7e" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.5.0", ] [[package]] name = "redox_users" -version = "0.4.4" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a18479200779601e498ada4e8c1e1f50e3ee19deb0259c25825a98b5603b2cb4" +checksum = "bd283d9651eeda4b2a83a43c1c91b266c40fd76ecd39a50a8c630ae69dc72891" dependencies = [ "getrandom", "libredox", @@ -2367,58 +2206,94 @@ dependencies = [ [[package]] name = "regex" -version = "1.10.2" +version = "1.10.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "380b951a9c5e80ddfd6136919eef32310721aa4aacd4889a8d39124b026ab343" +checksum = "c117dbdfde9c8308975b6a18d71f3f385c89461f7b3fb054288ecf2a2058ba4c" dependencies = [ "aho-corasick", "memchr", "regex-automata", - "regex-syntax 0.8.2", + "regex-syntax", ] [[package]] name = "regex-automata" -version = "0.4.3" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f804c7828047e88b2d32e2d7fe5a105da8ee3264f01902f796c8e067dc2483f" +checksum = "86b83b8b9847f9bf95ef68afb0b8e6cdb80f498442f5179a29fad448fcc1eaea" dependencies = [ "aho-corasick", "memchr", - "regex-syntax 0.8.2", + "regex-syntax", ] [[package]] name = "regex-syntax" -version = "0.6.29" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" +checksum = "adad44e29e4c806119491a7f06f03de4d1af22c3a680dd47f1e6e179439d1f56" [[package]] -name = "regex-syntax" -version = "0.8.2" +name = "reqwest" +version = "0.11.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" +checksum = "dd67538700a17451e7cba03ac727fb961abb7607553461627b97de0b89cf4a62" +dependencies = [ + "base64", + "bytes", + "encoding_rs", + "futures-core", + "futures-util", + "h2", + "http", + "http-body", + "hyper", + "hyper-rustls", + "ipnet", + "js-sys", + "log", + "mime", + "once_cell", + "percent-encoding", + "pin-project-lite", + "rustls", + "rustls-pemfile", + "serde", + "serde_json", + "serde_urlencoded", + "sync_wrapper", + "system-configuration", + "tokio", + "tokio-rustls", + "tower-service", + "url", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", + "webpki-roots", + "winreg", +] [[package]] name = "ring" -version = "0.17.7" +version = "0.17.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "688c63d65483050968b2a8937f7995f443e27041a0f7700aa59b0822aedebb74" +checksum = "c17fa4cb658e3583423e915b9f3acc01cceaee1860e33d59ebae66adc3a2dc0d" dependencies = [ "cc", + "cfg-if", "getrandom", "libc", "spin", "untrusted", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] name = "rustc-demangle" -version = "0.1.23" +version = "0.1.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" +checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" [[package]] name = "rustc-hash" @@ -2432,16 +2307,7 @@ version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f0dfe2087c51c460008730de8b57e6a320782fbfb312e1f4d520e6c6fae155ee" dependencies = [ - "semver 0.11.0", -] - -[[package]] -name = "rustc_version" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" -dependencies = [ - "semver 1.0.20", + "semver", ] [[package]] @@ -2460,22 +2326,22 @@ dependencies = [ [[package]] name = "rustix" -version = "0.38.28" +version = "0.38.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72e572a5e8ca657d7366229cdde4bd14c4eb5499a9573d4d366fe1b599daa316" +checksum = "70dc5ec042f7a43c4a73241207cecc9873a06d45debb38b329f8541d85c2730f" dependencies = [ - "bitflags 2.4.1", + "bitflags 2.5.0", "errno", "libc", - "linux-raw-sys 0.4.12", + "linux-raw-sys 0.4.14", "windows-sys 0.52.0", ] [[package]] name = "rustls" -version = "0.21.10" +version = "0.21.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9d5a6813c0759e4609cd494e8e725babae6a2ca7b62a5536a13daaec6fcb7ba" +checksum = "3f56a14d1f48b391359b22f731fd4bd7e43c97f3c50eee276f3aa09c94784d3e" dependencies = [ "log", "ring", @@ -2483,6 +2349,15 @@ dependencies = [ "sct", ] +[[package]] +name = "rustls-pemfile" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c74cae0a4cf6ccbbf5f359f08efdf8ee7e1dc532573bf0db71968cb56b1448c" +dependencies = [ + "base64", +] + [[package]] name = "rustls-webpki" version = "0.101.7" @@ -2495,27 +2370,15 @@ dependencies = [ [[package]] name = "rustversion" -version = "1.0.14" +version = "1.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4" - -[[package]] -name = "rusty-fork" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb3dcc6e454c328bb824492db107ab7c0ae8fcffe4ad210136ef014458c1bc4f" -dependencies = [ - "fnv", - "quick-error", - "tempfile", - "wait-timeout", -] +checksum = "955d28af4278de8121b7ebeb796b6a45735dc01436d898801014aced2773a3d6" [[package]] name = "ryu" -version = "1.0.16" +version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f98d2aa92eebf49b69786be48e4477826b256916e84a57ff2a4f21923b48eb4c" +checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" [[package]] name = "same-file" @@ -2526,15 +2389,6 @@ dependencies = [ "winapi-util", ] -[[package]] -name = "schannel" -version = "0.1.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbc91545643bcf3a0bbb6569265615222618bdf33ce4ffbbd13c4bbd4c093534" -dependencies = [ - "windows-sys 0.52.0", -] - [[package]] name = "scopeguard" version = "1.2.0" @@ -2566,12 +2420,6 @@ dependencies = [ "semver-parser", ] -[[package]] -name = "semver" -version = "1.0.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "836fa6a3e1e547f9a2c4040802ec865b5d85f4014efe00555d7090a3dcaa1090" - [[package]] name = "semver-parser" version = "0.10.2" @@ -2582,16 +2430,19 @@ dependencies = [ ] [[package]] -name = "seq-macro" -version = "0.3.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3f0bf26fd526d2a95683cd0f87bf103b8539e2ca1ef48ce002d67aad59aa0b4" +name = "send_fd" +version = "0.0.0" +dependencies = [ + "libc", + "log", + "rustix 0.38.34", +] [[package]] name = "serde" -version = "1.0.193" +version = "1.0.203" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25dd9975e68d0cb5aa1120c288333fc98731bd1dd12f561e468ea4728c042b89" +checksum = "7253ab4de971e72fb7be983802300c30b5a7f0c2e56fab8abfc6a214307c0094" dependencies = [ "serde_derive", ] @@ -2602,26 +2453,26 @@ version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2bef2ebfde456fb76bbcf9f59315333decc4fda0b2b44b420243c11e0f5ec1f5" dependencies = [ - "half 1.8.2", + "half 1.8.3", "serde", ] [[package]] name = "serde_derive" -version = "1.0.193" +version = "1.0.203" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43576ca501357b9b071ac53cdc7da8ef0cbd9493d8df094cd821777ea6e894d3" +checksum = "500cbc0ebeb6f46627f50f3f5811ccf6bf00643be300b4c3eabc0ef55dc5b5ba" dependencies = [ "proc-macro2", "quote", - "syn 2.0.43", + "syn 2.0.66", ] [[package]] name = "serde_json" -version = "1.0.108" +version = "1.0.117" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d1c7e3eac408d115102c4c24ad393e0821bb3a5df4d506a80f85f7a742a526b" +checksum = "455182ea6142b14f93f4bc5320a2b31c1f266b66a4a5c858b013302a5d8cbfc3" dependencies = [ "itoa", "ryu", @@ -2640,77 +2491,59 @@ dependencies = [ [[package]] name = "serde_spanned" -version = "0.6.5" +version = "0.6.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb3622f419d1296904700073ea6cc23ad690adbd66f13ea683df73298736f0c1" +checksum = "79e674e01f999af37c49f70a6ede167a8a60b2503e56c5599532a65baa5969a0" dependencies = [ "serde", ] +[[package]] +name = "serde_urlencoded" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" +dependencies = [ + "form_urlencoded", + "itoa", + "ryu", + "serde", +] + [[package]] name = "service" version = "0.0.0" dependencies = [ "arc-swap", - "arrayvec", - "bincode", - "bytemuck", - "byteorder", - "c", - "crc32fast", - "crossbeam", - "dashmap", - "detect", - "half 2.3.1", - "libc", - "log", - "memmap2", - "memoffset", - "multiversion", - "num-traits", + "base", + "common", + "index", "parking_lot", - "rand", - "rayon", - "rustix 0.38.28", "serde", "serde_json", "thiserror", - "ulock-sys", - "uuid", - "validator", -] - -[[package]] -name = "sha2" -version = "0.10.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" -dependencies = [ - "cfg-if", - "cpufeatures", - "digest", ] [[package]] name = "shlex" -version = "1.2.0" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7cee0529a6d40f580e7a5e6c495c8fbfe21b7b52795ed4bb5e62cdf92bc6380" +checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" [[package]] name = "signal-hook-registry" -version = "1.4.1" +version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8229b473baa5980ac72ef434c4415e70c4b5e71b423043adb4ba059f89c99a1" +checksum = "a9e9e0b4211b72e7b8b6e85c807d36c212bdb33ea8587f7569562a84df5465b1" dependencies = [ "libc", ] [[package]] name = "similar" -version = "2.3.0" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2aeaf503862c419d66959f5d7ca015337d864e9c49485d771b732e2a20453597" +checksum = "fa42c91313f1d05da9b26f267f931cf178d4aba455b4c4622dd7355eb80c6640" [[package]] name = "siphasher" @@ -2727,22 +2560,11 @@ dependencies = [ "autocfg", ] -[[package]] -name = "sluice" -version = "0.5.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d7400c0eff44aa2fcb5e31a5f24ba9716ed90138769e4977a2ba6014ae63eb5" -dependencies = [ - "async-channel 1.9.0", - "futures-core", - "futures-io", -] - [[package]] name = "smallvec" -version = "1.11.2" +version = "1.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4dccd0940a2dcdf68d092b8cbab7dc0ad8fa938bf95787e1b916b0e3d0e8e970" +checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" [[package]] name = "socket2" @@ -2756,12 +2578,12 @@ dependencies = [ [[package]] name = "socket2" -version = "0.5.5" +version = "0.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b5fac59a5cb5dd637972e5fca70daf0523c9067fcdc4842f053dae04a18f8e9" +checksum = "ce305eb0b4296696835b71df73eb912e0f1ffd2556a501fcede6e0c50349191c" dependencies = [ "libc", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] @@ -2769,9 +2591,6 @@ name = "spin" version = "0.9.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" -dependencies = [ - "lock_api", -] [[package]] name = "sptr" @@ -2786,12 +2605,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" [[package]] -name = "std_detect" -version = "0.1.5" -source = "git+https://github.com/rust-lang/stdarch.git?branch=master#d2b1a070afc72d9ba4df80e055109ede5fc0a81f" +name = "storage" +version = "0.0.0" dependencies = [ - "cfg-if", - "libc", + "base", + "common", ] [[package]] @@ -2803,26 +2621,25 @@ dependencies = [ "new_debug_unreachable", "once_cell", "parking_lot", - "phf_shared 0.10.0", + "phf_shared", "precomputed-hash", ] [[package]] -name = "stringprep" -version = "0.1.4" +name = "strsim" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb41d74e231a107a1b4ee36bd1214b11285b77768d2e3824aedafa988fd36ee6" -dependencies = [ - "finl_unicode", - "unicode-bidi", - "unicode-normalization", -] +checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" [[package]] -name = "subtle" -version = "2.5.0" +name = "supports-color" +version = "1.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" +checksum = "8ba6faf2ca7ee42fdd458f4347ae0a9bd6bcc445ad7cb57ad82b383f18870d6f" +dependencies = [ + "atty", + "is_ci", +] [[package]] name = "syn" @@ -2837,9 +2654,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.43" +version = "2.0.66" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee659fb5f3d355364e1f3e5bc10fb82068efbf824a1e9d1c9504244a6469ad53" +checksum = "c42f3f41a2de00b01c0aaad383c5a45241efc8b2d1eda5661812fda5f3cdcff5" dependencies = [ "proc-macro2", "quote", @@ -2847,18 +2664,30 @@ dependencies = [ ] [[package]] -name = "sysinfo" -version = "0.29.11" +name = "sync_wrapper" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd727fc423c2060f6c92d9534cef765c65a6ed3f428a03d7def74a8c4348e666" +checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" + +[[package]] +name = "system-configuration" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba3a3adc5c275d719af8cb4272ea1c4a6d668a777f37e115f6d11ddbc1c8e0e7" +dependencies = [ + "bitflags 1.3.2", + "core-foundation", + "system-configuration-sys", +] + +[[package]] +name = "system-configuration-sys" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a75fb188eb626b924683e3b95e3a48e63551fcfb51949de2f06a9d91dbee93c9" dependencies = [ - "cfg-if", "core-foundation-sys", "libc", - "ntapi", - "once_cell", - "rayon", - "winapi", ] [[package]] @@ -2867,25 +2696,6 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" -[[package]] -name = "target-features" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cfb5fa503293557c5158bd215fdc225695e567a77e453f5d4452a50a193969bd" - -[[package]] -name = "tempfile" -version = "3.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01ce4141aa927a6d1bd34a041795abd0db1cccba5d5f24b009f694bdf3a1f3fa" -dependencies = [ - "cfg-if", - "fastrand 2.0.1", - "redox_syscall", - "rustix 0.38.28", - "windows-sys 0.52.0", -] - [[package]] name = "term" version = "0.7.0" @@ -2897,39 +2707,44 @@ dependencies = [ "winapi", ] -[[package]] -name = "termcolor" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff1bc3d3f05aff0403e8ac0d92ced918ec05b666a43f83297ccef5bea8a3d449" -dependencies = [ - "winapi-util", -] - -[[package]] -name = "termtree" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3369f5ac52d5eb6ab48c6b4ffdc8efbcad6b89c765749064ba298f2c68a16a76" - [[package]] name = "thiserror" -version = "1.0.52" +version = "1.0.61" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83a48fd946b02c0a526b2e9481c8e2a17755e47039164a86c4070446e3a4614d" +checksum = "c546c80d6be4bc6a00c0f01730c08df82eaa7a7a61f11d656526506112cc1709" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.52" +version = "1.0.61" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7fbe9b594d6568a6a1443250a7e67d80b74e1e96f6d1715e1e21cc1888291d3" +checksum = "46c3384250002a6d5af4d114f2845d37b57521033f30d5c3f46c4d70e1197533" dependencies = [ "proc-macro2", "quote", - "syn 2.0.43", + "syn 2.0.66", +] + +[[package]] +name = "tikv-jemalloc-sys" +version = "0.5.4+5.3.0-patched" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9402443cb8fd499b6f327e40565234ff34dbda27460c5b47db0db77443dd85d1" +dependencies = [ + "cc", + "libc", +] + +[[package]] +name = "tikv-jemallocator" +version = "0.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "965fe0c26be5c56c94e38ba547249074803efd52adfb66de62107d95aab3eaca" +dependencies = [ + "libc", + "tikv-jemalloc-sys", ] [[package]] @@ -2958,9 +2773,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.35.1" +version = "1.38.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c89b4efa943be685f629b149f53829423f8f5531ea21249408e8e2f8671ec104" +checksum = "ba4f4a02a7a80d6f274636f0aa95c7e383b912d41fe721a31f29e29698585a4a" dependencies = [ "backtrace", "bytes", @@ -2969,67 +2784,50 @@ dependencies = [ "num_cpus", "pin-project-lite", "signal-hook-registry", - "socket2 0.5.5", + "socket2 0.5.7", "tokio-macros", "windows-sys 0.48.0", ] [[package]] name = "tokio-macros" -version = "2.2.0" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" +checksum = "5f5ae998a069d4b5aba8ee9dad856af7d520c3699e6159b185c2acd48155d39a" dependencies = [ "proc-macro2", "quote", - "syn 2.0.43", + "syn 2.0.66", ] [[package]] -name = "tokio-postgres" -version = "0.7.10" +name = "tokio-rustls" +version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d340244b32d920260ae7448cb72b6e238bddc3d4f7603394e7dd46ed8e48f5b8" +checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" dependencies = [ - "async-trait", - "byteorder", - "bytes", - "fallible-iterator", - "futures-channel", - "futures-util", - "log", - "parking_lot", - "percent-encoding", - "phf", - "pin-project-lite", - "postgres-protocol", - "postgres-types", - "rand", - "socket2 0.5.5", + "rustls", "tokio", - "tokio-util", - "whoami", ] [[package]] name = "tokio-util" -version = "0.7.10" +version = "0.7.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5419f34732d9eb6ee4c3578b7989078579b7f039cbbb9ca2c4da015749371e15" +checksum = "9cf6b47b3771c49ac75ad09a6162f53ad4b8088b76ac60e8ec1455b31a189fe1" dependencies = [ "bytes", "futures-core", "futures-sink", "pin-project-lite", "tokio", - "tracing", ] [[package]] name = "toml" -version = "0.8.8" +version = "0.8.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1a195ec8c9da26928f773888e0742ca3ca1040c6cd859c919c9f59c1954ab35" +checksum = "6f49eb2ab21d2f26bd6db7bf383edc527a7ebaee412d17af4d40fdccd442f335" dependencies = [ "serde", "serde_spanned", @@ -3039,18 +2837,18 @@ dependencies = [ [[package]] name = "toml_datetime" -version = "0.6.5" +version = "0.6.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3550f4e9685620ac18a50ed434eb3aec30db8ba93b0287467bca5826ea25baf1" +checksum = "4badfd56924ae69bcc9039335b2e017639ce3f9b001c393c1b2d1ef846ce2cbf" dependencies = [ "serde", ] [[package]] name = "toml_edit" -version = "0.21.0" +version = "0.22.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d34d383cd00a163b4a5b85053df514d45bc330f6de7737edfe0a93311d1eaa03" +checksum = "f21c7aaf97f1bd9ca9d4f9e73b0a6c74bd5afef56f2bc931943a6e1c37e04e38" dependencies = [ "indexmap", "serde", @@ -3071,23 +2869,10 @@ version = "0.1.40" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" dependencies = [ - "log", "pin-project-lite", - "tracing-attributes", "tracing-core", ] -[[package]] -name = "tracing-attributes" -version = "0.1.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.43", -] - [[package]] name = "tracing-core" version = "0.1.32" @@ -3097,28 +2882,12 @@ dependencies = [ "once_cell", ] -[[package]] -name = "tracing-futures" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97d095ae15e245a057c8e8451bab9b3ee1e1f68e9ba2b4fbc18d0ac5237835f2" -dependencies = [ - "pin-project", - "tracing", -] - [[package]] name = "try-lock" version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" -[[package]] -name = "typenum" -version = "1.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" - [[package]] name = "ucd-trie" version = "0.1.6" @@ -3134,12 +2903,6 @@ dependencies = [ "cty", ] -[[package]] -name = "unarray" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eaea85b334db583fe3274d12b4cd1880032beab409c0d774be044d4480ab9a94" - [[package]] name = "unescape" version = "0.1.0" @@ -3148,9 +2911,9 @@ checksum = "ccb97dac3243214f8d8507998906ca3e2e0b900bf9bf4870477f125b82e68f6e" [[package]] name = "unicode-bidi" -version = "0.3.14" +version = "0.3.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f2528f27a9eb2b21e69c95319b30bd0efd85d09c379741b0f78ea1d86be2416" +checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75" [[package]] name = "unicode-ident" @@ -3160,18 +2923,18 @@ checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" [[package]] name = "unicode-normalization" -version = "0.1.22" +version = "0.1.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921" +checksum = "a56d1686db2308d901306f92a263857ef59ea39678a5458e7cb17f01415101f5" dependencies = [ "tinyvec", ] [[package]] name = "unicode-segmentation" -version = "1.10.1" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1dd624098567895118886609431a7c3b8f516e41d30e0643f03d94592a147e36" +checksum = "d4c87d22b6e3f4a18d4d40ef354e97c90fcb14dd91d7dc0aa9d8a1172ebf7202" [[package]] name = "unicode-xid" @@ -3185,24 +2948,6 @@ version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" -[[package]] -name = "ureq" -version = "2.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8cdd25c339e200129fe4de81451814e5228c9b771d57378817d6117cc2b3f97" -dependencies = [ - "base64", - "flate2", - "log", - "once_cell", - "rustls", - "rustls-webpki", - "serde", - "serde_json", - "url", - "webpki-roots", -] - [[package]] name = "url" version = "2.5.0" @@ -3210,15 +2955,21 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "31e6302e3bb753d46e83516cae55ae196fc0c309407cf11ab35cc51a4c2a4633" dependencies = [ "form_urlencoded", - "idna 0.5.0", + "idna", "percent-encoding", ] [[package]] -name = "uuid" -version = "1.6.1" +name = "utf8parse" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e395fcf16a7a3d8127ec99782007af141946b4795001f876d54fb0d55978560" +checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" + +[[package]] +name = "uuid" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a183cf7feeba97b4dd1c0d46788634f6221d87fa961b305bed08c851829efcc0" dependencies = [ "getrandom", "serde", @@ -3226,12 +2977,12 @@ dependencies = [ [[package]] name = "validator" -version = "0.16.1" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b92f40481c04ff1f4f61f304d61793c7b56ff76ac1469f1beb199b1445b253bd" +checksum = "db79c75af171630a3148bd3e6d7c4f42b6a9a014c2945bc5ed0020cbb8d9478e" dependencies = [ - "idna 0.4.0", - "lazy_static", + "idna", + "once_cell", "regex", "serde", "serde_derive", @@ -3242,66 +2993,55 @@ dependencies = [ [[package]] name = "validator_derive" -version = "0.16.0" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc44ca3088bb3ba384d9aecf40c6a23a676ce23e09bdaca2073d99c207f864af" +checksum = "55591299b7007f551ed1eb79a684af7672c19c3193fb9e0a31936987bb2438ec" dependencies = [ - "if_chain", - "lazy_static", + "darling", + "once_cell", "proc-macro-error", "proc-macro2", "quote", - "regex", - "syn 1.0.109", - "validator_types", -] - -[[package]] -name = "validator_types" -version = "0.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "111abfe30072511849c5910134e8baf8dc05de4c0e5903d681cbd5c9c4d611e3" -dependencies = [ - "proc-macro2", - "syn 1.0.109", + "syn 2.0.66", ] [[package]] name = "value-bag" -version = "1.4.2" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a72e1902dde2bd6441347de2b70b7f5d59bf157c6c62f0c44572607a1d55bbe" - -[[package]] -name = "vcpkg" -version = "0.2.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" +checksum = "5a84c137d37ab0142f0f2ddfe332651fdbf252e7b7dbb4e67b6c1f1b2e925101" [[package]] name = "vectors" version = "0.0.0" dependencies = [ + "arrayvec", + "base", "bincode", "bytemuck", "byteorder", + "chrono", + "csv", "detect", + "embedding", "env_logger", - "half 2.3.1", - "httpmock", + "interprocess_atomic_wait", "libc", "log", - "mockall", + "memfd", + "memmap2", "num-traits", - "openai_api_rust", + "paste", "pgrx", - "pgrx-tests", "rand", - "rustix 0.38.28", + "rustix 0.38.34", + "scopeguard", + "send_fd", "serde", "serde_json", "service", "thiserror", + "tikv-jemallocator", "toml", "validator", ] @@ -3312,26 +3052,17 @@ version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" -[[package]] -name = "wait-timeout" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f200f5b12eb75f8c1ed65abd4b2db8a6e1b138a20de009dacee265a2498f3f6" -dependencies = [ - "libc", -] - [[package]] name = "waker-fn" -version = "1.1.1" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3c4517f54858c779bbcbf228f4fca63d121bf85fbecb2dc578cdf4a39395690" +checksum = "317211a0dc0ceedd78fb2ca9a44aed3d7b9b26f81870d485c07122b4350673b7" [[package]] name = "walkdir" -version = "2.4.0" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d71d857dc86794ca4c280d616f7da00d2dbfd8cd788846559a6813e6aa4b54ee" +checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b" dependencies = [ "same-file", "winapi-util", @@ -3354,9 +3085,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.89" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ed0d4f68a3015cc185aff4db9506a015f4b96f95303897bfa23f846db54064e" +checksum = "4be2531df63900aeb2bca0daaaddec08491ee64ceecbee5076636a3b026795a8" dependencies = [ "cfg-if", "wasm-bindgen-macro", @@ -3364,24 +3095,24 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.89" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b56f625e64f3a1084ded111c4d5f477df9f8c92df113852fa5a374dbda78826" +checksum = "614d787b966d3989fa7bb98a654e369c762374fd3213d212cfc0251257e747da" dependencies = [ "bumpalo", "log", "once_cell", "proc-macro2", "quote", - "syn 2.0.43", + "syn 2.0.66", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.39" +version = "0.4.42" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac36a15a220124ac510204aec1c3e5db8a22ab06fd6706d881dc6149f8ed9a12" +checksum = "76bc14366121efc8dbb487ab05bcc9d346b3b5ec0eaa76e46594cabbe51762c0" dependencies = [ "cfg-if", "js-sys", @@ -3391,9 +3122,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.89" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0162dbf37223cd2afce98f3d0785506dcb8d266223983e4b5b525859e6e182b2" +checksum = "a1f8823de937b71b9460c0c34e25f3da88250760bec0ebac694b49997550d726" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -3401,28 +3132,28 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.89" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0eb82fcb7930ae6219a7ecfd55b217f5f0893484b7a13022ebb2b2bf20b5283" +checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.43", + "syn 2.0.66", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.89" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ab9b36309365056cd639da3134bf87fa8f3d86008abf99e612384a6eecd459f" +checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96" [[package]] name = "web-sys" -version = "0.3.66" +version = "0.3.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50c24a44ec86bb68fbecd1b3efed7e85ea5621b39b35ef2766b66cd984f8010f" +checksum = "77afa9a11836342370f4817622a2f0f418b134426d91a82dfb48f532d2ec13ef" dependencies = [ "js-sys", "wasm-bindgen", @@ -3430,19 +3161,9 @@ dependencies = [ [[package]] name = "webpki-roots" -version = "0.25.3" +version = "0.25.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1778a42e8b3b90bff8d0f5032bf22250792889a5cdc752aa0020c84abe3aaf10" - -[[package]] -name = "whoami" -version = "1.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22fc3756b8a9133049b26c7f61ab35416c130e8c09b660f5b3958b446f52cc50" -dependencies = [ - "wasm-bindgen", - "web-sys", -] +checksum = "5f20c57d8d7db6d3b86154206ae5d8fba62dd39573114de97c2cb0578251f8e1" [[package]] name = "winapi" @@ -3462,11 +3183,11 @@ checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" [[package]] name = "winapi-util" -version = "0.1.6" +version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f29e6f9198ba0d26b4c9f07dbe6f9ed633e1f3d5b8b414090084349e46a52596" +checksum = "4d4cc384e1e73b93bafa6fb4f1df8c41695c8a91cf9c4c64358067d15a7b6c6b" dependencies = [ - "winapi", + "windows-sys 0.52.0", ] [[package]] @@ -3475,6 +3196,15 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" +[[package]] +name = "windows-core" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" +dependencies = [ + "windows-targets 0.52.5", +] + [[package]] name = "windows-sys" version = "0.48.0" @@ -3490,7 +3220,7 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" dependencies = [ - "windows-targets 0.52.0", + "windows-targets 0.52.5", ] [[package]] @@ -3510,17 +3240,18 @@ dependencies = [ [[package]] name = "windows-targets" -version = "0.52.0" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a18201040b24831fbb9e4eb208f8892e1f50a37feb53cc7ff887feb8f50e7cd" +checksum = "6f0713a46559409d202e70e28227288446bf7841d3211583a4b53e3f6d96e7eb" dependencies = [ - "windows_aarch64_gnullvm 0.52.0", - "windows_aarch64_msvc 0.52.0", - "windows_i686_gnu 0.52.0", - "windows_i686_msvc 0.52.0", - "windows_x86_64_gnu 0.52.0", - "windows_x86_64_gnullvm 0.52.0", - "windows_x86_64_msvc 0.52.0", + "windows_aarch64_gnullvm 0.52.5", + "windows_aarch64_msvc 0.52.5", + "windows_i686_gnu 0.52.5", + "windows_i686_gnullvm", + "windows_i686_msvc 0.52.5", + "windows_x86_64_gnu 0.52.5", + "windows_x86_64_gnullvm 0.52.5", + "windows_x86_64_msvc 0.52.5", ] [[package]] @@ -3531,9 +3262,9 @@ checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" [[package]] name = "windows_aarch64_gnullvm" -version = "0.52.0" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb7764e35d4db8a7921e09562a0304bf2f93e0a51bfccee0bd0bb0b666b015ea" +checksum = "7088eed71e8b8dda258ecc8bac5fb1153c5cffaf2578fc8ff5d61e23578d3263" [[package]] name = "windows_aarch64_msvc" @@ -3543,9 +3274,9 @@ checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" [[package]] name = "windows_aarch64_msvc" -version = "0.52.0" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbaa0368d4f1d2aaefc55b6fcfee13f41544ddf36801e793edbbfd7d7df075ef" +checksum = "9985fd1504e250c615ca5f281c3f7a6da76213ebd5ccc9561496568a2752afb6" [[package]] name = "windows_i686_gnu" @@ -3555,9 +3286,15 @@ checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" [[package]] name = "windows_i686_gnu" -version = "0.52.0" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a28637cb1fa3560a16915793afb20081aba2c92ee8af57b4d5f28e4b3e7df313" +checksum = "88ba073cf16d5372720ec942a8ccbf61626074c6d4dd2e745299726ce8b89670" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.52.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87f4261229030a858f36b459e748ae97545d6f1ec60e5e0d6a3d32e0dc232ee9" [[package]] name = "windows_i686_msvc" @@ -3567,9 +3304,9 @@ checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" [[package]] name = "windows_i686_msvc" -version = "0.52.0" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffe5e8e31046ce6230cc7215707b816e339ff4d4d67c65dffa206fd0f7aa7b9a" +checksum = "db3c2bf3d13d5b658be73463284eaf12830ac9a26a90c717b7f771dfe97487bf" [[package]] name = "windows_x86_64_gnu" @@ -3579,9 +3316,9 @@ checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" [[package]] name = "windows_x86_64_gnu" -version = "0.52.0" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d6fa32db2bc4a2f5abeacf2b69f7992cd09dca97498da74a151a3132c26befd" +checksum = "4e4246f76bdeff09eb48875a0fd3e2af6aada79d409d33011886d3e1581517d9" [[package]] name = "windows_x86_64_gnullvm" @@ -3591,9 +3328,9 @@ checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" [[package]] name = "windows_x86_64_gnullvm" -version = "0.52.0" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a657e1e9d3f514745a572a6846d3c7aa7dbe1658c056ed9c3344c4109a6949e" +checksum = "852298e482cd67c356ddd9570386e2862b5673c85bd5f88df9ab6802b334c596" [[package]] name = "windows_x86_64_msvc" @@ -3603,19 +3340,29 @@ checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" [[package]] name = "windows_x86_64_msvc" -version = "0.52.0" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dff9641d1cd4be8d1a070daf9e3773c5f67e78b4d9d42263020c057706765c04" +checksum = "bec47e5bfd1bff0eeaf6d8b485cc1074891a197ab4225d504cb7a1ab88b02bf0" [[package]] name = "winnow" -version = "0.5.31" +version = "0.6.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97a4882e6b134d6c28953a387571f1acdd3496830d5e36c5e3a1075580ea641c" +checksum = "56c52728401e1dc672a56e81e593e912aa54c78f40246869f78359a2bf24d29d" dependencies = [ "memchr", ] +[[package]] +name = "winreg" +version = "0.50.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "524e57b2c537c0f9b1e69f1965311ec12182b4122e45035b1508cd24d2adadb1" +dependencies = [ + "cfg-if", + "windows-sys 0.48.0", +] + [[package]] name = "wyz" version = "0.5.1" diff --git a/pkgs/servers/sql/postgresql/ext/pgvecto-rs/default.nix b/pkgs/servers/sql/postgresql/ext/pgvecto-rs/default.nix index 0041c555362b..aca5c543cb24 100644 --- a/pkgs/servers/sql/postgresql/ext/pgvecto-rs/default.nix +++ b/pkgs/servers/sql/postgresql/ext/pgvecto-rs/default.nix @@ -1,6 +1,6 @@ { lib , buildPgrxExtension -, cargo-pgrx_0_11_2 +, cargo-pgrx_0_12_0_alpha_1 , clang_16 , fetchFromGitHub , nix-update-script @@ -27,13 +27,13 @@ in # Upstream only works with a fixed version of cargo-pgrx for each release, # so we're pinning it here to avoid future incompatibility. # See https://docs.pgvecto.rs/developers/development.html#environment, step 6 - cargo-pgrx = cargo-pgrx_0_11_2; + cargo-pgrx = cargo-pgrx_0_12_0_alpha_1; rustPlatform = rustPlatform'; }) rec { inherit postgresql; pname = "pgvecto-rs"; - version = "0.2.1"; + version = "0.3.0"; buildInputs = [ openssl ]; nativeBuildInputs = [ pkg-config ]; @@ -44,17 +44,13 @@ in src = ./0001-read-clang-flags-from-environment.diff; clang = lib.getExe clang; }) - # Fix build failure on rustc 1.78 due to missing feature flag. - # Can (likely) be removed when pgvecto-rs 0.3.0 is released. - # See https://github.com/NixOS/nixpkgs/issues/320131 - ./0002-std-detect-use-upstream.diff ]; src = fetchFromGitHub { owner = "tensorchord"; repo = "pgvecto.rs"; rev = "v${version}"; - hash = "sha256-kwaGHerEVh6Oxb9jQupSapm7CsKl5CoH6jCv+zbi4FE="; + hash = "sha256-X7BY2Exv0xQNhsS/GA7GNvj9OeVDqVCd/k3lUkXtfgE="; }; # Package has git dependencies on Cargo.lock (instead of just crate.io dependencies), @@ -62,8 +58,7 @@ in cargoLock = { lockFile = ./Cargo.lock; outputHashes = { - "openai_api_rust-0.1.8" = "sha256-os5Y8KIWXJEYEcNzzT57wFPpEXdZ2Uy9W3j5+hJhhR4="; - "std_detect-0.1.5" = "sha256-Rsy8N0pTJ/3AIHjRyeOeyY7Q9Ho46ZcDmJFurCbRxiQ="; + "pgrx-0.12.0-alpha.1" = "sha256-HSQrAR9DFJsi4ZF4hLiJ1sIy+M9Ygva2+WxeUzflOLk="; }; }; @@ -86,6 +81,9 @@ in RUSTC_BOOTSTRAP = 1; }; + # This crate does not have the "pg_test" feature + usePgTestCheckFeature = false; + passthru = { updateScript = nix-update-script { }; tests = { @@ -94,11 +92,8 @@ in }; meta = with lib; { - # The pgrx 0.11.2 dependency is broken in aarch64-linux: https://github.com/pgcentralfoundation/pgrx/issues/1429 - # It is fixed in pgrx 0.11.3, but upstream is still using pgrx 0.11.2 - # Additionally, upstream (accidentally) broke support for PostgreSQL 12 and 13 on 0.2.1, but - # they are removing it in 0.3.0 either way: https://github.com/tensorchord/pgvecto.rs/issues/343 - broken = (stdenv.isLinux && stdenv.isAarch64) || stdenv.isDarwin || (versionOlder postgresql.version "14"); + # Upstream removed support for PostgreSQL 12 and 13 on 0.3.0: https://github.com/tensorchord/pgvecto.rs/issues/343 + broken = stdenv.isDarwin || (versionOlder postgresql.version "14"); description = "Scalable, Low-latency and Hybrid-enabled Vector Search in Postgres"; homepage = "https://github.com/tensorchord/pgvecto.rs"; license = licenses.asl20; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 1c85f63b569e..b69205a73d09 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -16302,6 +16302,7 @@ with pkgs; cargo-pgrx_0_10_2 cargo-pgrx_0_11_2 cargo-pgrx_0_11_3 + cargo-pgrx_0_12_0_alpha_1 ; cargo-pgrx = cargo-pgrx_0_11_2; From 6c1b8188384769f174c948c662c439897f64c6c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gabriel=20Ostroluck=C3=BD?= Date: Sat, 7 Sep 2024 22:26:45 +0200 Subject: [PATCH 02/65] bazarr: Add missing dependency for PostgreSQL DB Bazarr shipped with Nix currently doesn't support [PostgreSQL connection](https://wiki.bazarr.media/Additional-Configuration/PostgreSQL-Database/), because of this missing dependency --- pkgs/servers/bazarr/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/servers/bazarr/default.nix b/pkgs/servers/bazarr/default.nix index e30beee899ef..7b19d1df5633 100644 --- a/pkgs/servers/bazarr/default.nix +++ b/pkgs/servers/bazarr/default.nix @@ -27,6 +27,7 @@ stdenv.mkDerivation rec { ps.gevent-websocket ps.pillow ps.setuptools + ps.psycopg2 ])) ] ++ runtimeProgDeps; From 36c91ba5d090923d6696eaef1a3581e14cab415e Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Sun, 15 Sep 2024 00:17:26 +0000 Subject: [PATCH 03/65] deck: 1.39.6 -> 1.40.1 --- pkgs/applications/networking/deck/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/applications/networking/deck/default.nix b/pkgs/applications/networking/deck/default.nix index 608739266618..d93351657820 100644 --- a/pkgs/applications/networking/deck/default.nix +++ b/pkgs/applications/networking/deck/default.nix @@ -2,13 +2,13 @@ buildGoModule rec { pname = "deck"; - version = "1.39.6"; + version = "1.40.1"; src = fetchFromGitHub { owner = "Kong"; repo = "deck"; rev = "v${version}"; - hash = "sha256-IiwS+NsjXW4kVAaJnsI8HEAl2pPRQr3K2ZpC7n/VjU4="; + hash = "sha256-wb7/g1g7gxKhZyK7GW+6aGwuD+Dkcdg2Zpc0JCxVPjM="; }; nativeBuildInputs = [ installShellFiles ]; @@ -21,7 +21,7 @@ buildGoModule rec { ]; proxyVendor = true; # darwin/linux hash mismatch - vendorHash = "sha256-wpTXuyeUIPg6WPzVyOIFadodlKHzr5DeDeHhDRKsYbY="; + vendorHash = "sha256-8o3jXkhfRIGGPtw8ow+NyAYAuCJNrBlSyfdSI0pjvDQ="; postInstall = '' installShellCompletion --cmd deck \ From aee15e113f1ac8157a5fc1f92540fa181ac8c69a Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 15 Sep 2024 10:52:39 +0200 Subject: [PATCH 04/65] python312Packages.aioitertools: 0.11.0 -> 0.12.0 --- pkgs/development/python-modules/aioitertools/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/aioitertools/default.nix b/pkgs/development/python-modules/aioitertools/default.nix index 6d59d99d14c8..6a55c109140b 100644 --- a/pkgs/development/python-modules/aioitertools/default.nix +++ b/pkgs/development/python-modules/aioitertools/default.nix @@ -16,14 +16,14 @@ buildPythonPackage rec { pname = "aioitertools"; - version = "0.11.0"; + version = "0.12.0"; format = "pyproject"; disabled = pythonOlder "3.6"; src = fetchPypi { inherit pname version; - hash = "sha256-QsaLjdOmnCv38iM7999LtYtVe8pSUqwC7VGHu8Z9aDE="; + hash = "sha256-wqkFW0+7dwX1YbnYYFPor10QzIRdIsMgCMQ0kLLY3Ws="; }; nativeBuildInputs = [ flit-core ]; From 498bfee8f6befdf52a0ee40dd55c078acb4393ab Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 15 Sep 2024 10:57:15 +0200 Subject: [PATCH 05/65] python312Packages.aioitertools: refactor --- pkgs/development/python-modules/aioitertools/default.nix | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/pkgs/development/python-modules/aioitertools/default.nix b/pkgs/development/python-modules/aioitertools/default.nix index 6a55c109140b..879d1d5c6b52 100644 --- a/pkgs/development/python-modules/aioitertools/default.nix +++ b/pkgs/development/python-modules/aioitertools/default.nix @@ -17,18 +17,18 @@ buildPythonPackage rec { pname = "aioitertools"; version = "0.12.0"; - format = "pyproject"; + pyproject = true; - disabled = pythonOlder "3.6"; + disabled = pythonOlder "3.8"; src = fetchPypi { inherit pname version; hash = "sha256-wqkFW0+7dwX1YbnYYFPor10QzIRdIsMgCMQ0kLLY3Ws="; }; - nativeBuildInputs = [ flit-core ]; + build-system = [ flit-core ]; - propagatedBuildInputs = lib.optionals (pythonOlder "3.10") [ typing-extensions ]; + dependencies = lib.optionals (pythonOlder "3.10") [ typing-extensions ]; nativeCheckInputs = [ unittestCheckHook ]; @@ -37,6 +37,7 @@ buildPythonPackage rec { meta = with lib; { description = "Implementation of itertools, builtins, and more for AsyncIO and mixed-type iterables"; homepage = "https://aioitertools.omnilib.dev/"; + changelog = "https://github.com/omnilib/aioitertools/blob/v${version}/CHANGELOG.md"; license = licenses.mit; maintainers = with maintainers; [ teh ]; }; From 6c1e1d053c1b38aa144061631d35fa5f10051f90 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 22 Sep 2024 12:54:16 +0200 Subject: [PATCH 06/65] onthespot: add async-timeout --- pkgs/by-name/on/onthespot/package.nix | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/pkgs/by-name/on/onthespot/package.nix b/pkgs/by-name/on/onthespot/package.nix index 696a7e51f78e..f1bdd48cf3ec 100644 --- a/pkgs/by-name/on/onthespot/package.nix +++ b/pkgs/by-name/on/onthespot/package.nix @@ -10,7 +10,7 @@ python3.pkgs.buildPythonApplication rec { pname = "onthespot"; version = "0.5"; - format = "pyproject"; + pyproject = true; src = fetchFromGitHub { owner = "casualsnek"; @@ -19,12 +19,23 @@ python3.pkgs.buildPythonApplication rec { hash = "sha256-VaJBNsT7uNOGY43GnzhUqDQNiPoFZcc2UaIfOKgkufg="; }; + pythonRemoveDeps = [ + "PyQt5-Qt5" + "PyQt5-stubs" + # Doesn't seem to be used in the sources and causes + # build issues + "PyOgg" + ]; + + pythonRelaxDeps = true; + nativeBuildInputs = with python3.pkgs; [ copyDesktopItems libsForQt5.wrapQtAppsHook ]; - propagatedBuildInputs = with python3.pkgs; [ + dependencies = with python3.pkgs; [ + async-timeout charset-normalizer defusedxml ffmpeg @@ -43,16 +54,6 @@ python3.pkgs.buildPythonApplication rec { zeroconf ]; - pythonRemoveDeps = [ - "PyQt5-Qt5" - "PyQt5-stubs" - # Doesn't seem to be used in the sources and causes - # build issues - "PyOgg" - ]; - - pythonRelaxDeps = true; - postInstall = '' install -Dm444 $src/src/onthespot/resources/icon.png $out/share/icons/hicolor/256x256/apps/onthespot.png ''; From 364a8c30fd18cfb89fe9f24d57e5d8a88ecbc03b Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 22 Sep 2024 12:55:09 +0200 Subject: [PATCH 07/65] onthespot: format with nixfmt --- pkgs/by-name/on/onthespot/package.nix | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/pkgs/by-name/on/onthespot/package.nix b/pkgs/by-name/on/onthespot/package.nix index f1bdd48cf3ec..52829c70ef39 100644 --- a/pkgs/by-name/on/onthespot/package.nix +++ b/pkgs/by-name/on/onthespot/package.nix @@ -1,10 +1,11 @@ -{ lib -, copyDesktopItems -, fetchFromGitHub -, makeDesktopItem -, python3 -, libsForQt5 -, ffmpeg +{ + lib, + copyDesktopItems, + fetchFromGitHub, + makeDesktopItem, + python3, + libsForQt5, + ffmpeg, }: python3.pkgs.buildPythonApplication rec { From 6663591207ae050bfa8421923b981369be4cad48 Mon Sep 17 00:00:00 2001 From: K900 Date: Sun, 22 Sep 2024 15:03:07 +0300 Subject: [PATCH 08/65] linuxPackages.nvidia_x11: install libraries with correct sonames Use the real soname from the library to determine where to link it, and use a symlink structure that does not make ldconfig explode. --- pkgs/os-specific/linux/nvidia-x11/builder.sh | 29 ++++++++++++-------- 1 file changed, 18 insertions(+), 11 deletions(-) diff --git a/pkgs/os-specific/linux/nvidia-x11/builder.sh b/pkgs/os-specific/linux/nvidia-x11/builder.sh index 61ea120772b4..79dd6c1e8c55 100755 --- a/pkgs/os-specific/linux/nvidia-x11/builder.sh +++ b/pkgs/os-specific/linux/nvidia-x11/builder.sh @@ -185,20 +185,27 @@ installPhase() { patchelf --set-rpath "$out/lib:$libPath" "$libname" fi - libname_short=`echo -n "$libname" | sed 's/so\..*/so/'` + # Manually create the right symlinks for the libraries. + # + # We can't just use ldconfig, because it does not create libfoo.so symlinks, + # only libfoo.so.1. + # Also, the symlink chain must be libfoo.so -> libfoo.so.1 -> libfoo.so.123.45, + # or ldconfig will explode. + # See: https://github.com/bminor/glibc/blob/6f3f6c506cdaf981a4374f1f12863b98ac7fea1a/elf/ldconfig.c#L854-L877 - if [[ "$libname" != "$libname_short" ]]; then - ln -srnf "$libname" "$libname_short" - fi + libbase=$(basename "$libname") + libdir=$(dirname "$libname") + soname=$(patchelf --print-soname "$libname") + unversioned=${libbase/\.so\.[0-9\.]*/.so} - if [[ $libname_short =~ libEGL.so || $libname_short =~ libEGL_nvidia.so || $libname_short =~ libGLX.so || $libname_short =~ libGLX_nvidia.so ]]; then - major=0 - else - major=1 - fi + if [[ -n "$soname" ]]; then + if [[ "$soname" != "$libbase" ]]; then + ln -s "$libbase" "$libdir/$soname" + fi - if [[ "$libname" != "$libname_short.$major" ]]; then - ln -srnf "$libname" "$libname_short.$major" + if [[ "$soname" != "$unversioned" ]]; then + ln -s "$soname" "$libdir/$unversioned" + fi fi done From 5e1c681551d5cf92e20ac7f817013dba8a5c76e0 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 22 Sep 2024 23:17:46 +0200 Subject: [PATCH 09/65] python312Packages.cirq-*: refactor --- .../python-modules/cirq-aqt/default.nix | 9 ++- .../python-modules/cirq-core/default.nix | 4 +- .../python-modules/cirq-google/default.nix | 6 +- .../python-modules/cirq-ionq/default.nix | 9 ++- .../python-modules/cirq-pasqal/default.nix | 9 ++- .../python-modules/cirq-rigetti/default.nix | 64 ++++--------------- .../python-modules/cirq-web/default.nix | 7 +- .../python-modules/cirq/default.nix | 7 +- 8 files changed, 43 insertions(+), 72 deletions(-) diff --git a/pkgs/development/python-modules/cirq-aqt/default.nix b/pkgs/development/python-modules/cirq-aqt/default.nix index 1bead28588e3..6e20f84d26e6 100644 --- a/pkgs/development/python-modules/cirq-aqt/default.nix +++ b/pkgs/development/python-modules/cirq-aqt/default.nix @@ -3,21 +3,24 @@ cirq-core, requests, pytestCheckHook, + setuptools, }: buildPythonPackage rec { pname = "cirq-aqt"; - format = "setuptools"; + pyproject = true; inherit (cirq-core) version src meta; sourceRoot = "${src.name}/${pname}"; postPatch = '' substituteInPlace requirements.txt \ - --replace "requests~=2.18" "requests" + --replace-fail "requests~=2.18" "requests" ''; - propagatedBuildInputs = [ + build-system = [ setuptools ]; + + dependencies = [ cirq-core requests ]; diff --git a/pkgs/development/python-modules/cirq-core/default.nix b/pkgs/development/python-modules/cirq-core/default.nix index b2cf178596b5..d0a506c5f996 100644 --- a/pkgs/development/python-modules/cirq-core/default.nix +++ b/pkgs/development/python-modules/cirq-core/default.nix @@ -34,7 +34,7 @@ buildPythonPackage rec { version = "1.4.1"; pyproject = true; - disabled = pythonOlder "3.9"; + disabled = pythonOlder "3.10"; src = fetchFromGitHub { owner = "quantumlib"; @@ -47,7 +47,7 @@ buildPythonPackage rec { postPatch = '' substituteInPlace requirements.txt \ - --replace "matplotlib~=3.0" "matplotlib" + --replace-fail "matplotlib~=3.0" "matplotlib" ''; build-system = [ setuptools ]; diff --git a/pkgs/development/python-modules/cirq-google/default.nix b/pkgs/development/python-modules/cirq-google/default.nix index b7b70b00afed..6c84cd1440e6 100644 --- a/pkgs/development/python-modules/cirq-google/default.nix +++ b/pkgs/development/python-modules/cirq-google/default.nix @@ -15,11 +15,9 @@ buildPythonPackage rec { sourceRoot = "${src.name}/${pname}"; - nativeBuildInputs = [ - setuptools - ]; + build-system = [ setuptools ]; - propagatedBuildInputs = [ + dependencies = [ cirq-core google-api-core protobuf diff --git a/pkgs/development/python-modules/cirq-ionq/default.nix b/pkgs/development/python-modules/cirq-ionq/default.nix index b4fa84636623..518334432441 100644 --- a/pkgs/development/python-modules/cirq-ionq/default.nix +++ b/pkgs/development/python-modules/cirq-ionq/default.nix @@ -3,21 +3,24 @@ cirq-core, requests, pytestCheckHook, + setuptools, }: buildPythonPackage rec { pname = "cirq-ionq"; - format = "setuptools"; + pyproject = true; inherit (cirq-core) version src meta; sourceRoot = "${src.name}/${pname}"; postPatch = '' substituteInPlace requirements.txt \ - --replace "requests~=2.18" "requests" + --replace-fail "requests~=2.18" "requests" ''; - propagatedBuildInputs = [ + build-system = [ setuptools ]; + + dependencies = [ cirq-core requests ]; diff --git a/pkgs/development/python-modules/cirq-pasqal/default.nix b/pkgs/development/python-modules/cirq-pasqal/default.nix index ea13cb2cc4da..62d946ea4617 100644 --- a/pkgs/development/python-modules/cirq-pasqal/default.nix +++ b/pkgs/development/python-modules/cirq-pasqal/default.nix @@ -3,21 +3,24 @@ cirq-core, requests, pytestCheckHook, + setuptools, }: buildPythonPackage rec { pname = "cirq-pasqal"; - format = "setuptools"; + pyproject = true; inherit (cirq-core) version src meta; sourceRoot = "${src.name}/${pname}"; postPatch = '' substituteInPlace requirements.txt \ - --replace "requests~=2.18" "requests" + --replace-fail "requests~=2.18" "requests" ''; - propagatedBuildInputs = [ + build-system = [ setuptools ]; + + dependencies = [ cirq-core requests ]; diff --git a/pkgs/development/python-modules/cirq-rigetti/default.nix b/pkgs/development/python-modules/cirq-rigetti/default.nix index aaf29a81755c..5791950fc136 100644 --- a/pkgs/development/python-modules/cirq-rigetti/default.nix +++ b/pkgs/development/python-modules/cirq-rigetti/default.nix @@ -1,36 +1,21 @@ { + lib, buildPythonPackage, cirq-core, fetchpatch2, - lib, - pytestCheckHook, - attrs, - certifi, - h11, - httpcore, - idna, - httpx, - iso8601, - pydantic, - pyjwt, pyquil, - python-dateutil, + pytestCheckHook, pythonOlder, - qcs-api-client, - retrying, - rfc3339, - rfc3986, - six, - sniffio, - toml, + qcs-sdk-python, + setuptools, }: buildPythonPackage rec { pname = "cirq-rigetti"; - format = "setuptools"; + pyproject = true; inherit (cirq-core) version src; - disabled = pythonOlder "3.7"; + disabled = pythonOlder "3.10"; patches = [ # https://github.com/quantumlib/Cirq/pull/6734 @@ -44,46 +29,19 @@ buildPythonPackage rec { sourceRoot = "${src.name}/${pname}"; - pythonRelaxDeps = [ - "attrs" - "certifi" - "h11" - "httpcore" - "httpx" - "idna" - "iso8601" - "pydantic" - "pyjwt" - "pyquil" - "qcs-api-client" - "rfc3986" - ]; + pythonRelaxDeps = [ "pyquil" ]; postPatch = '' # Remove outdated test rm cirq_rigetti/service_test.py ''; - propagatedBuildInputs = [ + build-system = [ setuptools ]; + + dependencies = [ cirq-core - attrs - certifi - h11 - httpcore - httpx - idna - iso8601 - pydantic - pyjwt pyquil - python-dateutil - qcs-api-client - retrying - rfc3339 - rfc3986 - six - sniffio - toml + qcs-sdk-python ]; nativeCheckInputs = [ pytestCheckHook ]; diff --git a/pkgs/development/python-modules/cirq-web/default.nix b/pkgs/development/python-modules/cirq-web/default.nix index 95af99b1360b..782aec95c4ef 100644 --- a/pkgs/development/python-modules/cirq-web/default.nix +++ b/pkgs/development/python-modules/cirq-web/default.nix @@ -2,16 +2,19 @@ buildPythonPackage, cirq-core, pytestCheckHook, + setuptools, }: buildPythonPackage rec { pname = "cirq-web"; - format = "setuptools"; + pyproject = true; inherit (cirq-core) version src meta; sourceRoot = "${src.name}/${pname}"; - propagatedBuildInputs = [ cirq-core ]; + build-system = [ setuptools ]; + + dependencies = [ cirq-core ]; nativeCheckInputs = [ pytestCheckHook ]; diff --git a/pkgs/development/python-modules/cirq/default.nix b/pkgs/development/python-modules/cirq/default.nix index 54eee66b5f20..0d755c34b767 100644 --- a/pkgs/development/python-modules/cirq/default.nix +++ b/pkgs/development/python-modules/cirq/default.nix @@ -8,14 +8,17 @@ cirq-rigetti, cirq-web, pytestCheckHook, + setuptools, }: buildPythonPackage rec { pname = "cirq"; - format = "setuptools"; + pyproject = true; inherit (cirq-core) version src meta; - propagatedBuildInputs = [ + build-system = [ setuptools ]; + + dependencies = [ cirq-aqt cirq-core cirq-ionq From 5c558d31ec081ae70be3bd96efae84580feee954 Mon Sep 17 00:00:00 2001 From: Weijia Wang <9713184+wegank@users.noreply.github.com> Date: Mon, 23 Sep 2024 00:38:46 +0200 Subject: [PATCH 10/65] ogre: 14.2.6 -> 14.3.0 --- pkgs/development/libraries/ogre/default.nix | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pkgs/development/libraries/ogre/default.nix b/pkgs/development/libraries/ogre/default.nix index a77529a42704..c977348e587a 100644 --- a/pkgs/development/libraries/ogre/default.nix +++ b/pkgs/development/libraries/ogre/default.nix @@ -112,11 +112,11 @@ let in { ogre_14 = common { - version = "14.2.6"; - hash = "sha256-kxvrRigSe6sPa3lAH+6zKTY4YEU9javlKHK8Zf6jxZE="; - # https://github.com/OGRECave/ogre/blob/v14.2.5/Components/Overlay/CMakeLists.txt - imguiVersion = "1.90.4"; - imguiHash = "sha256-7+Ay7H97tIO6CUsEyaQv4i9q2FCw98eQUq/KYZyfTAw="; + version = "14.3.0"; + hash = "sha256-SQ0Ij04W/KgonHDLFEPFDhXb/TDkT8I6W8J7hz3gtrg="; + # https://github.com/OGRECave/ogre/blob/v14.3.0/Components/Overlay/CMakeLists.txt + imguiVersion = "1.91.2"; + imguiHash = "sha256-B7XXQNuEPcT1ID5nMYbAV+aNCG9gIrC9J7BLnYB8yjI="; }; ogre_13 = common { From 647e5c3a3a45f4932d1f244b070510c49a040e5b Mon Sep 17 00:00:00 2001 From: bigshaq9999 <97749920+bigshaq9999@users.noreply.github.com> Date: Mon, 23 Sep 2024 11:06:50 +0700 Subject: [PATCH 11/65] renpy: 8.2.1 -> 8.3.2 --- pkgs/by-name/re/renpy/package.nix | 20 +++++++++---------- .../python-modules/pygame-sdl2/default.nix | 2 +- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/pkgs/by-name/re/renpy/package.nix b/pkgs/by-name/re/renpy/package.nix index d31ad9ced864..5cc7a0970556 100644 --- a/pkgs/by-name/re/renpy/package.nix +++ b/pkgs/by-name/re/renpy/package.nix @@ -2,7 +2,7 @@ lib, stdenv, fetchFromGitHub, - python3, + python311, pkg-config, SDL2, libpng, @@ -22,8 +22,8 @@ let # base_version is of the form major.minor.patch # vc_version is of the form YYMMDDCC # version corresponds to the tag on GitHub - base_version = "8.2.1"; - vc_version = "24030407"; + base_version = "8.3.1"; + vc_version = "24090601"; version = "${base_version}.${vc_version}"; in stdenv.mkDerivation { @@ -34,7 +34,7 @@ stdenv.mkDerivation { owner = "renpy"; repo = "renpy"; rev = version; - hash = "sha256-07Hj8mJGR0+Pn1DQ+sK5YQ3x3CTMsZ5h5yEoz44b2TM="; + hash = "sha256-k8mcDzaFngRF3Xl9cinUFU0T9sjxNIVrECUguARJVZ4="; }; nativeBuildInputs = [ @@ -42,8 +42,8 @@ stdenv.mkDerivation { makeWrapper # Ren'Py currently does not compile on Cython 3.x. # See https://github.com/renpy/renpy/issues/5359 - python3.pkgs.cython_0 - python3.pkgs.setuptools + python311.pkgs.cython_0 + python311.pkgs.setuptools ]; buildInputs = @@ -59,7 +59,7 @@ stdenv.mkDerivation { zlib harfbuzz ] - ++ (with python3.pkgs; [ + ++ (with python311.pkgs; [ python pygame-sdl2 tkinter @@ -100,13 +100,13 @@ stdenv.mkDerivation { EOF ''; - buildPhase = with python3.pkgs; '' + buildPhase = with python311.pkgs; '' runHook preBuild ${python.pythonOnBuildForHost.interpreter} module/setup.py build --parallel=$NIX_BUILD_CORES runHook postBuild ''; - installPhase = with python3.pkgs; '' + installPhase = with python311.pkgs; '' runHook preInstall ${python.pythonOnBuildForHost.interpreter} module/setup.py install_lib -d $out/${python.sitePackages} @@ -120,7 +120,7 @@ stdenv.mkDerivation { runHook postInstall ''; - env.NIX_CFLAGS_COMPILE = with python3.pkgs; "-I${pygame-sdl2}/include/${python.libPrefix}"; + env.NIX_CFLAGS_COMPILE = with python311.pkgs; "-I${pygame-sdl2}/include/${python.libPrefix}"; meta = { description = "Visual Novel Engine"; diff --git a/pkgs/development/python-modules/pygame-sdl2/default.nix b/pkgs/development/python-modules/pygame-sdl2/default.nix index f788c969a8f4..43ce26585f30 100644 --- a/pkgs/development/python-modules/pygame-sdl2/default.nix +++ b/pkgs/development/python-modules/pygame-sdl2/default.nix @@ -26,7 +26,7 @@ buildPythonPackage { src = fetchurl { url = "https://www.renpy.org/dl/${renpy_version}/pygame_sdl2-${version}+renpy${renpy_version}.tar.gz"; - hash = "sha256-Zib39NyQ1pGVCWPrK5/Tl3dAylUlmKZKxU8pf+OpAdY="; + hash = "sha256-bcTrdXWLTCnZQ/fP5crKIPoqJiyz+o6s0PzRChV7TQE="; }; # force rebuild of headers needed for install From f6a980e7c1f1f8508c053afd512541022c567475 Mon Sep 17 00:00:00 2001 From: Gaetan Lepage Date: Mon, 23 Sep 2024 15:43:52 +0200 Subject: [PATCH 12/65] python312Packages.huggingface-hub: 0.25.0 -> 0.25.1 Diff: https://github.com/huggingface/huggingface_hub/compare/refs/tags/v0.25.0...v0.25.1 Changelog: https://github.com/huggingface/huggingface_hub/releases/tag/v0.25.1 --- pkgs/development/python-modules/huggingface-hub/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/huggingface-hub/default.nix b/pkgs/development/python-modules/huggingface-hub/default.nix index bec0a7fefc25..6573cdd1ac89 100644 --- a/pkgs/development/python-modules/huggingface-hub/default.nix +++ b/pkgs/development/python-modules/huggingface-hub/default.nix @@ -18,14 +18,14 @@ buildPythonPackage rec { pname = "huggingface-hub"; - version = "0.25.0"; + version = "0.25.1"; pyproject = true; src = fetchFromGitHub { owner = "huggingface"; repo = "huggingface_hub"; rev = "refs/tags/v${version}"; - hash = "sha256-N/c/aTUWHolQ1TWVOoyfQ3eCLOSX3/6qtXk1T918/wg="; + hash = "sha256-MloCUtvJ3A7t6NbCCPp4kcR+7apTrIjbvm6Ppe0SgdA="; }; build-system = [ setuptools ]; From 96c71b8582bbf8cf6a0443165a2307892f43680b Mon Sep 17 00:00:00 2001 From: Yaya Date: Mon, 23 Sep 2024 17:10:24 +0200 Subject: [PATCH 13/65] electron: fix a bug in update.py The supported version range no longer gets cached as it gets out of date pretty quickly. --- pkgs/development/tools/electron/update.py | 1 - 1 file changed, 1 deletion(-) diff --git a/pkgs/development/tools/electron/update.py b/pkgs/development/tools/electron/update.py index 022306a2bacf..14ccfe6d84a3 100755 --- a/pkgs/development/tools/electron/update.py +++ b/pkgs/development/tools/electron/update.py @@ -321,7 +321,6 @@ class ElectronChromedriverRepo(ElectronBinRepo): # and it is rather pointless trying to update those. # # https://endoflife.date/electron -@memory.cache def supported_version_range() -> range: """Returns a range of electron releases that have not reached end-of-life yet""" releases_json = json.loads( From 187622dbe9c069027f0c9086b6f0c58f7c8d3dee Mon Sep 17 00:00:00 2001 From: Yaya Date: Mon, 23 Sep 2024 17:11:52 +0200 Subject: [PATCH 14/65] electron_30-bin: 30.4.0 -> 30.5.1 - Changelog: https://github.com/electron/electron/releases/tag/v30.5.1 - Diff: https://github.com/electron/electron/compare/refs/tags/v30.4.0...v30.5.1 --- pkgs/development/tools/electron/binary/info.json | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/pkgs/development/tools/electron/binary/info.json b/pkgs/development/tools/electron/binary/info.json index 8aa43f8213e5..e68e6364fbd5 100644 --- a/pkgs/development/tools/electron/binary/info.json +++ b/pkgs/development/tools/electron/binary/info.json @@ -45,14 +45,14 @@ }, "30": { "hashes": { - "aarch64-darwin": "2238c45a85b2c78aed00aeaf15bbfa2f64b4d13e48cc6b9bc330f24c4d214595", - "aarch64-linux": "aa422122373b84f4eb8ce937937b1b6fe8fb3975c3edafb9df85f7fba449afd4", - "armv7l-linux": "3643857e1eec3037ad6f07e755bffc64f033a7196307ff0386bf67c9cc3ec31e", - "headers": "1zpl51g8d0j6xw4h2pw1wy6qlwgxj37x4lsj377kg27y809rf5ah", - "x86_64-darwin": "6e633bf87be9f8bf46dff9733cfd0d611e018ae5df75f30735747721f91fcf43", - "x86_64-linux": "b365aac23c61dc0b18002c60937c4842e814cbe6d8e6a34e4dc211774ebaec01" + "aarch64-darwin": "d312544ea29844cf328b44b9dbde12f4fdced90cb442dfca6df36c098dbb6e7a", + "aarch64-linux": "eb31470c0d7cd6e23e7ce0d89cc93a2356c9dac8bcc997e335353b8aa995afa0", + "armv7l-linux": "224bd46983e503101c756c72d10b195f14712a7a56438718acb126017dd04edf", + "headers": "0db38ndw9rrd8ixa14761cbff6ns31b6302bzx5q4in8i4dkrrs3", + "x86_64-darwin": "faf9dcc20d525607ea205f2f6a1dfe3270f6268aa439bb0ba5646c7e4fbbd842", + "x86_64-linux": "ec4707783d39e86005f42899e30ae59e50dd5d9c7f28531ed494eb43f2361403" }, - "version": "30.4.0" + "version": "30.5.1" }, "31": { "hashes": { From 16abda51cc158e1cb458e5e577721c235bbded24 Mon Sep 17 00:00:00 2001 From: Yaya Date: Mon, 23 Sep 2024 17:11:56 +0200 Subject: [PATCH 15/65] electron_31-bin: 31.4.0 -> 31.6.0 - Changelog: https://github.com/electron/electron/releases/tag/v31.6.0 - Diff: https://github.com/electron/electron/compare/refs/tags/v31.4.0...v31.6.0 --- pkgs/development/tools/electron/binary/info.json | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/pkgs/development/tools/electron/binary/info.json b/pkgs/development/tools/electron/binary/info.json index e68e6364fbd5..a28626c6f9a8 100644 --- a/pkgs/development/tools/electron/binary/info.json +++ b/pkgs/development/tools/electron/binary/info.json @@ -56,14 +56,14 @@ }, "31": { "hashes": { - "aarch64-darwin": "4cd04f75e97f6cdfee1d166c7756b9a3c7341e51a7b12255c37bd46fa5a45da5", - "aarch64-linux": "37fbede76b30bad461cbfa3efec8aef07a34f6991c71c50a69ac489623413098", - "armv7l-linux": "7a6cba2d78ef3ff776d9482121f9b2400370da23b3065bfdafc4cd83c8bbe423", - "headers": "0iclnzcihiw7bnf7nn0p56m8zz8cwn951ccf6g52d7pfr791gbnv", - "x86_64-darwin": "e177e9846bfe63eefea3ecd6a889e9865e1fba21b93179a0cde08bd7c94796ee", - "x86_64-linux": "9b95e66cb4d55bb632e37bcb6083992a5d665f0b378466a771a2948c1aab57b7" + "aarch64-darwin": "dec23ecc15f4d0503163c5f65f59114127ce6d2518af8e6547ea787372575fcb", + "aarch64-linux": "1911b1cef253d68fead45432e93740223c686ebc11c931bdd08439ec88030cfd", + "armv7l-linux": "957d888d016270b658fb558f6e2061ffaa7f71c9d2b1c73c4f122342519ba741", + "headers": "1vm3r688cjl5014x4lmmwh9927wbx26nd38lijmim434n32aby88", + "x86_64-darwin": "4d5d21963bf833ccc25edbc2e8e884f408e24c2a39b53f1d0c30f4017ac2ba8a", + "x86_64-linux": "86b3794aba055e84f23cba5d8319ca9f23a05385d2c06fe7d78d24d2bb356b67" }, - "version": "31.4.0" + "version": "31.6.0" }, "32": { "hashes": { From aac049aa0a527a8ce09fdd994bccc2bf8fa7f977 Mon Sep 17 00:00:00 2001 From: Yaya Date: Mon, 23 Sep 2024 17:11:59 +0200 Subject: [PATCH 16/65] electron_32-bin: 32.1.1 -> 32.1.2 - Changelog: https://github.com/electron/electron/releases/tag/v32.1.2 - Diff: https://github.com/electron/electron/compare/refs/tags/v32.1.1...v32.1.2 --- pkgs/development/tools/electron/binary/info.json | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/pkgs/development/tools/electron/binary/info.json b/pkgs/development/tools/electron/binary/info.json index a28626c6f9a8..a51217873b5b 100644 --- a/pkgs/development/tools/electron/binary/info.json +++ b/pkgs/development/tools/electron/binary/info.json @@ -67,13 +67,13 @@ }, "32": { "hashes": { - "aarch64-darwin": "b0e04b765702c35341e587e41b01eb9bcb1233953ab243a0c82e9555c04b269b", - "aarch64-linux": "1bf3b53cba77e070fb0da4b32540fedc29586b2111700b897fd62e3577708d53", - "armv7l-linux": "6e52f9fd163e54cb482354645dc32d42b24c6624bbb8927d194dbbb9eaf92959", - "headers": "0gw7yvj9i3kwmxbjj6w4l442saac3pcn3g7m42kvbpbwbfds1h4d", - "x86_64-darwin": "e3bb68b37e723af4aab8d9694661e5e9ecbe7b1fbc253fe263940dafffd66864", - "x86_64-linux": "5a9980bc3c80d1d2af0965eba2bc3c0f532b4ccc29194a595cefdd4dbe98e7dc" + "aarch64-darwin": "b5f6db900997ba931c98addaef28744a0a6af0f2ec2e8e5755f7f50db2fe8bbc", + "aarch64-linux": "702326c51679ed705bc22d7e4049b29cef2d66366d3387c401836aaae0fa450c", + "armv7l-linux": "d9511449c328f90f47e499f44c6d84c6204d4a3a2caec5c5d52f176cfc77f50d", + "headers": "19x1hyrzkakcrq49sfvzhhz05hi1iagzl2i3h4rfijrhy9jcv4sk", + "x86_64-darwin": "150ac6a59e31ad516685bdbb9cee67c7e927b872ad94ffc900fbf6616433f8ab", + "x86_64-linux": "b51e5f1296f8971d7eb4ca86606b6f5d31fb3dab8caa91dcfbfa522be5679691" }, - "version": "32.1.1" + "version": "32.1.2" } } From 501ef2601d4f20cfd28d22c0aa6384f5c4145274 Mon Sep 17 00:00:00 2001 From: Yaya Date: Mon, 23 Sep 2024 17:19:33 +0200 Subject: [PATCH 17/65] electron-source.electron_30: 30.4.0 -> 30.5.1 - Changelog: https://github.com/electron/electron/releases/tag/v30.5.1 - Diff: https://github.com/electron/electron/compare/refs/tags/v30.4.0...v30.5.1 --- pkgs/development/tools/electron/info.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pkgs/development/tools/electron/info.json b/pkgs/development/tools/electron/info.json index d7af407e417b..25834a2a6acb 100644 --- a/pkgs/development/tools/electron/info.json +++ b/pkgs/development/tools/electron/info.json @@ -47,10 +47,10 @@ }, "src/electron": { "fetcher": "fetchFromGitHub", - "hash": "sha256-SUwtnpYQbPRCIzTQcJnoW9sI597LP1BvqNrhcb2NNfk=", + "hash": "sha256-LkDhMO6FOS/8WgAQBs3HZ8ujkS4yBtVJR7ARxEiJIME=", "owner": "electron", "repo": "electron", - "rev": "v30.4.0" + "rev": "v30.5.1" }, "src/media/cdm/api": { "fetcher": "fetchFromGitiles", @@ -276,10 +276,10 @@ }, "src/third_party/electron_node": { "fetcher": "fetchFromGitHub", - "hash": "sha256-FJVFKLhVCoOdM6dbuu/DQxw0hXjg+C8a2WfF0u3Qndw=", + "hash": "sha256-3pcWLDR1Y6oJUuwtequ5pK7nGwPeOqzALVNGJYskuc0=", "owner": "nodejs", "repo": "node", - "rev": "v20.15.1" + "rev": "v20.16.0" }, "src/third_party/emoji-segmenter/src": { "fetcher": "fetchFromGitiles", @@ -913,8 +913,8 @@ }, "electron_yarn_hash": "0vq12z09hcm6xdrd34b01vx1c47r4zdaqrkw9db6r612xrp2xi0c", "modules": "123", - "node": "20.15.1", - "version": "30.4.0" + "node": "20.16.0", + "version": "30.5.1" }, "31": { "chrome": "126.0.6478.234", From 5ab6c220a82be65db9abceb7204475b529278281 Mon Sep 17 00:00:00 2001 From: Yaya Date: Mon, 23 Sep 2024 17:19:37 +0200 Subject: [PATCH 18/65] electron-source.electron_31: 31.4.0 -> 31.6.0 - Changelog: https://github.com/electron/electron/releases/tag/v31.6.0 - Diff: https://github.com/electron/electron/compare/refs/tags/v31.4.0...v31.6.0 --- pkgs/development/tools/electron/info.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pkgs/development/tools/electron/info.json b/pkgs/development/tools/electron/info.json index 25834a2a6acb..f44806cc6812 100644 --- a/pkgs/development/tools/electron/info.json +++ b/pkgs/development/tools/electron/info.json @@ -964,10 +964,10 @@ }, "src/electron": { "fetcher": "fetchFromGitHub", - "hash": "sha256-pio5G9ATJHsM4ygKkDhmAbpZecS8p1AQUJ7LHavMq6I=", + "hash": "sha256-dw2WLjkHCt/uYXT+eZpaJ1bdB6DdMcJLjnscREp4YU8=", "owner": "electron", "repo": "electron", - "rev": "v31.4.0" + "rev": "v31.6.0" }, "src/media/cdm/api": { "fetcher": "fetchFromGitiles", @@ -1211,10 +1211,10 @@ }, "src/third_party/electron_node": { "fetcher": "fetchFromGitHub", - "hash": "sha256-3pcWLDR1Y6oJUuwtequ5pK7nGwPeOqzALVNGJYskuc0=", + "hash": "sha256-fYx771gbZTsgEmHQf4mj3qSqmFHs8YVg4sVyUnfsmqI=", "owner": "nodejs", "repo": "node", - "rev": "v20.16.0" + "rev": "v20.17.0" }, "src/third_party/emoji-segmenter/src": { "fetcher": "fetchFromGitiles", @@ -1854,8 +1854,8 @@ }, "electron_yarn_hash": "12pcq3zzx6627igdfd5bgyismz9n21093smpd43c4aall2mn6194", "modules": "125", - "node": "20.16.0", - "version": "31.4.0" + "node": "20.17.0", + "version": "31.6.0" }, "32": { "chrome": "128.0.6613.137", From 18057beedeb68f634c2ec5b7502b816429de653d Mon Sep 17 00:00:00 2001 From: Yaya Date: Mon, 23 Sep 2024 17:19:41 +0200 Subject: [PATCH 19/65] electron-source.electron_32: 32.1.1 -> 32.1.2 - Changelog: https://github.com/electron/electron/releases/tag/v32.1.2 - Diff: https://github.com/electron/electron/compare/refs/tags/v32.1.1...v32.1.2 --- pkgs/development/tools/electron/info.json | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/pkgs/development/tools/electron/info.json b/pkgs/development/tools/electron/info.json index f44806cc6812..3999b50e9888 100644 --- a/pkgs/development/tools/electron/info.json +++ b/pkgs/development/tools/electron/info.json @@ -1858,7 +1858,7 @@ "version": "31.6.0" }, "32": { - "chrome": "128.0.6613.137", + "chrome": "128.0.6613.162", "chromium": { "deps": { "gn": { @@ -1868,15 +1868,15 @@ "version": "2024-06-11" } }, - "version": "128.0.6613.137" + "version": "128.0.6613.162" }, "chromium_npm_hash": "sha256-OBUYgjfoEZly8JLTtprfU+hlKNFSnHLheaVWhrirGJk=", "deps": { "src": { "fetcher": "fetchFromGitiles", - "hash": "sha256-H+C79mGXUaDYcDoJz25iobN3xWUJz6OplleJlTX3ilg=", + "hash": "sha256-52pb9e5XYaiIpUlazoXbmEJ/3l4uPWt9sVmF0+cVBKQ=", "postFetch": "rm -r $out/third_party/blink/web_tests; rm -r $out/third_party/hunspell/tests; rm -r $out/content/test/data; rm -r $out/courgette/testdata; rm -r $out/extensions/test/data; rm -r $out/media/test/data; ", - "rev": "128.0.6613.137", + "rev": "128.0.6613.162", "url": "https://chromium.googlesource.com/chromium/src.git" }, "src/chrome/test/data/perf/canvas_bench": { @@ -1905,10 +1905,10 @@ }, "src/electron": { "fetcher": "fetchFromGitHub", - "hash": "sha256-OErkW4OrDU9WJd8iqWAUZZ5qR4vuX+laLzwTt5OMrOc=", + "hash": "sha256-RkSdNjEmXO4xsCRzp5y5suG8svNT5LSI/eVbAUDbi5c=", "owner": "electron", "repo": "electron", - "rev": "v32.1.1" + "rev": "v32.1.2" }, "src/media/cdm/api": { "fetcher": "fetchFromGitiles", @@ -2788,14 +2788,14 @@ }, "src/v8": { "fetcher": "fetchFromGitiles", - "hash": "sha256-bhGdJhSfvBFUh0PY9xssNinO1CKb36lxKuU3b35aV0M=", - "rev": "6f774f929205be0a49cf861b8d73a92655e1dd36", + "hash": "sha256-weN8PR9qaRcws9T5PhWyJntrJJ4sKoLwP3gTSLHU574=", + "rev": "485b9d9f88ef1c4787b183b8ccc6cdcfbc07ab1a", "url": "https://chromium.googlesource.com/v8/v8.git" } }, "electron_yarn_hash": "0jb1rs1in1bp71syim7a7p0n669kbc6as90y3zi6nd0q340cwgqa", "modules": "128", "node": "20.17.0", - "version": "32.1.1" + "version": "32.1.2" } } From c6ce5bd4ab657df958ebd6f38723f81c5546a661 Mon Sep 17 00:00:00 2001 From: Yaya Date: Mon, 23 Sep 2024 17:19:52 +0200 Subject: [PATCH 20/65] electron-chromedriver_32: 32.1.1 -> 32.1.2 - Changelog: https://github.com/electron/electron/releases/tag/v32.1.2 - Diff: https://github.com/electron/electron/compare/refs/tags/v32.1.1...v32.1.2 --- .../tools/electron/chromedriver/info.json | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/pkgs/development/tools/electron/chromedriver/info.json b/pkgs/development/tools/electron/chromedriver/info.json index f80b67c66eaf..3cb6b6a756c5 100644 --- a/pkgs/development/tools/electron/chromedriver/info.json +++ b/pkgs/development/tools/electron/chromedriver/info.json @@ -34,13 +34,13 @@ }, "32": { "hashes": { - "aarch64-darwin": "3fff987133294dcc18420500292bdfc32b452cfcf72f2e89af96404aa566aa27", - "aarch64-linux": "cfd75fdd5ec2bc86483b0779f241f98f775b74e4b75407a08b3755103304421a", - "armv7l-linux": "469d23434bca0f8bd4def7d3d9d3e9ff30dfa29e65450bac88cbbc0ae1ffc09c", - "headers": "0gw7yvj9i3kwmxbjj6w4l442saac3pcn3g7m42kvbpbwbfds1h4d", - "x86_64-darwin": "2b0e23c214580716dbeedd7b6bccc2b8994cbaa7827fa34208ed22ccb4ccdf77", - "x86_64-linux": "5d824770f97216138a209f268fbcab3de64bc967046ed9ad92ec0059abef184f" + "aarch64-darwin": "7fb7b8736fcd9dbde92628e4aa951fd2c54d3136bf20c1821ce2a1b85fef3046", + "aarch64-linux": "405664c1b6529cd6c2af65778f2c84bfe262ad0b8d9d044a39d2eff2ed218828", + "armv7l-linux": "32682f487ed9307d0f40d35c4b998cee75272effd228093be3e008ca7b39e16e", + "headers": "19x1hyrzkakcrq49sfvzhhz05hi1iagzl2i3h4rfijrhy9jcv4sk", + "x86_64-darwin": "a9e43916cbe91c9a905f2bf38d326d5dc462c3d8a7d88f52c25c1e7c1b9ce7cc", + "x86_64-linux": "d98aa7a90ebfe519700e47fa6bcb94a157483fac615920c5ee467dcc41c46702" }, - "version": "32.1.1" + "version": "32.1.2" } } From ae90cb4adebc4f4d73f3f5806ef47db608cb5410 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Mon, 23 Sep 2024 21:02:09 +0200 Subject: [PATCH 21/65] python312Packages.pyexploitdb: 0.2.35 -> 0.2.36 Changelog: https://github.com/GoVanguard/pyExploitDb/blob/master/ChangeLog.md --- pkgs/development/python-modules/pyexploitdb/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/pyexploitdb/default.nix b/pkgs/development/python-modules/pyexploitdb/default.nix index 68352b43aa74..ed474ac2f9a9 100644 --- a/pkgs/development/python-modules/pyexploitdb/default.nix +++ b/pkgs/development/python-modules/pyexploitdb/default.nix @@ -10,7 +10,7 @@ buildPythonPackage rec { pname = "pyexploitdb"; - version = "0.2.35"; + version = "0.2.36"; pyproject = true; disabled = pythonOlder "3.7"; @@ -18,7 +18,7 @@ buildPythonPackage rec { src = fetchPypi { pname = "pyExploitDb"; inherit version; - hash = "sha256-lwsLP29lQmb7MJYPrOfgspdj4qepx7TirEksMASqrb4="; + hash = "sha256-JezjKbCO75JFHLsDzk3zNMHO6Xpz2xTjecTfrXhgUiA="; }; build-system = [ setuptools ]; From f6861d4316cd538ee7ce21f411cef6cf56d612f7 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Mon, 23 Sep 2024 21:04:04 +0200 Subject: [PATCH 22/65] python312Packages.pygitguardian: 1.16.0 -> 1.17.0 Diff: https://github.com/GitGuardian/py-gitguardian/compare/refs/tags/v1.16.0...v1.17.0 Changelog: https://github.com/GitGuardian/py-gitguardian/blob/v1.17.0/CHANGELOG.md --- pkgs/development/python-modules/pygitguardian/default.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/pygitguardian/default.nix b/pkgs/development/python-modules/pygitguardian/default.nix index 2b674559b604..1bd193e0cc32 100644 --- a/pkgs/development/python-modules/pygitguardian/default.nix +++ b/pkgs/development/python-modules/pygitguardian/default.nix @@ -16,7 +16,7 @@ buildPythonPackage rec { pname = "pygitguardian"; - version = "1.16.0"; + version = "1.17.0"; pyproject = true; disabled = pythonOlder "3.8"; @@ -25,7 +25,7 @@ buildPythonPackage rec { owner = "GitGuardian"; repo = "py-gitguardian"; rev = "refs/tags/v${version}"; - hash = "sha256-2yuYu02Nd9B3UfzrM0p19hDM5HmvigBf48gu+ZSO0kU="; + hash = "sha256-+L0rF5wy4iL/6nPdLSXwYazxsobH2G3pCATrqYe9B6U="; }; pythonRelaxDeps = [ @@ -71,6 +71,7 @@ buildPythonPackage rec { "test_read_metadata_bad_response" "test_read_metadata_no_remediation_message" "test_read_metadata_remediation_message" + "test_retrieve_secret_incident" "test_sca_client_scan_diff" "test_sca_scan_all_with_params" "test_sca_scan_directory_invalid_tar" From d0886b3b8dd033bf6be135211a24b8fd048e9df9 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Mon, 23 Sep 2024 21:06:01 +0200 Subject: [PATCH 23/65] python312Packages.pysml: 0.1.2 -> 0.1.3 Diff: https://github.com/mtdcr/pysml/compare/refs/tags/0.1.2...0.1.3 --- pkgs/development/python-modules/pysml/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/pysml/default.nix b/pkgs/development/python-modules/pysml/default.nix index febe4a190b0b..209b14f8e341 100644 --- a/pkgs/development/python-modules/pysml/default.nix +++ b/pkgs/development/python-modules/pysml/default.nix @@ -12,7 +12,7 @@ buildPythonPackage rec { pname = "pysml"; - version = "0.1.2"; + version = "0.1.3"; format = "pyproject"; disabled = pythonOlder "3.7"; @@ -21,7 +21,7 @@ buildPythonPackage rec { owner = "mtdcr"; repo = pname; rev = "refs/tags/${version}"; - hash = "sha256-TLIpc0bVx1As2oLyYD+BBMalwJiKdvBCcrd1tUNyh6Y="; + hash = "sha256-LmybrMHHWsLd6Y2xMqJ8g65SQCsysBGxeL43qouo3SM="; }; nativeBuildInputs = [ poetry-core ]; From 227626f5b546b7ba342816a0e29ea6d213bddd5b Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Mon, 23 Sep 2024 21:08:16 +0200 Subject: [PATCH 24/65] python312Packages.pytenable: 1.5.1 -> 1.5.2 Diff: https://github.com/tenable/pyTenable/compare/refs/tags/1.5.1...1.5.2 Changelog: https://github.com/tenable/pyTenable/releases/tag/1.5.2 --- pkgs/development/python-modules/pytenable/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/pytenable/default.nix b/pkgs/development/python-modules/pytenable/default.nix index 67b963f50f92..332a1b40e1c8 100644 --- a/pkgs/development/python-modules/pytenable/default.nix +++ b/pkgs/development/python-modules/pytenable/default.nix @@ -26,7 +26,7 @@ buildPythonPackage rec { pname = "pytenable"; - version = "1.5.1"; + version = "1.5.2"; pyproject = true; disabled = pythonOlder "3.7"; @@ -35,7 +35,7 @@ buildPythonPackage rec { owner = "tenable"; repo = "pyTenable"; rev = "refs/tags/${version}"; - hash = "sha256-xiFpwwlQfhpljRbJeytO3Sjh4ue0cSpKgJ9bqUul7rk="; + hash = "sha256-SGfvaYzqJ+OsJ9sGyR3pgCbEkPondhMQMNrE/r/nIY0="; }; pythonRelaxDeps = [ From dd61e7a8cc24c8c54ddd5fb67a9fffe34a272288 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Mon, 23 Sep 2024 21:18:05 +0200 Subject: [PATCH 25/65] python312Packages.textile: 4.0.2 -> 4.0.3 Diff: https://github.com/textile/python-textile/compare/refs/tags/4.0.2...4.0.3 Changelog: https://github.com/textile/python-textile/blob/4.0.3/CHANGELOG.textile --- .../python-modules/textile/default.nix | 42 ++++++++++++------- 1 file changed, 27 insertions(+), 15 deletions(-) diff --git a/pkgs/development/python-modules/textile/default.nix b/pkgs/development/python-modules/textile/default.nix index 725e6adae549..09e83fa1caeb 100644 --- a/pkgs/development/python-modules/textile/default.nix +++ b/pkgs/development/python-modules/textile/default.nix @@ -2,45 +2,57 @@ lib, buildPythonPackage, fetchFromGitHub, - html5lib, + nh3, + pillow, + pytest-cov-stub, pytestCheckHook, pythonOlder, regex, + setuptools-scm, + setuptools, }: buildPythonPackage rec { pname = "textile"; - version = "4.0.2"; - format = "setuptools"; + version = "4.0.3"; + pyproject = true; - disabled = pythonOlder "3.7"; + disabled = pythonOlder "3.8"; src = fetchFromGitHub { - owner = pname; + owner = "textile"; repo = "python-textile"; - rev = version; - hash = "sha256-WwX7h07Bq8sNsViHwmfhrrqleXacmrIY4ZBBaP2kKnI="; + rev = "refs/tags/${version}"; + hash = "sha256-KVDppsvX48loV9OJ70yqmQ5ZSypzcxrjH1j31DcyfM8="; }; - propagatedBuildInputs = [ - html5lib + build-system = [ + setuptools + setuptools-scm + ]; + + dependencies = [ + nh3 regex ]; - nativeCheckInputs = [ pytestCheckHook ]; + optional-dependencies = { + imagesize = [ pillow ]; + }; - postPatch = '' - substituteInPlace pytest.ini \ - --replace " --cov=textile --cov-report=html --cov-append --cov-report=term-missing" "" - ''; + nativeCheckInputs = [ + pytest-cov-stub + pytestCheckHook + ]; pythonImportsCheck = [ "textile" ]; meta = with lib; { description = "MOdule for generating web text"; - mainProgram = "pytextile"; homepage = "https://github.com/textile/python-textile"; + changelog = "https://github.com/textile/python-textile/blob/${version}/CHANGELOG.textile"; license = licenses.bsd3; maintainers = with maintainers; [ fab ]; + mainProgram = "pytextile"; }; } From db200845edb3f7597726ec1524a07489fb647edf Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Mon, 23 Sep 2024 21:22:44 +0200 Subject: [PATCH 26/65] python312Packages.pysml: refactor --- pkgs/development/python-modules/pysml/default.nix | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pkgs/development/python-modules/pysml/default.nix b/pkgs/development/python-modules/pysml/default.nix index 209b14f8e341..73a2d67ed8ed 100644 --- a/pkgs/development/python-modules/pysml/default.nix +++ b/pkgs/development/python-modules/pysml/default.nix @@ -13,27 +13,27 @@ buildPythonPackage rec { pname = "pysml"; version = "0.1.3"; - format = "pyproject"; + pyproject = true; disabled = pythonOlder "3.7"; src = fetchFromGitHub { owner = "mtdcr"; - repo = pname; + repo = "pysml"; rev = "refs/tags/${version}"; hash = "sha256-LmybrMHHWsLd6Y2xMqJ8g65SQCsysBGxeL43qouo3SM="; }; - nativeBuildInputs = [ poetry-core ]; + build-system = [ poetry-core ]; - propagatedBuildInputs = [ + dependencies = [ aiohttp async-timeout bitstring pyserial-asyncio ]; - # Project has no tests + # Module has no tests doCheck = false; pythonImportsCheck = [ "sml" ]; @@ -41,7 +41,7 @@ buildPythonPackage rec { meta = with lib; { description = "Python library for EDL21 smart meters using Smart Message Language (SML)"; homepage = "https://github.com/mtdcr/pysml"; - license = with licenses; [ mit ]; + license = licenses.mit; maintainers = with maintainers; [ fab ]; }; } From ce653cbb191c18e9fb986854d0f6f1d81c437c73 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Mon, 23 Sep 2024 21:32:57 +0200 Subject: [PATCH 27/65] python312Packages.plugwise: 1.4.0 -> 1.4.1 Diff: https://github.com/plugwise/python-plugwise/compare/refs/tags/v1.4.0...v1.4.1 Changelog: https://github.com/plugwise/python-plugwise/releases/tag/v1.4.1 --- pkgs/development/python-modules/plugwise/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/plugwise/default.nix b/pkgs/development/python-modules/plugwise/default.nix index df9072936676..b018fdfbd3e1 100644 --- a/pkgs/development/python-modules/plugwise/default.nix +++ b/pkgs/development/python-modules/plugwise/default.nix @@ -17,7 +17,7 @@ buildPythonPackage rec { pname = "plugwise"; - version = "1.4.0"; + version = "1.4.1"; pyproject = true; disabled = pythonOlder "3.11"; @@ -26,7 +26,7 @@ buildPythonPackage rec { owner = "plugwise"; repo = "python-plugwise"; rev = "refs/tags/v${version}"; - hash = "sha256-CVgcqyg5DDtEJxE/oen5MJP+mV4B+Sq0uopEZTOCfV0="; + hash = "sha256-lMcehjG1Zc9s02MBsRUXZHQjxcrZetOgOSne0nCGVV0="; }; postPatch = '' From 99d0c977fa14a095661f6e8c83ed393b3f7e7af1 Mon Sep 17 00:00:00 2001 From: Alyssa Ross Date: Mon, 23 Sep 2024 21:33:38 +0200 Subject: [PATCH 28/65] lib.teams.linux-kernel.members: add k900 --- maintainers/team-list.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/maintainers/team-list.nix b/maintainers/team-list.nix index 5081616f1395..e75a2850f2dc 100644 --- a/maintainers/team-list.nix +++ b/maintainers/team-list.nix @@ -565,6 +565,7 @@ with lib.maintainers; linux-kernel = { members = [ TredwellGit + k900 ma27 nequissimus qyliss From 3b6cd821da9dfa8bc415bc15ee46c7e4c02f14b7 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Mon, 23 Sep 2024 21:42:34 +0200 Subject: [PATCH 29/65] python312Packages.aiogram: 3.13.0 -> 3.13.1 Diff: https://github.com/aiogram/aiogram/compare/refs/tags/v3.13.0...v3.13.1 Changelog: https://github.com/aiogram/aiogram/releases/tag/v3.13.1 --- pkgs/development/python-modules/aiogram/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/aiogram/default.nix b/pkgs/development/python-modules/aiogram/default.nix index 35c8cb8359c2..9c0021c0a723 100644 --- a/pkgs/development/python-modules/aiogram/default.nix +++ b/pkgs/development/python-modules/aiogram/default.nix @@ -28,7 +28,7 @@ buildPythonPackage rec { pname = "aiogram"; - version = "3.13.0"; + version = "3.13.1"; pyproject = true; disabled = pythonOlder "3.8"; @@ -37,7 +37,7 @@ buildPythonPackage rec { owner = "aiogram"; repo = "aiogram"; rev = "refs/tags/v${version}"; - hash = "sha256-P/W47IhVL7wvYI+v6OvnFJt79KPrgY6d1jdOk477MdM="; + hash = "sha256-uTFh1ncIPF9SmAEVGeBnXEKrYzgifZan1sxk5UiG92U="; }; build-system = [ hatchling ]; From 8b7c867b890ed62f6361be9088061e044d5920f9 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Mon, 23 Sep 2024 21:50:56 +0200 Subject: [PATCH 30/65] python312Packages.azure-mgmt-privatedns: 1.1.0 -> 1.2.0 Changelog: https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-privatedns_1.2.0/sdk/network/azure-mgmt-privatedns/CHANGELOG.md --- .../azure-mgmt-privatedns/default.nix | 25 +++++++++++-------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/pkgs/development/python-modules/azure-mgmt-privatedns/default.nix b/pkgs/development/python-modules/azure-mgmt-privatedns/default.nix index 9e3f437ced84..aeb519515beb 100644 --- a/pkgs/development/python-modules/azure-mgmt-privatedns/default.nix +++ b/pkgs/development/python-modules/azure-mgmt-privatedns/default.nix @@ -5,30 +5,32 @@ buildPythonPackage, fetchPypi, isodate, - msrest, pythonOlder, + setuptools, typing-extensions, }: buildPythonPackage rec { pname = "azure-mgmt-privatedns"; - version = "1.1.0"; - format = "setuptools"; + version = "1.2.0"; + pyproject = true; - disabled = pythonOlder "3.7"; + disabled = pythonOlder "3.8"; src = fetchPypi { - inherit pname version; - hash = "sha256-MtucYFpKj/ANNON1UdXrBrTsJnq53iph3SJ1ypWj+5g="; - extension = "zip"; + pname = "azure_mgmt_privatedns"; + inherit version; + hash = "sha256-NCMYcvAblPYZXY7lQo4XRpJS7QTqCCjVIyXr578KEgs="; }; - propagatedBuildInputs = [ + build-system = [ setuptools ]; + + dependencies = [ azure-common azure-mgmt-core isodate - msrest - ] ++ lib.optionals (pythonOlder "3.8") [ typing-extensions ]; + typing-extensions + ]; # no tests included doCheck = false; @@ -40,7 +42,8 @@ buildPythonPackage rec { meta = with lib; { description = "Microsoft Azure DNS Private Zones Client Library for Python"; - homepage = "https://github.com/Azure/azure-sdk-for-python"; + homepage = "https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/network/azure-mgmt-privatedns"; + changelog = "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-privatedns_${version}/sdk/network/azure-mgmt-privatedns/CHANGELOG.md"; license = licenses.mit; maintainers = [ ]; }; From 9989efc468ccafed6b88aebea3c93be704608a9d Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Mon, 23 Sep 2024 22:22:51 +0200 Subject: [PATCH 31/65] python312Packages.chromadb: 0.5.5 -> 0.5.7 Diff: https://github.com/chroma-core/chroma/compare/refs/tags/0.5.5...0.5.7 Changelog: https://github.com/chroma-core/chroma/releases/tag/0.5.7 --- .../python-modules/chromadb/default.nix | 27 +++++-------------- 1 file changed, 7 insertions(+), 20 deletions(-) diff --git a/pkgs/development/python-modules/chromadb/default.nix b/pkgs/development/python-modules/chromadb/default.nix index 7416e254769f..fa1f0f94591c 100644 --- a/pkgs/development/python-modules/chromadb/default.nix +++ b/pkgs/development/python-modules/chromadb/default.nix @@ -9,13 +9,13 @@ darwin, fastapi, fetchFromGitHub, - fetchpatch, grpcio, httpx, hypothesis, importlib-resources, kubernetes, mmh3, + nixosTests, numpy, onnxruntime, openssl, @@ -28,6 +28,7 @@ pkg-config, posthog, protobuf, + psutil, pulsar-client, pydantic, pypika, @@ -38,8 +39,8 @@ requests, rustc, rustPlatform, - setuptools, setuptools-scm, + setuptools, tenacity, tokenizers, tqdm, @@ -47,12 +48,11 @@ typing-extensions, uvicorn, zstd, - nixosTests, }: buildPythonPackage rec { pname = "chromadb"; - version = "0.5.5"; + version = "0.5.7"; pyproject = true; disabled = pythonOlder "3.9"; @@ -61,29 +61,15 @@ buildPythonPackage rec { owner = "chroma-core"; repo = "chroma"; rev = "refs/tags/${version}"; - hash = "sha256-e6ZctUFeq9hHXWaxGdVTiqFpwaU7A+EKn2EdQPI7DHE="; + hash = "sha256-+wRauCRrTQsGTadA6Ps0fXcpAl6ajsJRjcVEhP2+2ss="; }; cargoDeps = rustPlatform.fetchCargoTarball { inherit src; name = "${pname}-${version}"; - hash = "sha256-3FmnQEpknYNzI3WlQ3kc8qa4LFcn1zpxKDbkATU7/48="; + hash = "sha256-Y2mkWGgS77sGOOL+S/pw/UmrKDRyO+ZbN2Msj35sIl8="; }; - patches = [ - # Remove these on the next release - (fetchpatch { - name = "pydantic19-fastapi1.patch"; - url = "https://github.com/chroma-core/chroma/commit/d62c13da29b7bff77bd7dee887123e3c57e2c19e.patch"; - hash = "sha256-E3xmh9vQZH3NCfG6phvzM65NGwlcHmPgfU6FERKAJ60="; - }) - (fetchpatch { - name = "no-union-types-pydantic1.patch"; - url = "https://github.com/chroma-core/chroma/commit/2fd5b27903dffcf8bdfbb781a25bcecc17b27672.patch"; - hash = "sha256-nmiA/lKZVrHKXumc+J4uVRiMwrnFrz2tgMpfcay5hhw="; - }) - ]; - pythonRelaxDeps = [ "chroma-hnswlib" "orjson" @@ -141,6 +127,7 @@ buildPythonPackage rec { nativeCheckInputs = [ hypothesis + psutil pytest-asyncio pytestCheckHook ]; From aba7ee13a4de1754db714422f173825ada6d1e0e Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Mon, 23 Sep 2024 22:28:18 +0200 Subject: [PATCH 32/65] onthespot: remove with.lib --- pkgs/by-name/on/onthespot/package.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/by-name/on/onthespot/package.nix b/pkgs/by-name/on/onthespot/package.nix index 52829c70ef39..ebda24f08696 100644 --- a/pkgs/by-name/on/onthespot/package.nix +++ b/pkgs/by-name/on/onthespot/package.nix @@ -74,13 +74,13 @@ python3.pkgs.buildPythonApplication rec { }) ]; - meta = with lib; { + meta = { description = "QT based Spotify music downloader written in Python"; homepage = "https://github.com/casualsnek/onthespot"; changelog = "https://github.com/casualsnek/onthespot/releases/tag/v${version}"; - license = licenses.gpl2Only; - maintainers = with maintainers; [ onny ]; - platforms = platforms.linux; + license = lib.licenses.gpl2Only; + maintainers = with lib.maintainers; [ onny ]; + platforms = lib.platforms.linux; mainProgram = "onthespot_gui"; }; } From b2aa27d802b1b325f1983a5d6289689b697d9109 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Mon, 23 Sep 2024 22:35:24 +0200 Subject: [PATCH 33/65] python312Packages.pytelegrambotapi: 4.22.0 -> 4.23.0 Diff: https://github.com/eternnoir/pyTelegramBotAPI/compare/refs/tags/4.22.0...4.23.0 Changelog: https://github.com/eternnoir/pyTelegramBotAPI/releases/tag/4.23.0 --- pkgs/development/python-modules/pyTelegramBotAPI/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/pyTelegramBotAPI/default.nix b/pkgs/development/python-modules/pyTelegramBotAPI/default.nix index b131b1b11bb9..efbd9d96f429 100644 --- a/pkgs/development/python-modules/pyTelegramBotAPI/default.nix +++ b/pkgs/development/python-modules/pyTelegramBotAPI/default.nix @@ -20,7 +20,7 @@ buildPythonPackage rec { pname = "pytelegrambotapi"; - version = "4.22.0"; + version = "4.23.0"; pyproject = true; disabled = pythonOlder "3.7"; @@ -29,7 +29,7 @@ buildPythonPackage rec { owner = "eternnoir"; repo = "pyTelegramBotAPI"; rev = "refs/tags/${version}"; - hash = "sha256-hP9MXv3/754ouvPgyOZKzBtEU2BugHUUE/e8biZPLFY="; + hash = "sha256-R/RbkiKkhcZd17hgDJnEpr3OCVMvn744YM+lmzSXKWs="; }; build-system = [ hatchling ]; From 2900bc2f17e60014977e10b283aa633fd68f3087 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20van=20Br=C3=BCgge?= Date: Thu, 25 Jul 2024 20:06:27 +0100 Subject: [PATCH 34/65] immich,immich.machine-learning: init at 1.115.0 --- pkgs/by-name/im/immich/machine-learning.nix | 105 +++++++++ pkgs/by-name/im/immich/package.nix | 232 ++++++++++++++++++++ pkgs/by-name/im/immich/sources.json | 15 ++ pkgs/by-name/im/immich/update.sh | 40 ++++ 4 files changed, 392 insertions(+) create mode 100644 pkgs/by-name/im/immich/machine-learning.nix create mode 100644 pkgs/by-name/im/immich/package.nix create mode 100644 pkgs/by-name/im/immich/sources.json create mode 100755 pkgs/by-name/im/immich/update.sh diff --git a/pkgs/by-name/im/immich/machine-learning.nix b/pkgs/by-name/im/immich/machine-learning.nix new file mode 100644 index 000000000000..7a6451825118 --- /dev/null +++ b/pkgs/by-name/im/immich/machine-learning.nix @@ -0,0 +1,105 @@ +{ + lib, + src, + fetchFromGitHub, + immich, + python3, + # Override Python packages using + # self: super: { pkg = super.pkg.overridePythonAttrs (oldAttrs: { ... }); } + # Applied after defaultOverrides + packageOverrides ? self: super: { }, +}: +let + defaultOverrides = self: super: { + pydantic = super.pydantic_1; + + versioningit = super.versioningit.overridePythonAttrs (_: { + doCheck = false; + }); + + albumentations = super.albumentations.overridePythonAttrs (_: rec { + version = "1.4.3"; + src = fetchFromGitHub { + owner = "albumentations-team"; + repo = "albumentations"; + rev = version; + hash = "sha256-JIBwjYaUP4Sc1bVM/zlj45cz9OWpb/LOBsIqk1m+sQA="; + }; + }); + }; + + python = python3.override { + self = python; + packageOverrides = lib.composeExtensions defaultOverrides packageOverrides; + }; +in +python.pkgs.buildPythonApplication { + pname = "immich-machine-learning"; + inherit (immich) version; + src = "${src}/machine-learning"; + pyproject = true; + + postPatch = '' + substituteInPlace pyproject.toml --replace-fail 'fastapi-slim' 'fastapi' + ''; + + pythonRelaxDeps = [ "setuptools" ]; + pythonRemoveDeps = [ "opencv-python-headless" ]; + + build-system = with python.pkgs; [ + poetry-core + cython + ]; + + dependencies = + with python.pkgs; + [ + insightface + opencv4 + pillow + fastapi + uvicorn + aiocache + rich + ftfy + setuptools + python-multipart + orjson + gunicorn + huggingface-hub + tokenizers + pydantic + ] + ++ uvicorn.optional-dependencies.standard; + + doCheck = false; + + postInstall = '' + mkdir -p $out/share/immich + cp log_conf.json $out/share/immich + + cp -r ann $out/${python.sitePackages}/ + + makeWrapper ${lib.getExe python.pkgs.gunicorn} "''${!outputBin}"/bin/machine-learning \ + --prefix PYTHONPATH : "$out/${python.sitePackages}:$PYTHONPATH" \ + --set-default MACHINE_LEARNING_WORKERS 1 \ + --set-default MACHINE_LEARNING_WORKER_TIMEOUT 120 \ + --set-default MACHINE_LEARNING_CACHE_FOLDER /var/cache/immich \ + --set-default IMMICH_HOST "[::]" \ + --set-default IMMICH_PORT 3003 \ + --add-flags "app.main:app -k app.config.CustomUvicornWorker \ + -w \"\$MACHINE_LEARNING_WORKERS\" \ + -b \"\$IMMICH_HOST:\$IMMICH_PORT\" \ + -t \"\$MACHINE_LEARNING_WORKER_TIMEOUT\" + --log-config-json $out/share/immich/log_conf.json" + ''; + + meta = { + description = "Self-hosted photo and video backup solution (machine learning component)"; + homepage = "https://immich.app/"; + license = lib.licenses.agpl3Only; + maintainers = with lib.maintainers; [ jvanbruegge ]; + mainProgram = "machine-learning"; + inherit (immich.meta) platforms; + }; +} diff --git a/pkgs/by-name/im/immich/package.nix b/pkgs/by-name/im/immich/package.nix new file mode 100644 index 000000000000..ea64fd65945c --- /dev/null +++ b/pkgs/by-name/im/immich/package.nix @@ -0,0 +1,232 @@ +{ + lib, + stdenvNoCC, + buildNpmPackage, + fetchFromGitHub, + python3, + nodejs, + node-gyp, + runCommand, + nixosTests, + callPackage, + # build-time deps + glib, + pkg-config, + makeWrapper, + curl, + cacert, + unzip, + # runtime deps + ffmpeg-headless, + imagemagick, + libraw, + libheif, + vips, + perl, +}: +let + buildNpmPackage' = buildNpmPackage.override { inherit nodejs; }; + sources = lib.importJSON ./sources.json; + inherit (sources) version; + + buildLock = { + sources = + builtins.map + (p: { + name = p.pname; + inherit (p) version; + inherit (p.src) rev; + }) + [ + imagemagick + libheif + libraw + ]; + + packages = [ ]; + }; + + # The geodata website is not versioned, so we use the internet archive + geodata = + runCommand "immich-geodata" + { + outputHash = "sha256-imqSfzXaEMNo9T9tZr80sr/89n19kiFc8qwidFzRUaY="; + outputHashMode = "recursive"; + nativeBuildInputs = [ + cacert + curl + unzip + ]; + + meta.license = lib.licenses.cc-by-40; + } + '' + mkdir $out + url="https://web.archive.org/web/20240724153050/http://download.geonames.org/export/dump" + curl -Lo ./cities500.zip "$url/cities500.zip" + curl -Lo $out/admin1CodesASCII.txt "$url/admin1CodesASCII.txt" + curl -Lo $out/admin2Codes.txt "$url/admin2Codes.txt" + curl -Lo $out/ne_10m_admin_0_countries.geojson \ + https://raw.githubusercontent.com/nvkelso/natural-earth-vector/ca96624a56bd078437bca8184e78163e5039ad19/geojson/ne_10m_admin_0_countries.geojson + + unzip ./cities500.zip -d $out/ + echo "2024-07-24T15:30:50Z" > $out/geodata-date.txt + ''; + + src = fetchFromGitHub { + owner = "immich-app"; + repo = "immich"; + rev = "v${version}"; + inherit (sources) hash; + }; + + openapi = buildNpmPackage' { + pname = "immich-openapi-sdk"; + inherit version; + src = "${src}/open-api/typescript-sdk"; + inherit (sources.components."open-api/typescript-sdk") npmDepsHash; + + installPhase = '' + runHook preInstall + + npm config delete cache + npm prune --omit=dev --omit=optional + + mkdir -p $out + mv package.json package-lock.json node_modules build $out/ + + runHook postInstall + ''; + }; + + web = buildNpmPackage' { + pname = "immich-web"; + inherit version; + src = "${src}/web"; + inherit (sources.components.web) npmDepsHash; + + preBuild = '' + rm node_modules/@immich/sdk + ln -s ${openapi} node_modules/@immich/sdk + # Rollup does not find the dependency otherwise + ln -s node_modules/@immich/sdk/node_modules/@oazapfts node_modules/ + ''; + + installPhase = '' + runHook preInstall + + cp -r build $out + + runHook postInstall + ''; + }; + + node-addon-api = stdenvNoCC.mkDerivation rec { + pname = "node-addon-api"; + version = "8.0.0"; + src = fetchFromGitHub { + owner = "nodejs"; + repo = "node-addon-api"; + rev = "v${version}"; + hash = "sha256-k3v8lK7uaEJvcaj1sucTjFZ6+i5A6w/0Uj9rYlPhjCE="; + }; + installPhase = '' + mkdir $out + cp -r *.c *.h *.gyp *.gypi index.js package-support.json package.json tools $out/ + ''; + }; + + vips' = vips.overrideAttrs (prev: { + mesonFlags = prev.mesonFlags ++ [ "-Dtiff=disabled" ]; + }); +in +buildNpmPackage' { + pname = "immich"; + inherit version; + src = "${src}/server"; + inherit (sources.components.server) npmDepsHash; + + nativeBuildInputs = [ + pkg-config + python3 + makeWrapper + glib + node-gyp + ]; + + buildInputs = [ + ffmpeg-headless + imagemagick + libraw + libheif + vips' # Required for sharp + ]; + + # Required because vips tries to write to the cache dir + makeCacheWritable = true; + + preBuild = '' + cd node_modules/sharp + + mkdir node_modules + ln -s ${node-addon-api} node_modules/node-addon-api + + ${lib.getExe nodejs} install/check + + rm -r node_modules + + cd ../.. + rm -r node_modules/@img/sharp* + ''; + + installPhase = '' + runHook preInstall + + npm config delete cache + npm prune --omit=dev + + mkdir -p $out/build + mv package.json package-lock.json node_modules dist resources $out/ + ln -s ${web} $out/build/www + ln -s ${geodata} $out/build/geodata + + echo '${builtins.toJSON buildLock}' > $out/build/build-lock.json + + makeWrapper ${lib.getExe nodejs} $out/bin/admin-cli --add-flags $out/dist/main --add-flags cli + makeWrapper ${lib.getExe nodejs} $out/bin/server --add-flags $out/dist/main --chdir $out \ + --set IMMICH_BUILD_DATA $out/build --set NODE_ENV production \ + --suffix PATH : "${ + lib.makeBinPath [ + perl + ffmpeg-headless + ] + }" + + runHook postInstall + ''; + + passthru = { + tests = { + inherit (nixosTests) immich; + }; + + machine-learning = callPackage ./machine-learning.nix { inherit src; }; + + inherit + src + sources + web + geodata + ; + updateScript = ./update.sh; + }; + + meta = { + description = "Self-hosted photo and video backup solution"; + homepage = "https://immich.app/"; + license = lib.licenses.agpl3Only; + maintainers = with lib.maintainers; [ jvanbruegge ]; + platforms = lib.platforms.linux; + mainProgram = "server"; + }; +} diff --git a/pkgs/by-name/im/immich/sources.json b/pkgs/by-name/im/immich/sources.json new file mode 100644 index 000000000000..4d89ace2fc4a --- /dev/null +++ b/pkgs/by-name/im/immich/sources.json @@ -0,0 +1,15 @@ +{ + "version": "1.115.0", + "hash": "sha256-H2FCR55redomrDjnnCQys47AaYbWEmlxO5NJEcVMBwY=", + "components": { + "server": { + "npmDepsHash": "sha256-6CehRhPepspDpQW1h0Bx7EpH7hn42Ygqma/6wim14jA=" + }, + "web": { + "npmDepsHash": "sha256-ZmXfYktgOmMkDjfqSGyyflr2CmnC9yVnJ1gAcmd6A00=" + }, + "open-api/typescript-sdk": { + "npmDepsHash": "sha256-l1mLYFpFQjYxytY0ZWLq+ldUhZA6so0HqPgCABt0s9k=" + } + } +} diff --git a/pkgs/by-name/im/immich/update.sh b/pkgs/by-name/im/immich/update.sh new file mode 100755 index 000000000000..7b555a53914f --- /dev/null +++ b/pkgs/by-name/im/immich/update.sh @@ -0,0 +1,40 @@ +#!/usr/bin/env nix-shell +#!nix-shell -i bash -p curl jq prefetch-npm-deps nix-prefetch-github coreutils + +set -euo pipefail +cd "$(dirname "${BASH_SOURCE[0]}")" + +old_version=$(jq -r ".version" sources.json || echo -n "0.0.1") +version=$(curl -s "https://api.github.com/repos/immich-app/immich/releases/latest" | jq -r ".tag_name") +version="${version#v}" + +echo "Updating to $version" + +if [[ "$old_version" == "$version" ]]; then + echo "Already up to date!" + exit 0 +fi + +echo "Fetching src" +src_hash=$(nix-prefetch-github immich-app immich --rev "v${version}" | jq -r .hash) +upstream_src="https://raw.githubusercontent.com/immich-app/immich/v$version" + +sources_tmp="$(mktemp)" +cat < "$sources_tmp" +{ + "version": "$version", + "hash": "$src_hash", + "components": {} +} +EOF + +for npm_component in server web "open-api/typescript-sdk"; do + echo "fetching $npm_component" + hash=$(prefetch-npm-deps <(curl -s "$upstream_src/$npm_component/package-lock.json")) + echo "$(jq --arg npm_component "$npm_component" \ + --arg hash "$hash" \ + '.components += {($npm_component): {npmDepsHash: $hash}}' \ + "$sources_tmp")" > "$sources_tmp" +done + +cp "$sources_tmp" sources.json From f2ff5dc2678ef692ef3df452443fe976f6fe7849 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20van=20Br=C3=BCgge?= Date: Thu, 25 Jul 2024 20:07:09 +0100 Subject: [PATCH 35/65] immich-cli: 2.2.15 -> 2.2.19 --- pkgs/by-name/im/immich-cli/package.nix | 36 +++++++++++++ pkgs/by-name/im/immich/sources.json | 13 +++-- pkgs/by-name/im/immich/update.sh | 10 ++-- pkgs/tools/misc/immich-cli/default.nix | 70 -------------------------- pkgs/top-level/all-packages.nix | 2 - 5 files changed, 53 insertions(+), 78 deletions(-) create mode 100644 pkgs/by-name/im/immich-cli/package.nix delete mode 100644 pkgs/tools/misc/immich-cli/default.nix diff --git a/pkgs/by-name/im/immich-cli/package.nix b/pkgs/by-name/im/immich-cli/package.nix new file mode 100644 index 000000000000..d41dc764f26d --- /dev/null +++ b/pkgs/by-name/im/immich-cli/package.nix @@ -0,0 +1,36 @@ +{ + lib, + immich, + buildNpmPackage, + nodejs, + makeWrapper, +}: +buildNpmPackage { + pname = "immich-cli"; + src = "${immich.src}/cli"; + inherit (immich.sources.components.cli) version npmDepsHash; + + nativeBuildInputs = [ makeWrapper ]; + + inherit (immich.web) preBuild; + + installPhase = '' + runHook preInstall + + mkdir -p $out + mv package.json package-lock.json node_modules dist $out/ + + makeWrapper ${lib.getExe nodejs} $out/bin/immich --add-flags $out/dist/index.js + + runHook postInstall + ''; + + meta = { + description = "Self-hosted photo and video backup solution (command line interface)"; + homepage = "https://immich.app/docs/features/command-line-interface"; + license = lib.licenses.agpl3Only; + maintainers = with lib.maintainers; [ jvanbruegge ]; + inherit (nodejs.meta) platforms; + mainProgram = "immich"; + }; +} diff --git a/pkgs/by-name/im/immich/sources.json b/pkgs/by-name/im/immich/sources.json index 4d89ace2fc4a..a07d6c0b1b29 100644 --- a/pkgs/by-name/im/immich/sources.json +++ b/pkgs/by-name/im/immich/sources.json @@ -2,14 +2,21 @@ "version": "1.115.0", "hash": "sha256-H2FCR55redomrDjnnCQys47AaYbWEmlxO5NJEcVMBwY=", "components": { + "cli": { + "npmDepsHash": "sha256-+zKtPHXjBd1KAKvI5xaY2/9qzVUg+8Ho/wrV9+TlU64=", + "version": "2.2.19" + }, "server": { - "npmDepsHash": "sha256-6CehRhPepspDpQW1h0Bx7EpH7hn42Ygqma/6wim14jA=" + "npmDepsHash": "sha256-6CehRhPepspDpQW1h0Bx7EpH7hn42Ygqma/6wim14jA=", + "version": "1.115.0" }, "web": { - "npmDepsHash": "sha256-ZmXfYktgOmMkDjfqSGyyflr2CmnC9yVnJ1gAcmd6A00=" + "npmDepsHash": "sha256-ZmXfYktgOmMkDjfqSGyyflr2CmnC9yVnJ1gAcmd6A00=", + "version": "1.115.0" }, "open-api/typescript-sdk": { - "npmDepsHash": "sha256-l1mLYFpFQjYxytY0ZWLq+ldUhZA6so0HqPgCABt0s9k=" + "npmDepsHash": "sha256-l1mLYFpFQjYxytY0ZWLq+ldUhZA6so0HqPgCABt0s9k=", + "version": "1.115.0" } } } diff --git a/pkgs/by-name/im/immich/update.sh b/pkgs/by-name/im/immich/update.sh index 7b555a53914f..1558577b8b60 100755 --- a/pkgs/by-name/im/immich/update.sh +++ b/pkgs/by-name/im/immich/update.sh @@ -28,13 +28,17 @@ cat < "$sources_tmp" } EOF -for npm_component in server web "open-api/typescript-sdk"; do +lock=$(mktemp) +for npm_component in cli server web "open-api/typescript-sdk"; do echo "fetching $npm_component" - hash=$(prefetch-npm-deps <(curl -s "$upstream_src/$npm_component/package-lock.json")) + curl -s -o "$lock" "$upstream_src/$npm_component/package-lock.json" + hash=$(prefetch-npm-deps "$lock") echo "$(jq --arg npm_component "$npm_component" \ --arg hash "$hash" \ - '.components += {($npm_component): {npmDepsHash: $hash}}' \ + --arg version "$(jq -r '.version' <"$lock")" \ + '.components += {($npm_component): {npmDepsHash: $hash, version: $version}}' \ "$sources_tmp")" > "$sources_tmp" done +rm "$lock" cp "$sources_tmp" sources.json diff --git a/pkgs/tools/misc/immich-cli/default.nix b/pkgs/tools/misc/immich-cli/default.nix deleted file mode 100644 index 8cf8212f8a83..000000000000 --- a/pkgs/tools/misc/immich-cli/default.nix +++ /dev/null @@ -1,70 +0,0 @@ -{ lib -, buildNpmPackage -, fetchFromGitHub -, testers -}: - -let - version = "2.2.15"; - src = fetchFromGitHub { - owner = "immich-app"; - repo = "immich"; - # Using a fixed commit until upstream has release tags for cli. - rev = "f7bfde6a3286d4b454c2f05ccf354914f8eccac6"; - hash = "sha256-O014Y2HwhfPqKKFFGtNDJBzCaR6ugI4azw6/kfzKET0="; - }; - meta' = { - description = "CLI utilities for Immich to help upload images and videos"; - homepage = "https://github.com/immich-app/immich"; - license = lib.licenses.mit; - maintainers = with lib.maintainers; [ felschr pineapplehunter ]; - mainProgram = "immich"; - }; - - open-api-typescript-sdk = buildNpmPackage { - pname = "immich-cli-openapi-typescript-sdk"; - inherit src version; - - npmDepsHash = "sha256-rIN88xw8kdLfhFbT4OReTwzWqNlD4QVAAuvfMyda+V8="; - - postPatch = '' - cd open-api/typescript-sdk - ''; - meta = { - # using inherit for `builtin.unsafeGetAttrPos` to work correctly - inherit (meta') - description - homepage - license - maintainers; - }; - }; - - immich-cli = buildNpmPackage { - pname = "immich-cli"; - inherit src version; - - npmDepsHash = "sha256-r/kCE6FmhbnMVv2Z76hH/1O1YEYSq9VY5kB0xlqWzaM="; - - postPatch = '' - ln -sv ${open-api-typescript-sdk}/lib/node_modules/@immich/sdk/{build,node_modules} open-api/typescript-sdk - cd cli - ''; - - passthru = { - inherit open-api-typescript-sdk; - tests.version = testers.testVersion { package = immich-cli; }; - }; - - meta = { - # using inherit for `builtin.unsafeGetAttrPos` to work correctly - inherit (meta') - description - homepage - license - maintainers - mainProgram; - }; - }; -in -immich-cli diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index f7bd5bedd49e..583c01ddb5cc 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1796,8 +1796,6 @@ with pkgs; hyperpotamus = callPackage ../tools/misc/hyperpotamus { }; - immich-cli = callPackage ../tools/misc/immich-cli { }; - inherit (callPackages ../tools/networking/ivpn/default.nix {}) ivpn ivpn-service; jobber = callPackage ../tools/system/jobber { }; From cedcd9f4f02c02b1d684f0e15e5d2e7104f14cea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20van=20Br=C3=BCgge?= Date: Tue, 2 Jul 2024 17:34:36 +0100 Subject: [PATCH 36/65] nixos/immich: init module --- .../manual/release-notes/rl-2411.section.md | 2 + nixos/modules/module-list.nix | 1 + nixos/modules/services/web-apps/immich.nix | 311 ++++++++++++++++++ 3 files changed, 314 insertions(+) create mode 100644 nixos/modules/services/web-apps/immich.nix diff --git a/nixos/doc/manual/release-notes/rl-2411.section.md b/nixos/doc/manual/release-notes/rl-2411.section.md index c9be54b109c1..ca5bb5690779 100644 --- a/nixos/doc/manual/release-notes/rl-2411.section.md +++ b/nixos/doc/manual/release-notes/rl-2411.section.md @@ -151,6 +151,8 @@ - [Dependency Track](https://dependencytrack.org/), an intelligent Component Analysis platform that allows organizations to identify and reduce risk in the software supply chain. Available as [services.dependency-track](option.html#opt-services.dependency-track). +- [Immich](https://github.com/immich-app/immich), a self-hosted photo and video backup solution. Available as [services.immich](#opt-services.immich.enable). + ## Backward Incompatibilities {#sec-release-24.11-incompatibilities} - `transmission` package has been aliased with a `trace` warning to `transmission_3`. Since [Transmission 4 has been released last year](https://github.com/transmission/transmission/releases/tag/4.0.0), and Transmission 3 will eventually go away, it was decided perform this warning alias to make people aware of the new version. The `services.transmission.package` defaults to `transmission_3` as well because the upgrade can cause data loss in certain specific usage patterns (examples: [#5153](https://github.com/transmission/transmission/issues/5153), [#6796](https://github.com/transmission/transmission/issues/6796)). Please make sure to back up to your data directory per your usage: diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix index 4a97be04fe7f..68cd01c3c6f4 100644 --- a/nixos/modules/module-list.nix +++ b/nixos/modules/module-list.nix @@ -1430,6 +1430,7 @@ ./services/web-apps/icingaweb2/icingaweb2.nix ./services/web-apps/icingaweb2/module-monitoring.nix ./services/web-apps/ifm.nix + ./services/web-apps/immich.nix ./services/web-apps/invidious.nix ./services/web-apps/invoiceplane.nix ./services/web-apps/isso.nix diff --git a/nixos/modules/services/web-apps/immich.nix b/nixos/modules/services/web-apps/immich.nix new file mode 100644 index 000000000000..1e46f3b855df --- /dev/null +++ b/nixos/modules/services/web-apps/immich.nix @@ -0,0 +1,311 @@ +{ + config, + lib, + pkgs, + ... +}: +let + cfg = config.services.immich; + isPostgresUnixSocket = lib.hasPrefix "/" cfg.database.host; + isRedisUnixSocket = lib.hasPrefix "/" cfg.redis.host; + + commonServiceConfig = { + Type = "simple"; + Restart = "on-failure"; + RestartSec = 3; + + # Hardening + CapabilityBoundingSet = ""; + NoNewPrivileges = true; + PrivateUsers = true; + PrivateTmp = true; + PrivateDevices = true; + PrivateMounts = true; + ProtectClock = true; + ProtectControlGroups = true; + ProtectHome = true; + ProtectHostname = true; + ProtectKernelLogs = true; + ProtectKernelModules = true; + ProtectKernelTunables = true; + RestrictAddressFamilies = [ + "AF_INET" + "AF_INET6" + "AF_UNIX" + ]; + RestrictNamespaces = true; + RestrictRealtime = true; + RestrictSUIDSGID = true; + }; + inherit (lib) + types + mkIf + mkOption + mkEnableOption + ; +in +{ + options.services.immich = { + enable = mkEnableOption "Immich"; + package = lib.mkPackageOption pkgs "immich" { }; + + mediaLocation = mkOption { + type = types.path; + default = "/var/lib/immich"; + description = "Directory used to store media files. If it is not the default, the directory has to be created manually such that the immich user is able to read and write to it."; + }; + environment = mkOption { + type = types.submodule { freeformType = types.attrsOf types.str; }; + default = { }; + example = { + IMMICH_LOG_LEVEL = "verbose"; + }; + description = '' + Extra configuration environment variables. Refer to the [documentation](https://immich.app/docs/install/environment-variables) for options tagged with 'server', 'api' or 'microservices'. + ''; + }; + secretsFile = mkOption { + type = types.nullOr ( + types.str + // { + # We don't want users to be able to pass a path literal here but + # it should look like a path. + check = it: lib.isString it && lib.types.path.check it; + } + ); + default = null; + example = "/run/secrets/immich"; + description = '' + Path of a file with extra environment variables to be loaded from disk. This file is not added to the nix store, so it can be used to pass secrets to immich. Refer to the [documentation](https://immich.app/docs/install/environment-variables) for options. + + To set a database password set this to a file containing: + ``` + DB_PASSWORD= + ``` + ''; + }; + host = mkOption { + type = types.str; + default = "localhost"; + description = "The host that immich will listen on."; + }; + port = mkOption { + type = types.port; + default = 3001; + description = "The port that immich will listen on."; + }; + openFirewall = mkOption { + type = types.bool; + default = false; + description = "Whether to open the immich port in the firewall"; + }; + user = mkOption { + type = types.str; + default = "immich"; + description = "The user immich should run as."; + }; + group = mkOption { + type = types.str; + default = "immich"; + description = "The group immich should run as."; + }; + + machine-learning = { + enable = + mkEnableOption "immich's machine-learning functionality to detect faces and search for objects" + // { + default = true; + }; + environment = mkOption { + type = types.submodule { freeformType = types.attrsOf types.str; }; + default = { }; + example = { + MACHINE_LEARNING_MODEL_TTL = "600"; + }; + description = '' + Extra configuration environment variables. Refer to the [documentation](https://immich.app/docs/install/environment-variables) for options tagged with 'machine-learning'. + ''; + }; + }; + + database = { + enable = + mkEnableOption "the postgresql database for use with immich. See {option}`services.postgresql`" + // { + default = true; + }; + createDB = mkEnableOption "the automatic creation of the database for immich." // { + default = true; + }; + name = mkOption { + type = types.str; + default = "immich"; + description = "The name of the immich database."; + }; + host = mkOption { + type = types.str; + default = "/run/postgresql"; + example = "127.0.0.1"; + description = "Hostname or address of the postgresql server. If an absolute path is given here, it will be interpreted as a unix socket path."; + }; + user = mkOption { + type = types.str; + default = "immich"; + description = "The database user for immich."; + }; + }; + redis = { + enable = mkEnableOption "a redis cache for use with immich" // { + default = true; + }; + host = mkOption { + type = types.str; + default = config.services.redis.servers.immich.unixSocket; + defaultText = lib.literalExpression "config.services.redis.servers.immich.unixSocket"; + description = "The host that redis will listen on."; + }; + port = mkOption { + type = types.port; + default = 0; + description = "The port that redis will listen on. Set to zero to disable TCP."; + }; + }; + }; + + config = mkIf cfg.enable { + assertions = [ + { + assertion = !isPostgresUnixSocket -> cfg.secretsFile != null; + message = "A secrets file containing at least the database password must be provided when unix sockets are not used."; + } + ]; + + services.postgresql = mkIf cfg.database.enable { + enable = true; + ensureDatabases = mkIf cfg.database.createDB [ cfg.database.name ]; + ensureUsers = mkIf cfg.database.createDB [ + { + name = cfg.database.user; + ensureDBOwnership = true; + ensureClauses.login = true; + } + ]; + extraPlugins = ps: with ps; [ pgvecto-rs ]; + settings = { + shared_preload_libraries = [ "vectors.so" ]; + search_path = "\"$user\", public, vectors"; + }; + }; + systemd.services.postgresql.serviceConfig.ExecStartPost = + let + sqlFile = pkgs.writeText "immich-pgvectors-setup.sql" '' + CREATE EXTENSION IF NOT EXISTS unaccent; + CREATE EXTENSION IF NOT EXISTS "uuid-ossp"; + CREATE EXTENSION IF NOT EXISTS vectors; + CREATE EXTENSION IF NOT EXISTS cube; + CREATE EXTENSION IF NOT EXISTS earthdistance; + CREATE EXTENSION IF NOT EXISTS pg_trgm; + + ALTER SCHEMA public OWNER TO ${cfg.database.user}; + ALTER SCHEMA vectors OWNER TO ${cfg.database.user}; + GRANT SELECT ON TABLE pg_vector_index_stat TO ${cfg.database.user}; + + ALTER EXTENSION vectors UPDATE; + ''; + in + [ + '' + ${lib.getExe' config.services.postgresql.package "psql"} -d "${cfg.database.name}" -f "${sqlFile}" + '' + ]; + + services.redis.servers = mkIf cfg.redis.enable { + immich = { + enable = true; + user = cfg.user; + port = cfg.redis.port; + bind = mkIf (!isRedisUnixSocket) cfg.redis.host; + }; + }; + + networking.firewall.allowedTCPPorts = mkIf cfg.openFirewall [ cfg.port ]; + + services.immich.environment = + let + postgresEnv = + if isPostgresUnixSocket then + { DB_URL = "socket://${cfg.database.host}?dbname=${cfg.database.name}"; } + else + { + DB_HOSTNAME = cfg.database.host; + DB_PORT = toString cfg.database.port; + DB_DATABASE_NAME = cfg.database.name; + DB_USERNAME = cfg.database.user; + }; + redisEnv = + if isRedisUnixSocket then + { REDIS_SOCKET = cfg.redis.host; } + else + { + REDIS_PORT = toString cfg.redis.port; + REDIS_HOSTNAME = cfg.redis.host; + }; + in + postgresEnv + // redisEnv + // { + HOST = cfg.host; + IMMICH_PORT = toString cfg.port; + IMMICH_MEDIA_LOCATION = cfg.mediaLocation; + IMMICH_MACHINE_LEARNING_URL = "http://localhost:3003"; + }; + + services.immich.machine-learning.environment = { + MACHINE_LEARNING_WORKERS = "1"; + MACHINE_LEARNING_WORKER_TIMEOUT = "120"; + MACHINE_LEARNING_CACHE_FOLDER = "/var/cache/immich"; + IMMICH_HOST = "localhost"; + IMMICH_PORT = "3003"; + }; + + systemd.services.immich-server = { + description = "Immich backend server (Self-hosted photo and video backup solution)"; + after = [ "network.target" ]; + wantedBy = [ "multi-user.target" ]; + inherit (cfg) environment; + + serviceConfig = commonServiceConfig // { + ExecStart = lib.getExe cfg.package; + EnvironmentFile = mkIf (cfg.secretsFile != null) cfg.secretsFile; + StateDirectory = "immich"; + RuntimeDirectory = "immich"; + User = cfg.user; + Group = cfg.group; + }; + }; + + systemd.services.immich-machine-learning = mkIf cfg.machine-learning.enable { + description = "immich machine learning"; + after = [ "network.target" ]; + wantedBy = [ "multi-user.target" ]; + inherit (cfg.machine-learning) environment; + serviceConfig = commonServiceConfig // { + ExecStart = lib.getExe cfg.package.machine-learning; + CacheDirectory = "immich"; + User = cfg.user; + Group = cfg.group; + }; + }; + + users.users = mkIf (cfg.user == "immich") { + immich = { + name = "immich"; + group = cfg.group; + isSystemUser = true; + }; + }; + users.groups = mkIf (cfg.group == "immich") { immich = { }; }; + + meta.maintainers = with lib.maintainers; [ jvanbruegge ]; + }; +} From 9d834dc4ecd42965a4357a96813780f587664d56 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20van=20Br=C3=BCgge?= Date: Tue, 2 Jul 2024 20:18:19 +0100 Subject: [PATCH 37/65] nixos/tests/immich: init tests --- nixos/tests/all-tests.nix | 1 + nixos/tests/web-apps/immich.nix | 51 +++++++++++++++++++++++++++++++++ 2 files changed, 52 insertions(+) create mode 100644 nixos/tests/web-apps/immich.nix diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix index a625cd92e236..2917a8ed4887 100644 --- a/nixos/tests/all-tests.nix +++ b/nixos/tests/all-tests.nix @@ -455,6 +455,7 @@ in { icingaweb2 = handleTest ./icingaweb2.nix {}; ifm = handleTest ./ifm.nix {}; iftop = handleTest ./iftop.nix {}; + immich = handleTest ./web-apps/immich.nix {}; incron = handleTest ./incron.nix {}; incus = pkgs.recurseIntoAttrs (handleTest ./incus { inherit handleTestOn; inherit (pkgs) incus; }); incus-lts = pkgs.recurseIntoAttrs (handleTest ./incus { inherit handleTestOn; }); diff --git a/nixos/tests/web-apps/immich.nix b/nixos/tests/web-apps/immich.nix new file mode 100644 index 000000000000..f03b9290f7a5 --- /dev/null +++ b/nixos/tests/web-apps/immich.nix @@ -0,0 +1,51 @@ +import ../make-test-python.nix ( + { ... }: + { + name = "immich-nixos"; + + nodes.machine = + { pkgs, ... }: + { + # These tests need a little more juice + virtualisation = { + cores = 2; + memorySize = 2048; + diskSize = 4096; + }; + + environment.systemPackages = with pkgs; [ immich-cli ]; + + services.immich = { + enable = true; + environment.IMMICH_LOG_LEVEL = "verbose"; + }; + }; + + testScript = '' + import json + + machine.wait_for_unit("immich-server.service") + + machine.wait_for_open_port(3001) # Server + machine.wait_for_open_port(3003) # Machine learning + machine.succeed("curl --fail http://localhost:3001/") + + machine.succeed(""" + curl -H 'Content-Type: application/json' --data '{ "email": "test@example.com", "name": "Admin", "password": "admin" }' -X POST http://localhost:3001/api/auth/admin-sign-up + """) + res = machine.succeed(""" + curl -H 'Content-Type: application/json' --data '{ "email": "test@example.com", "password": "admin" }' -X POST http://localhost:3001/api/auth/login + """) + token = json.loads(res)['accessToken'] + + res = machine.succeed(""" + curl -H 'Content-Type: application/json' -H 'Cookie: immich_access_token=%s' --data '{ "name": "API Key", "permissions": ["all"] }' -X POST http://localhost:3001/api/api-keys + """ % token) + key = json.loads(res)['secret'] + + machine.succeed(f"immich login http://localhost:3001/api {key}") + res = machine.succeed("immich server-info") + print(res) + ''; + } +) From b2f439596d7bf1ce0907976af775630c42a75017 Mon Sep 17 00:00:00 2001 From: Audrey Dutcher Date: Mon, 23 Sep 2024 16:59:49 -0700 Subject: [PATCH 38/65] freebsd.mkDerivation: use stdenvNoLibs instead of stdenvNoLibc to avoid compiler-rt --- pkgs/os-specific/bsd/freebsd/pkgs/mkDerivation.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/os-specific/bsd/freebsd/pkgs/mkDerivation.nix b/pkgs/os-specific/bsd/freebsd/pkgs/mkDerivation.nix index 302270f4ed8a..4c2fe571999f 100644 --- a/pkgs/os-specific/bsd/freebsd/pkgs/mkDerivation.nix +++ b/pkgs/os-specific/bsd/freebsd/pkgs/mkDerivation.nix @@ -2,7 +2,7 @@ lib, stdenv, stdenvNoCC, - stdenvNoLibc, + stdenvNoLibs, overrideCC, buildPackages, stdenvNoLibcxx ? overrideCC stdenv buildPackages.llvmPackages.clangNoLibcxx, @@ -28,7 +28,7 @@ lib.makeOverridable ( if attrs.noCC or false then stdenvNoCC else if attrs.noLibc or false then - stdenvNoLibc + stdenvNoLibs else if attrs.noLibcxx or false then stdenvNoLibcxx else From d05ed09abd60e0d0273fa656a016002206ce498f Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Tue, 24 Sep 2024 01:22:52 +0000 Subject: [PATCH 39/65] aliae: 0.22.1 -> 0.22.2 --- pkgs/by-name/al/aliae/package.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/by-name/al/aliae/package.nix b/pkgs/by-name/al/aliae/package.nix index 7d8b7c73436e..c3c9a6452d9c 100644 --- a/pkgs/by-name/al/aliae/package.nix +++ b/pkgs/by-name/al/aliae/package.nix @@ -8,16 +8,16 @@ buildGoModule rec { pname = "aliae"; - version = "0.22.1"; + version = "0.22.2"; src = fetchFromGitHub { owner = "jandedobbeleer"; repo = "aliae"; rev = "refs/tags/v${version}"; - hash = "sha256-slixB7mzEdX3ecgbM6tO9IzVH+1w6DwssD1X3MrwAHw="; + hash = "sha256-IpOfTCMbnNUW8flyb7p98QEwveNb8wClyBuv7fAKm8Y="; }; - vendorHash = "sha256-U0Mt2U8WxDFDadIxASz609tUtiF4tETobAmYrk29Lh0="; + vendorHash = "sha256-aUKF/r0OFN0gZXCKHFYKyQa806NFP5lQAONFZlMP4vE="; sourceRoot = "${src.name}/src"; From d85574a269a1b525a183040b8e429dabce2e1ce7 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Tue, 24 Sep 2024 03:50:38 +0000 Subject: [PATCH 40/65] python312Packages.polyswarm-api: 3.9.0 -> 3.10.0 --- pkgs/development/python-modules/polyswarm-api/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/polyswarm-api/default.nix b/pkgs/development/python-modules/polyswarm-api/default.nix index 089505631840..3bce5e796233 100644 --- a/pkgs/development/python-modules/polyswarm-api/default.nix +++ b/pkgs/development/python-modules/polyswarm-api/default.nix @@ -15,7 +15,7 @@ buildPythonPackage rec { pname = "polyswarm-api"; - version = "3.9.0"; + version = "3.10.0"; pyproject = true; disabled = pythonOlder "3.8"; @@ -24,7 +24,7 @@ buildPythonPackage rec { owner = "polyswarm"; repo = "polyswarm-api"; rev = "refs/tags/${version}"; - hash = "sha256-RjzB7S3qTCl6fo+qZ+mVCsQg6CLUnSwutNse5QPQOHU="; + hash = "sha256-3K0FdqsEjt5cTymgxmt0Ohud/+bsILe9bDclZXJqPV8="; }; pythonRelaxDeps = [ "future" ]; From 4ef9ae136d559a297c1b3ce15cfc8e6043c92fad Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Tue, 24 Sep 2024 04:25:41 +0000 Subject: [PATCH 41/65] python312Packages.xknx: 3.1.1 -> 3.2.0 --- pkgs/development/python-modules/xknx/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/xknx/default.nix b/pkgs/development/python-modules/xknx/default.nix index cc04d6611f99..89323aa8d720 100644 --- a/pkgs/development/python-modules/xknx/default.nix +++ b/pkgs/development/python-modules/xknx/default.nix @@ -14,7 +14,7 @@ buildPythonPackage rec { pname = "xknx"; - version = "3.1.1"; + version = "3.2.0"; pyproject = true; disabled = pythonOlder "3.8"; @@ -23,7 +23,7 @@ buildPythonPackage rec { owner = "XKNX"; repo = "xknx"; rev = "refs/tags/${version}"; - hash = "sha256-mlY9jPB3Sme9iajh5kWGf+8MHI0vMUilHe8W7AwmuCo="; + hash = "sha256-hgCmzWncHTsvfVeU/ePpu59THtmuLlqeCO11/L4BRvM="; }; build-system = [ setuptools ]; From 7fa53edfe5d38af3b702f0be7976fc9838713353 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Tue, 24 Sep 2024 04:50:16 +0000 Subject: [PATCH 42/65] python312Packages.yalexs: 8.6.4 -> 8.7.1 --- pkgs/development/python-modules/yalexs/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/yalexs/default.nix b/pkgs/development/python-modules/yalexs/default.nix index 953f818e8337..7505c8e5449f 100644 --- a/pkgs/development/python-modules/yalexs/default.nix +++ b/pkgs/development/python-modules/yalexs/default.nix @@ -24,7 +24,7 @@ buildPythonPackage rec { pname = "yalexs"; - version = "8.6.4"; + version = "8.7.1"; pyproject = true; disabled = pythonOlder "3.9"; @@ -33,7 +33,7 @@ buildPythonPackage rec { owner = "bdraco"; repo = "yalexs"; rev = "refs/tags/v${version}"; - hash = "sha256-KUm+e/ZrfkrS4MA0Wb3VAo9URYmC0ucKw3L+yMMoMtU="; + hash = "sha256-+1Ff0VttUm9cwrEWNiKQfBmYjrtA3AZxWVm/iU21XCE="; }; build-system = [ poetry-core ]; From 87a679db4d89f1f5a70d9e6067f399dc1faa1611 Mon Sep 17 00:00:00 2001 From: K900 Date: Mon, 23 Sep 2024 17:25:43 +0300 Subject: [PATCH 43/65] ryujinx: fix updater script hash format + some shellcheck warnings --- pkgs/by-name/ry/ryujinx/updater.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pkgs/by-name/ry/ryujinx/updater.sh b/pkgs/by-name/ry/ryujinx/updater.sh index 74b291640077..bf6a41aa3e15 100755 --- a/pkgs/by-name/ry/ryujinx/updater.sh +++ b/pkgs/by-name/ry/ryujinx/updater.sh @@ -1,5 +1,6 @@ #! /usr/bin/env nix-shell #! nix-shell -I nixpkgs=./. -i bash -p coreutils gnused curl common-updater-scripts nix-prefetch-git jq +# shellcheck shell=bash set -euo pipefail cd "$(dirname "${BASH_SOURCE[0]}")" @@ -68,9 +69,10 @@ cd ../../../.. if [[ "${1-default}" != "--deps-only" ]]; then SHA="$(nix-prefetch-git https://github.com/ryujinx/ryujinx --rev "$COMMIT" --quiet | jq -r '.sha256')" - update-source-version ryujinx "$NEW_VERSION" "$SHA" --rev="$COMMIT" + SRI=$(nix --experimental-features nix-command hash to-sri "sha256:$SHA") + update-source-version ryujinx "$NEW_VERSION" "$SRI" --rev="$COMMIT" fi echo "building Nuget lockfile" -$(nix-build -A ryujinx.fetch-deps --no-out-link) +eval "$(nix-build -A ryujinx.fetch-deps --no-out-link)" From fddbf5e6ff47784a0a0de8ee7c822b8b937112eb Mon Sep 17 00:00:00 2001 From: K900 Date: Mon, 23 Sep 2024 17:25:55 +0300 Subject: [PATCH 44/65] ryujinx: 1.1.1385 -> 1.1.1398 --- pkgs/by-name/ry/ryujinx/package.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/by-name/ry/ryujinx/package.nix b/pkgs/by-name/ry/ryujinx/package.nix index 46385a0c824d..11d2281a2e1c 100644 --- a/pkgs/by-name/ry/ryujinx/package.nix +++ b/pkgs/by-name/ry/ryujinx/package.nix @@ -19,13 +19,13 @@ buildDotnetModule rec { pname = "ryujinx"; - version = "1.1.1385"; # Based off of the official github actions builds: https://github.com/Ryujinx/Ryujinx/actions/workflows/release.yml + version = "1.1.1398"; # Based off of the official github actions builds: https://github.com/Ryujinx/Ryujinx/actions/workflows/release.yml src = fetchFromGitHub { owner = "Ryujinx"; repo = "Ryujinx"; - rev = "ca59c3f4998e2d1beb3b0d0214611e3332238557"; - hash = "sha256-pLE8UUH4BzYyR3pqyUwQ112vBOump0wKyZaKwE131yY="; + rev = "319507f2a12a6751f3ab833e498a3efd3119f806"; + hash = "sha256-3DM/kahNhl8EhSIRuqH0trYoR51OrGxSE+GuOKxKr2c="; }; enableParallelBuilding = false; From e9a78e028574e810f5652e5ba8b1b36e962f486e Mon Sep 17 00:00:00 2001 From: K900 Date: Tue, 24 Sep 2024 08:19:36 +0300 Subject: [PATCH 45/65] nixos/installer/tools: only enable tools if nix is enabled This restores the old behavior of being able to remove everything nix-related with just `nix.enable = false`. Fixes #344083. --- nixos/modules/installer/tools/tools.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/modules/installer/tools/tools.nix b/nixos/modules/installer/tools/tools.nix index 0a01d6bb9b69..ee7c3e8c887f 100644 --- a/nixos/modules/installer/tools/tools.nix +++ b/nixos/modules/installer/tools/tools.nix @@ -216,7 +216,7 @@ in imports = let mkToolModule = { name, package ? pkgs.${name} }: { config, ... }: { options.system.tools.${name}.enable = lib.mkEnableOption "${name} script" // { - default = true; + default = config.nix.enable; internal = true; }; From d6e9ce6329bd08cec30774cc4c4327694b740daf Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Tue, 17 Sep 2024 17:15:04 +0200 Subject: [PATCH 46/65] ocamlPackages.paf: add missing dependency httpaf --- pkgs/development/ocaml-modules/paf/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/development/ocaml-modules/paf/default.nix b/pkgs/development/ocaml-modules/paf/default.nix index ca04e6bcfe37..0c25da1453ab 100644 --- a/pkgs/development/ocaml-modules/paf/default.nix +++ b/pkgs/development/ocaml-modules/paf/default.nix @@ -19,6 +19,7 @@ , uri , alcotest-lwt , cstruct +, httpaf }: buildDunePackage rec { @@ -43,6 +44,7 @@ buildDunePackage rec { tls cstruct tcpip + httpaf ]; doCheck = true; From 40f7c72b65f20506db6c14345ed0367eb7dc7287 Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Tue, 17 Sep 2024 17:15:09 +0200 Subject: [PATCH 47/65] ocamlPackages.httpun-types: init at 0.2.0 --- .../ocaml-modules/httpun/types.nix | 24 +++++++++++++++++++ pkgs/top-level/ocaml-packages.nix | 2 ++ 2 files changed, 26 insertions(+) create mode 100644 pkgs/development/ocaml-modules/httpun/types.nix diff --git a/pkgs/development/ocaml-modules/httpun/types.nix b/pkgs/development/ocaml-modules/httpun/types.nix new file mode 100644 index 000000000000..f69535129a31 --- /dev/null +++ b/pkgs/development/ocaml-modules/httpun/types.nix @@ -0,0 +1,24 @@ +{ lib +, buildDunePackage +, fetchurl +, faraday +}: + +buildDunePackage rec { + pname = "httpun-types"; + version = "0.2.0"; + + src = fetchurl { + url = "https://github.com/anmonteiro/httpun/releases/download/${version}/httpun-${version}.tbz"; + hash = "sha256-os4n70yFro4cEAjR49Xok9ayEbk0WGod0pQvfbaHvSw="; + }; + + propagatedBuildInputs = [ faraday ]; + + meta = { + description = "Common HTTP/1.x types"; + homepage = "https://github.com/anmonteiro/httpun"; + license = lib.licenses.bsd3; + maintainers = [ lib.maintainers.vbgl ]; + }; +} diff --git a/pkgs/top-level/ocaml-packages.nix b/pkgs/top-level/ocaml-packages.nix index 51163610fe95..6cf16add6230 100644 --- a/pkgs/top-level/ocaml-packages.nix +++ b/pkgs/top-level/ocaml-packages.nix @@ -689,6 +689,8 @@ let httpaf-lwt-unix = callPackage ../development/ocaml-modules/httpaf/lwt-unix.nix { }; + httpun-types = callPackage ../development/ocaml-modules/httpun/types.nix { }; + hxd = callPackage ../development/ocaml-modules/hxd { }; ### I ### From 6c900494411a1c64150f7d581bf32ea268e871a9 Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Tue, 17 Sep 2024 17:15:13 +0200 Subject: [PATCH 48/65] =?UTF-8?q?ocamlPackages.hpack:=200.11.0=20=E2=86=92?= =?UTF-8?q?=200.13.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkgs/development/ocaml-modules/h2/default.nix | 4 ++-- pkgs/development/ocaml-modules/hpack/default.nix | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/development/ocaml-modules/h2/default.nix b/pkgs/development/ocaml-modules/h2/default.nix index f65aeaf0e461..12aebd57774d 100644 --- a/pkgs/development/ocaml-modules/h2/default.nix +++ b/pkgs/development/ocaml-modules/h2/default.nix @@ -5,7 +5,7 @@ , faraday , base64 , psq -, httpaf +, httpun-types , alcotest , yojson , hex @@ -34,7 +34,7 @@ buildDunePackage rec { base64 psq hpack - httpaf + httpun-types ]; doCheck = true; diff --git a/pkgs/development/ocaml-modules/hpack/default.nix b/pkgs/development/ocaml-modules/hpack/default.nix index eb42f5158589..c6c52a38dffd 100644 --- a/pkgs/development/ocaml-modules/hpack/default.nix +++ b/pkgs/development/ocaml-modules/hpack/default.nix @@ -7,11 +7,11 @@ buildDunePackage rec { pname = "hpack"; - version = "0.11.0"; + version = "0.13.0"; src = fetchurl { url = "https://github.com/anmonteiro/ocaml-h2/releases/download/${version}/h2-${version}.tbz"; - hash = "sha256-GdXwazlgDurjzy7ekLpuMkCii8W+F/jl/IBv/WTHgFM="; + hash = "sha256-DYm28XgXUpTnogciO+gdW4P8Mbl1Sb7DTwQyo7KoBw8="; }; minimalOCamlVersion = "4.08"; From 78dc108938026de95d0ca11103486bbe6b60277c Mon Sep 17 00:00:00 2001 From: Sefa Eyeoglu Date: Tue, 24 Sep 2024 09:34:15 +0200 Subject: [PATCH 49/65] traefik: 3.1.2 -> 3.1.4 This fixes CVE-2024-45410[0] (GHSA-62c8-mh53-4cqv[1]). [0]: https://nvd.nist.gov/vuln/detail/CVE-2024-45410 [1]: https://github.com/traefik/traefik/security/advisories/GHSA-62c8-mh53-4cqv Signed-off-by: Sefa Eyeoglu --- pkgs/servers/traefik/default.nix | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pkgs/servers/traefik/default.nix b/pkgs/servers/traefik/default.nix index d9759fa66fc3..db5c231b45de 100644 --- a/pkgs/servers/traefik/default.nix +++ b/pkgs/servers/traefik/default.nix @@ -1,17 +1,17 @@ -{ lib, fetchzip, buildGoModule, nixosTests }: +{ lib, fetchzip, buildGo123Module, nixosTests }: -buildGoModule rec { +buildGo123Module rec { pname = "traefik"; - version = "3.1.2"; + version = "3.1.4"; # Archive with static assets for webui src = fetchzip { url = "https://github.com/traefik/traefik/releases/download/v${version}/traefik-v${version}.src.tar.gz"; - hash = "sha256-PHS4x9RDoc2zDPS1SaYYEeZVa4SyQpvqzPT/SDo1ygg="; + hash = "sha256-e77PCMeN6Ck6hQ3Rx7MU4EL+f/1kpA2E+gVcISoUnf4="; stripRoot = false; }; - vendorHash = "sha256-xQPDlwu/mRdyvZW0qSCA9eko9pOQAMwh2vVJWzMnyfs="; + vendorHash = "sha256-iYwA/y9AuHomyEckOyl4845lkQkeBAFDsGiZWESylqs="; subPackages = [ "cmd/traefik" ]; From d3e5730bbdd08dc2a864ed6fb546a7f490b18b5a Mon Sep 17 00:00:00 2001 From: Gaetan Lepage Date: Tue, 24 Sep 2024 07:32:51 +0200 Subject: [PATCH 50/65] python312Packages.ale-py: 0.9.1 -> 0.10.0 Diff: https://github.com/Farama-Foundation/Arcade-Learning-Environment/compare/refs/tags/v0.9.1...v0.10.0 Changelog: https://github.com/Farama-Foundation/Arcade-Learning-Environment/releases/tag/v0.10.0 --- pkgs/development/python-modules/ale-py/default.nix | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/pkgs/development/python-modules/ale-py/default.nix b/pkgs/development/python-modules/ale-py/default.nix index cdf2363a52f1..175da9c9b475 100644 --- a/pkgs/development/python-modules/ale-py/default.nix +++ b/pkgs/development/python-modules/ale-py/default.nix @@ -30,16 +30,14 @@ buildPythonPackage rec { pname = "ale-py"; - version = "0.9.1"; + version = "0.10.0"; pyproject = true; - disabled = pythonOlder "3.8"; - src = fetchFromGitHub { owner = "Farama-Foundation"; repo = "Arcade-Learning-Environment"; rev = "refs/tags/v${version}"; - hash = "sha256-MpumAQ5OW/+fRIvrBlRWkgioxMVceb5LxEH2JjRk5zY="; + hash = "sha256-JQG8Db7OEKQ7THkHJ+foUm/L7Ctr0Ur8nb6Zc2Z/MJI="; }; build-system = [ @@ -64,12 +62,8 @@ buildPythonPackage rec { postPatch = # Relax the pybind11 version '' - substituteInPlace src/python/CMakeLists.txt \ + substituteInPlace src/ale/python/CMakeLists.txt \ --replace-fail 'find_package(pybind11 ''${PYBIND11_VER} QUIET)' 'find_package(pybind11 QUIET)' - '' - + '' - substituteInPlace pyproject.toml \ - --replace-fail 'dynamic = ["version"]' 'version = "${version}"' ''; dontUseCmakeConfigure = true; From b4cde4d7f1fc84f6ff41ad165dab793dedaedfa0 Mon Sep 17 00:00:00 2001 From: Gaetan Lepage Date: Sun, 7 Apr 2024 14:42:33 +0200 Subject: [PATCH 51/65] luaPackages.neorg: init at 9.1.1-1 Co-authored-by: Austin Horstman --- maintainers/scripts/luarocks-packages.csv | 1 + .../editors/vim/plugins/generated.nix | 12 ---------- .../editors/vim/plugins/overrides.nix | 4 +--- .../editors/vim/plugins/vim-plugin-names | 1 - .../lua-modules/generated-packages.nix | 22 +++++++++++++++++++ pkgs/development/lua-modules/overrides.nix | 11 +++++++++- 6 files changed, 34 insertions(+), 17 deletions(-) diff --git a/maintainers/scripts/luarocks-packages.csv b/maintainers/scripts/luarocks-packages.csv index 4d1ed177c1c4..f502e569aa43 100644 --- a/maintainers/scripts/luarocks-packages.csv +++ b/maintainers/scripts/luarocks-packages.csv @@ -114,6 +114,7 @@ middleclass,,,,,, mimetypes,,,,,, mpack,,,,,, moonscript,https://raw.githubusercontent.com/leafo/moonscript/master/moonscript-dev-1.rockspec,,,,,arobyn +neorg,,,,,,GaetanLepage neotest,,,,,,mrcjkb nlua,,,,,,teto nui.nvim,,,,,,mrcjkb diff --git a/pkgs/applications/editors/vim/plugins/generated.nix b/pkgs/applications/editors/vim/plugins/generated.nix index 852fa77c6c07..b663442ba90d 100644 --- a/pkgs/applications/editors/vim/plugins/generated.nix +++ b/pkgs/applications/editors/vim/plugins/generated.nix @@ -7443,18 +7443,6 @@ final: prev: meta.homepage = "https://github.com/ii14/neorepl.nvim/"; }; - neorg = buildVimPlugin { - pname = "neorg"; - version = "2024-09-08"; - src = fetchFromGitHub { - owner = "nvim-neorg"; - repo = "neorg"; - rev = "ba35900b21921c439e676b063a79c8fad914eac9"; - sha256 = "12sgvf7zbabxvmdf07cv8rcql6jdgdv5xdcn7v5w42q8lg9mps10"; - }; - meta.homepage = "https://github.com/nvim-neorg/neorg/"; - }; - neorg-telescope = buildVimPlugin { pname = "neorg-telescope"; version = "2024-07-30"; diff --git a/pkgs/applications/editors/vim/plugins/overrides.nix b/pkgs/applications/editors/vim/plugins/overrides.nix index ced18c91254d..4fa9b68ad61a 100644 --- a/pkgs/applications/editors/vim/plugins/overrides.nix +++ b/pkgs/applications/editors/vim/plugins/overrides.nix @@ -1238,9 +1238,7 @@ in dependencies = with self; [ plenary-nvim ]; }; - neorg = super.neorg.overrideAttrs { - dependencies = with self; [ plenary-nvim ]; - }; + neorg = neovimUtils.buildNeovimPlugin { luaAttr = luaPackages.neorg; }; neotest = super.neotest.overrideAttrs { dependencies = with self; [ nvim-nio plenary-nvim ]; diff --git a/pkgs/applications/editors/vim/plugins/vim-plugin-names b/pkgs/applications/editors/vim/plugins/vim-plugin-names index 8838032be3e1..f52477db72d9 100644 --- a/pkgs/applications/editors/vim/plugins/vim-plugin-names +++ b/pkgs/applications/editors/vim/plugins/vim-plugin-names @@ -623,7 +623,6 @@ https://github.com/neomake/neomake/,, https://github.com/Shougo/neomru.vim/,, https://github.com/rafamadriz/neon/,, https://github.com/ii14/neorepl.nvim/,HEAD, -https://github.com/nvim-neorg/neorg/,, https://github.com/nvim-neorg/neorg-telescope/,HEAD, https://github.com/karb94/neoscroll.nvim/,, https://github.com/Shougo/neosnippet-snippets/,, diff --git a/pkgs/development/lua-modules/generated-packages.nix b/pkgs/development/lua-modules/generated-packages.nix index 66711d3709c9..80e23c314d98 100644 --- a/pkgs/development/lua-modules/generated-packages.nix +++ b/pkgs/development/lua-modules/generated-packages.nix @@ -2718,6 +2718,28 @@ buildLuarocksPackage { }; }) {}; +neorg = callPackage({ buildLuarocksPackage, fetchurl, fetchzip, lua-utils-nvim, luaOlder, nui-nvim, nvim-nio, pathlib-nvim, plenary-nvim }: +buildLuarocksPackage { + pname = "neorg"; + version = "9.1.1-1"; + knownRockspec = (fetchurl { + url = "mirror://luarocks/neorg-9.1.1-1.rockspec"; + sha256 = "0zafy1hkrvh41vlx1g4rqlcvc4x9pi8dcji30qi0b8lj45pldyr3"; + }).outPath; + src = fetchzip { + url = "https://github.com/nvim-neorg/neorg/archive/v9.1.1.zip"; + sha256 = "18lk22lfzwwn4hy2s035g3kslqmvrr28lm5w9k3dazqwj5nlka3z"; + }; + disabled = luaOlder "5.1"; + propagatedBuildInputs = [ lua-utils-nvim nui-nvim nvim-nio pathlib-nvim plenary-nvim ]; + meta = { + homepage = "https://github.com/nvim-neorg/neorg"; + description = "Modernity meets insane extensibility. The future of organizing your life in Neovim."; + maintainers = with lib.maintainers; [ GaetanLepage ]; + license.fullName = "GPL-3.0"; + }; +}) {}; + neotest = callPackage({ buildLuarocksPackage, fetchurl, fetchzip, luaOlder, nvim-nio, plenary-nvim }: buildLuarocksPackage { pname = "neotest"; diff --git a/pkgs/development/lua-modules/overrides.nix b/pkgs/development/lua-modules/overrides.nix index 228572dd9f25..58cae66490ce 100644 --- a/pkgs/development/lua-modules/overrides.nix +++ b/pkgs/development/lua-modules/overrides.nix @@ -583,7 +583,16 @@ in export HOME=$(mktemp -d) busted --lua=nlua runHook postCheck - ''; + ''; + }); + + neorg = prev.neorg.overrideAttrs (oa: { + postConfigure = '' + cat ''${rockspecFilename} + substituteInPlace ''${rockspecFilename} \ + --replace-fail "'nvim-nio ~> 1.7'," "'nvim-nio >= 1.7'," \ + --replace-fail "'plenary.nvim == 0.1.4'," "'plenary.nvim'," + ''; }); plenary-nvim = prev.plenary-nvim.overrideAttrs (oa: { From 518fc09de034778655d8616f03b92b3e652c50a9 Mon Sep 17 00:00:00 2001 From: Kait Lam <39479354+katrinafyi@users.noreply.github.com> Date: Tue, 24 Sep 2024 18:26:35 +1000 Subject: [PATCH 52/65] ocamlPackages.mlbdd: init at 0.7.2 (#344136) --- .../ocaml-modules/mlbdd/default.nix | 30 +++++++++++++++++++ pkgs/top-level/ocaml-packages.nix | 2 ++ 2 files changed, 32 insertions(+) create mode 100644 pkgs/development/ocaml-modules/mlbdd/default.nix diff --git a/pkgs/development/ocaml-modules/mlbdd/default.nix b/pkgs/development/ocaml-modules/mlbdd/default.nix new file mode 100644 index 000000000000..0392597c2f3b --- /dev/null +++ b/pkgs/development/ocaml-modules/mlbdd/default.nix @@ -0,0 +1,30 @@ +{ + lib, + fetchFromGitHub, + buildDunePackage, + ounit, +}: + +buildDunePackage { + pname = "mlbdd"; + version = "0.7.2"; + + minimalOCamlVersion = "4.04"; + + src = fetchFromGitHub { + owner = "arlencox"; + repo = "mlbdd"; + rev = "v0.7.2"; + hash = "sha256-GRkaUL8LQDdQx9mPvlJIXatgRfen/zKt+nGLiH7Mfvs="; + }; + + checkInputs = [ ounit ]; + + doCheck = true; + + meta = { + homepage = "https://github.com/arlencox/mlbdd"; + description = "A not-quite-so-simple Binary Decision Diagrams implementation for OCaml"; + maintainers = with lib.maintainers; [ katrinafyi ]; + }; +} diff --git a/pkgs/top-level/ocaml-packages.nix b/pkgs/top-level/ocaml-packages.nix index 6cf16add6230..f40b306ee364 100644 --- a/pkgs/top-level/ocaml-packages.nix +++ b/pkgs/top-level/ocaml-packages.nix @@ -1179,6 +1179,8 @@ let mirage-vnetif = callPackage ../development/ocaml-modules/mirage-vnetif { }; + mlbdd = callPackage ../development/ocaml-modules/mlbdd { }; + mldoc = callPackage ../development/ocaml-modules/mldoc { }; mlgmpidl = callPackage ../development/ocaml-modules/mlgmpidl { }; From b4a4679372a604f3ac137c896f4f11513732decd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=A9tan=20Lepage?= <33058747+GaetanLepage@users.noreply.github.com> Date: Tue, 24 Sep 2024 10:29:50 +0200 Subject: [PATCH 53/65] vimPlugins.render-markdown-nvim: remove unneeded nvim-treesitter dependency (#344143) --- pkgs/applications/editors/vim/plugins/overrides.nix | 5 ----- 1 file changed, 5 deletions(-) diff --git a/pkgs/applications/editors/vim/plugins/overrides.nix b/pkgs/applications/editors/vim/plugins/overrides.nix index 4fa9b68ad61a..bb4aab02cc5d 100644 --- a/pkgs/applications/editors/vim/plugins/overrides.nix +++ b/pkgs/applications/editors/vim/plugins/overrides.nix @@ -1499,11 +1499,6 @@ in dependencies = with self; [ nvim-treesitter plenary-nvim ]; }; - render-markdown-nvim = super.render-markdown-nvim.overrideAttrs { - dependencies = with self; [ nvim-treesitter ]; - nvimRequireCheck = "render-markdown"; - }; - # needs "http" and "json" treesitter grammars too rest-nvim = super.rest-nvim.overrideAttrs { dependencies = with self; [ From fc1402425fc0f0712752064b838d3c3345a74f43 Mon Sep 17 00:00:00 2001 From: nvimtor Date: Sat, 7 Sep 2024 21:18:31 +0100 Subject: [PATCH 54/65] vimPlugins.aider-nvim: init at 2023-10-22 --- .../editors/vim/plugins/generated.nix | 12 +++++++++ .../editors/vim/plugins/overrides.nix | 10 +++++++ .../patches/aider.nvim/fix-paths.patch | 26 +++++++++++++++++++ .../editors/vim/plugins/vim-plugin-names | 1 + 4 files changed, 49 insertions(+) create mode 100644 pkgs/applications/editors/vim/plugins/patches/aider.nvim/fix-paths.patch diff --git a/pkgs/applications/editors/vim/plugins/generated.nix b/pkgs/applications/editors/vim/plugins/generated.nix index b663442ba90d..4e253749ee25 100644 --- a/pkgs/applications/editors/vim/plugins/generated.nix +++ b/pkgs/applications/editors/vim/plugins/generated.nix @@ -605,6 +605,18 @@ final: prev: meta.homepage = "https://github.com/aduros/ai.vim/"; }; + aider-nvim = buildVimPlugin { + pname = "aider.nvim"; + version = "2023-10-22"; + src = fetchFromGitHub { + owner = "joshuavial"; + repo = "aider.nvim"; + rev = "74a01227271d0ea211f2edafa82028b22d4c2022"; + sha256 = "jkco90IF948LuRILP3Bog3GelUGOQzsEw2jP4f9Ghbw="; + }; + meta.homepage = "https://github.com/joshuavial/aider.nvim/"; + }; + alchemist-vim = buildVimPlugin { pname = "alchemist.vim"; version = "2023-09-01"; diff --git a/pkgs/applications/editors/vim/plugins/overrides.nix b/pkgs/applications/editors/vim/plugins/overrides.nix index bb4aab02cc5d..24876a338736 100644 --- a/pkgs/applications/editors/vim/plugins/overrides.nix +++ b/pkgs/applications/editors/vim/plugins/overrides.nix @@ -131,6 +131,7 @@ hurl , # must be lua51Packages luajitPackages +, aider-chat , }: self: super: let @@ -1495,6 +1496,15 @@ in ''; }; + aider-nvim = super.aider-nvim.overrideAttrs { + patches = [ ./patches/aider.nvim/fix-paths.patch ]; + + postPatch = '' + substituteInPlace lua/aider.lua --replace '@aider@' ${aider-chat}/bin/aider + substituteInPlace lua/helpers.lua --replace '@aider@' ${aider-chat}/bin/aider + ''; + }; + refactoring-nvim = super.refactoring-nvim.overrideAttrs { dependencies = with self; [ nvim-treesitter plenary-nvim ]; }; diff --git a/pkgs/applications/editors/vim/plugins/patches/aider.nvim/fix-paths.patch b/pkgs/applications/editors/vim/plugins/patches/aider.nvim/fix-paths.patch new file mode 100644 index 000000000000..63995f0636dd --- /dev/null +++ b/pkgs/applications/editors/vim/plugins/patches/aider.nvim/fix-paths.patch @@ -0,0 +1,26 @@ +diff --git a/lua/aider.lua b/lua/aider.lua +index 38db0d1..d1ad6d5 100644 +--- a/lua/aider.lua ++++ b/lua/aider.lua +@@ -26,7 +26,7 @@ function M.AiderOpen(args, window_type) + if M.aider_buf and vim.api.nvim_buf_is_valid(M.aider_buf) then + helpers.open_buffer_in_new_window(window_type, M.aider_buf) + else +- command = 'aider ' .. (args or '') ++ command = '@aider@ ' .. (args or '') + helpers.open_window(window_type) + command = helpers.add_buffers_to_command(command) + M.aider_job_id = vim.fn.termopen(command, {on_exit = OnExit}) +diff --git a/lua/helpers.lua b/lua/helpers.lua +index 152182b..aa21584 100644 +--- a/lua/helpers.lua ++++ b/lua/helpers.lua +@@ -63,7 +63,7 @@ end + + local function build_background_command(args, prompt) + prompt = prompt or "Complete as many todo items as you can and remove the comment for any item you complete." +- local command = 'aider --msg "' .. prompt .. '" ' .. (args or '') ++ local command = '@aider@ --msg "' .. prompt .. '" ' .. (args or '') + command = add_buffers_to_command(command) + return command + end diff --git a/pkgs/applications/editors/vim/plugins/vim-plugin-names b/pkgs/applications/editors/vim/plugins/vim-plugin-names index f52477db72d9..b93ff96b984d 100644 --- a/pkgs/applications/editors/vim/plugins/vim-plugin-names +++ b/pkgs/applications/editors/vim/plugins/vim-plugin-names @@ -49,6 +49,7 @@ https://github.com/stevearc/aerial.nvim/,, https://github.com/Numkil/ag.nvim/,, https://github.com/derekelkins/agda-vim/,, https://github.com/aduros/ai.vim/,HEAD, +https://github.com/joshuavial/aider.nvim/,HEAD, https://github.com/slashmili/alchemist.vim/,, https://github.com/dense-analysis/ale/,, https://github.com/vim-scripts/align/,, From 88ae0a7191c7f68d151307302ad1b1582a29e3ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Tue, 24 Sep 2024 10:58:41 +0200 Subject: [PATCH 55/65] gnugrep: fix eval on windows --- pkgs/tools/text/gnugrep/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/tools/text/gnugrep/default.nix b/pkgs/tools/text/gnugrep/default.nix index 7298fe881bea..40bd33758b54 100644 --- a/pkgs/tools/text/gnugrep/default.nix +++ b/pkgs/tools/text/gnugrep/default.nix @@ -27,7 +27,7 @@ stdenv.mkDerivation { outputs = [ "out" "info" ]; # the man pages are rather small nativeBuildInputs = [ updateAutotoolsGnuConfigScriptsHook ]; - buildInputs = [ pcre2 libiconv runtimeShellPackage ]; + buildInputs = [ pcre2 libiconv ] ++ lib.optional (!stdenv.hostPlatform.isWindows) runtimeShellPackage; # cygwin: FAIL: multibyte-white-space # freebsd: FAIL mb-non-UTF8-performance From af3a3f64df031eba799c5ac5137a2f8446770c91 Mon Sep 17 00:00:00 2001 From: Alois Wohlschlager Date: Sun, 24 Sep 2023 20:32:50 +0200 Subject: [PATCH 56/65] replaceDependencies: evolve from replaceDependency Rewrite replaceDependency so that it can apply multiple replacements in one go. This includes correctly handling the case where one of the replacements itself needs to have another replacement applied as well. This rewritten function is now aptly called replaceDependencies. For compatibility, replaceDependency is retained as a simple wrapper over replaceDependencies. It will cause a rebuild because the unpatched dependency is now referenced by derivation instead of by storePath, but the functionality is equivalent. Fixes: https://github.com/NixOS/nixpkgs/issues/199162 --- pkgs/build-support/replace-dependencies.nix | 186 ++++++++++++++++++++ pkgs/build-support/replace-dependency.nix | 94 ---------- pkgs/top-level/all-packages.nix | 11 +- 3 files changed, 196 insertions(+), 95 deletions(-) create mode 100644 pkgs/build-support/replace-dependencies.nix delete mode 100644 pkgs/build-support/replace-dependency.nix diff --git a/pkgs/build-support/replace-dependencies.nix b/pkgs/build-support/replace-dependencies.nix new file mode 100644 index 000000000000..2af6d19c268d --- /dev/null +++ b/pkgs/build-support/replace-dependencies.nix @@ -0,0 +1,186 @@ +{ + runCommandLocal, + nix, + lib, +}: + +# Replace some dependencies in the requisites tree of drv, propagating the change all the way up the tree, even within other replacements, without a full rebuild. +# This can be useful, for example, to patch a security hole in libc and still use your system safely without rebuilding the world. +# This should be a short term solution, as soon as a rebuild can be done the properly rebuilt derivation should be used. +# Each old dependency and the corresponding new dependency MUST have the same-length name, and ideally should have close-to-identical directory layout. +# +# Example: safeFirefox = replaceDependencies { +# drv = firefox; +# replacements = [ +# { +# oldDependency = glibc; +# newDependency = glibc.overrideAttrs (oldAttrs: { +# patches = oldAttrs.patches ++ [ ./fix-glibc-hole.patch ]; +# }); +# } +# { +# oldDependency = libwebp; +# newDependency = libwebp.overrideAttrs (oldAttrs: { +# patches = oldAttrs.patches ++ [ ./fix-libwebp-hole.patch ]; +# }); +# } +# ]; +# }; +# This will first rebuild glibc and libwebp with your security patches. +# Then it copies over firefox (and all of its dependencies) without rebuilding further. +# In particular, the glibc dependency of libwebp will be replaced by the patched version as well. +# +# In rare cases, it is possible for the replacement process to cause breakage (for example due to checksum mismatch). +# The cutoffPackages argument can be used to exempt the problematic packages from the replacement process. +{ + drv, + replacements, + cutoffPackages ? [ ], + verbose ? true, +}: + +let + inherit (builtins) unsafeDiscardStringContext appendContext; + inherit (lib) + trace + substring + stringLength + concatStringsSep + mapAttrsToList + listToAttrs + attrValues + mapAttrs + filter + hasAttr + all + ; + inherit (lib.attrsets) mergeAttrsList; + + toContextlessString = x: unsafeDiscardStringContext (toString x); + warn = if verbose then trace else (x: y: y); + + referencesOf = + drv: + import + (runCommandLocal "references.nix" + { + exportReferencesGraph = [ + "graph" + drv + ]; + } + '' + (echo { + while read path + do + echo " \"$path\" = [" + read count + read count + while [ "0" != "$count" ] + do + read ref_path + if [ "$ref_path" != "$path" ] + then + echo " \"$ref_path\"" + fi + count=$(($count - 1)) + done + echo " ];" + done < graph + echo }) > $out + '' + ).outPath; + rewriteHashes = + drv: rewrites: + if rewrites == { } then + drv + else + let + drvName = substring 33 (stringLength (baseNameOf drv)) (baseNameOf drv); + in + runCommandLocal drvName { nixStore = "${nix}/bin/nix-store"; } '' + $nixStore --dump ${drv} | sed 's|${baseNameOf drv}|'$(basename $out)'|g' | sed -e ${ + concatStringsSep " -e " ( + mapAttrsToList (name: value: "'s|${baseNameOf name}|${baseNameOf value}|g'") rewrites + ) + } | $nixStore --restore $out + ''; + + knownDerivations = [ drv ] ++ map ({ newDependency, ... }: newDependency) replacements; + referencesMemo = listToAttrs ( + map (drv: { + name = toContextlessString drv; + value = referencesOf drv; + }) knownDerivations + ); + relevantReferences = mergeAttrsList (attrValues referencesMemo); + # Make sure a derivation is returned even when no replacements are actually applied. + # Yes, even in the stupid edge case where the root derivation itself is replaced. + storePathOrKnownDerivationMemo = + mapAttrs ( + drv: _references: + # builtins.storePath does not work in pure evaluation mode, even though it is not impure. + # This reimplementation in Nix works as long as the path is already allowed in the evaluation state. + # This is always the case here, because all paths come from the closure of the original derivation. + appendContext drv { ${drv}.path = true; } + ) relevantReferences + // listToAttrs ( + map (drv: { + name = toContextlessString drv; + value = drv; + }) knownDerivations + ); + + relevantReplacements = filter ( + { oldDependency, newDependency }: + if toString oldDependency == toString newDependency then + warn "replaceDependencies: attempting to replace dependency ${oldDependency} of ${drv} with itself" + # Attempting to replace a dependency by itself is completely useless, and would only lead to infinite recursion. + # Hence it must not be attempted to apply this replacement in any case. + false + else if !hasAttr (toContextlessString oldDependency) referencesMemo.${toContextlessString drv} then + warn "replaceDependencies: ${drv} does not depend on ${oldDependency}" + # Handle the corner case where one of the other replacements introduces the dependency. + # It would be more correct to not show the warning in this case, but the added complexity is probably not worth it. + true + else + true + ) replacements; + + rewriteMemo = + # Mind the order of how the three attrsets are merged here. + # The order of precedence needs to be "explicitly specified replacements" > "rewrite exclusion (cutoffPackages)" > "rewrite". + # So the attrset merge order is the opposite. + mapAttrs ( + drv: references: + let + rewrittenReferences = filter (dep: dep != drv && toString rewriteMemo.${dep} != dep) references; + rewrites = listToAttrs ( + map (reference: { + name = reference; + value = rewriteMemo.${reference}; + }) rewrittenReferences + ); + in + rewriteHashes storePathOrKnownDerivationMemo.${drv} rewrites + ) relevantReferences + // listToAttrs ( + map (drv: { + name = toContextlessString drv; + value = storePathOrKnownDerivationMemo.${toContextlessString drv}; + }) cutoffPackages + ) + // listToAttrs ( + map ( + { oldDependency, newDependency }: + { + name = toContextlessString oldDependency; + value = rewriteMemo.${toContextlessString newDependency}; + } + ) relevantReplacements + ); +in +assert all ( + { oldDependency, newDependency }: stringLength oldDependency == stringLength newDependency +) replacements; +rewriteMemo.${toContextlessString drv} diff --git a/pkgs/build-support/replace-dependency.nix b/pkgs/build-support/replace-dependency.nix deleted file mode 100644 index 7912d21bfd69..000000000000 --- a/pkgs/build-support/replace-dependency.nix +++ /dev/null @@ -1,94 +0,0 @@ -{ runCommandLocal, nix, lib }: - -# Replace a single dependency in the requisites tree of drv, propagating -# the change all the way up the tree, without a full rebuild. This can be -# useful, for example, to patch a security hole in libc and still use your -# system safely without rebuilding the world. This should be a short term -# solution, as soon as a rebuild can be done the properly rebuild derivation -# should be used. The old dependency and new dependency MUST have the same-length -# name, and ideally should have close-to-identical directory layout. -# -# Example: safeFirefox = replaceDependency { -# drv = firefox; -# oldDependency = glibc; -# newDependency = overrideDerivation glibc (attrs: { -# patches = attrs.patches ++ [ ./fix-glibc-hole.patch ]; -# }); -# }; -# This will rebuild glibc with your security patch, then copy over firefox -# (and all of its dependencies) without rebuilding further. -{ drv, oldDependency, newDependency, verbose ? true }: - -let - inherit (lib) - any - attrNames - concatStringsSep - elem - filter - filterAttrs - listToAttrs - mapAttrsToList - stringLength - substring - ; - - warn = if verbose then builtins.trace else (x: y: y); - references = import (runCommandLocal "references.nix" { exportReferencesGraph = [ "graph" drv ]; } '' - (echo { - while read path - do - echo " \"$path\" = [" - read count - read count - while [ "0" != "$count" ] - do - read ref_path - if [ "$ref_path" != "$path" ] - then - echo " (builtins.storePath (/. + \"$ref_path\"))" - fi - count=$(($count - 1)) - done - echo " ];" - done < graph - echo }) > $out - '').outPath; - - discard = builtins.unsafeDiscardStringContext; - - oldStorepath = builtins.storePath (discard (toString oldDependency)); - - referencesOf = drv: references.${discard (toString drv)}; - - dependsOnOldMemo = listToAttrs (map - (drv: { name = discard (toString drv); - value = elem oldStorepath (referencesOf drv) || - any dependsOnOld (referencesOf drv); - }) (attrNames references)); - - dependsOnOld = drv: dependsOnOldMemo.${discard (toString drv)}; - - drvName = drv: - discard (substring 33 (stringLength (builtins.baseNameOf drv)) (builtins.baseNameOf drv)); - - rewriteHashes = drv: hashes: runCommandLocal (drvName drv) { nixStore = "${nix.out}/bin/nix-store"; } '' - $nixStore --dump ${drv} | sed 's|${baseNameOf drv}|'$(basename $out)'|g' | sed -e ${ - concatStringsSep " -e " (mapAttrsToList (name: value: - "'s|${baseNameOf name}|${baseNameOf value}|g'" - ) hashes) - } | $nixStore --restore $out - ''; - - rewrittenDeps = listToAttrs [ {name = discard (toString oldDependency); value = newDependency;} ]; - - rewriteMemo = listToAttrs (map - (drv: { name = discard (toString drv); - value = rewriteHashes (builtins.storePath drv) - (filterAttrs (n: v: elem (builtins.storePath (discard (toString n))) (referencesOf drv)) rewriteMemo); - }) - (filter dependsOnOld (attrNames references))) // rewrittenDeps; - - drvHash = discard (toString drv); -in assert (stringLength (drvName (toString oldDependency)) == stringLength (drvName (toString newDependency))); -rewriteMemo.${drvHash} or (warn "replace-dependency.nix: Derivation ${drvHash} does not depend on ${discard (toString oldDependency)}" drv) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 6910ab112750..93df75b3b5b9 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1306,7 +1306,16 @@ with pkgs; substituteAllFiles = callPackage ../build-support/substitute-files/substitute-all-files.nix { }; - replaceDependency = callPackage ../build-support/replace-dependency.nix { }; + replaceDependencies = callPackage ../build-support/replace-dependencies.nix { }; + + replaceDependency = { drv, oldDependency, newDependency, verbose ? true }: replaceDependencies { + inherit drv verbose; + replacements = [{ + inherit oldDependency newDependency; + }]; + # When newDependency depends on drv, instead of causing infinite recursion, keep it as is. + cutoffPackages = [ newDependency ]; + }; replaceVars = callPackage ../build-support/replace-vars { }; From d3abae8dee5b60b0b4f30a19b7101de3baa88d7d Mon Sep 17 00:00:00 2001 From: Alois Wohlschlager Date: Sun, 24 Sep 2023 20:52:50 +0200 Subject: [PATCH 57/65] nixos/top-level: improve replaceRuntimeDependencies Instead of iterating over all replacements and applying them one by one, use the newly introduced replaceDependencies function to apply them all at once for replaceRuntimeDependencies. The advantages are twofold in case there are multiple replacements: * Performance is significantly improved, because there is only one pass over the closure to be made. * Correctness is improved, because replaceDependencies also replaces dependencies of the replacements themselves if applicable. Fixes: https://github.com/NixOS/nixpkgs/issues/4336 --- nixos/modules/system/activation/top-level.nix | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/nixos/modules/system/activation/top-level.nix b/nixos/modules/system/activation/top-level.nix index ed0ece19f2fa..95c4782ebd9e 100644 --- a/nixos/modules/system/activation/top-level.nix +++ b/nixos/modules/system/activation/top-level.nix @@ -68,9 +68,17 @@ let else showWarnings config.warnings baseSystem; # Replace runtime dependencies - system = foldr ({ oldDependency, newDependency }: drv: - pkgs.replaceDependency { inherit oldDependency newDependency drv; } - ) baseSystemAssertWarn config.system.replaceRuntimeDependencies; + system = let replacements = config.system.replaceRuntimeDependencies; in + if replacements == [] then + # Avoid IFD if possible, by sidestepping replaceDependencies if no replacements are specified. + baseSystemAssertWarn + else + (pkgs.replaceDependencies.override { + nix = config.nix.package; + }) { + drv = baseSystemAssertWarn; + inherit replacements; + }; systemWithBuildDeps = system.overrideAttrs (o: { systemBuildClosure = pkgs.closureInfo { rootPaths = [ system.drvPath ]; }; From 63d6a7037c1568a52141a3886fc58c23b9901607 Mon Sep 17 00:00:00 2001 From: Alois Wohlschlager Date: Sat, 14 Oct 2023 18:22:08 +0200 Subject: [PATCH 58/65] nixos/top-level: wire up cutoffPackages for replaceDependencies Move replaceRuntimeDependencies to the replaceDependencies namespace, where the structure is more consistent with the replaceDependencies function. This makes space for wiring up cutoffPackages as an option too. By default, the system's initrd is excluded. The replacement process does not work properly anyway due to the structure of the initrd (the files being copied into it, and it being compressed). In the worst case (which has been observed to actually occur in practice), a store path makes it into the incompressible parts of the archive, checksums are broken, and the system won't boot. --- nixos/modules/system/activation/top-level.nix | 69 ++++++++++++------- 1 file changed, 43 insertions(+), 26 deletions(-) diff --git a/nixos/modules/system/activation/top-level.nix b/nixos/modules/system/activation/top-level.nix index 95c4782ebd9e..1fdf4c3883da 100644 --- a/nixos/modules/system/activation/top-level.nix +++ b/nixos/modules/system/activation/top-level.nix @@ -68,7 +68,7 @@ let else showWarnings config.warnings baseSystem; # Replace runtime dependencies - system = let replacements = config.system.replaceRuntimeDependencies; in + system = let inherit (config.system.replaceDependencies) replacements cutoffPackages; in if replacements == [] then # Avoid IFD if possible, by sidestepping replaceDependencies if no replacements are specified. baseSystemAssertWarn @@ -77,7 +77,7 @@ let nix = config.nix.package; }) { drv = baseSystemAssertWarn; - inherit replacements; + inherit replacements cutoffPackages; }; systemWithBuildDeps = system.overrideAttrs (o: { @@ -95,6 +95,7 @@ in (mkRemovedOptionModule [ "nesting" "clone" ] "Use `specialisation.«name» = { inheritParentConfig = true; configuration = { ... }; }` instead.") (mkRemovedOptionModule [ "nesting" "children" ] "Use `specialisation.«name».configuration = { ... }` instead.") (mkRenamedOptionModule [ "system" "forbiddenDependenciesRegex" ] [ "system" "forbiddenDependenciesRegexes" ]) + (mkRenamedOptionModule [ "system" "replaceRuntimeDependencies" ] [ "system" "replaceDependencies" "replacements" ]) ]; options = { @@ -213,31 +214,47 @@ in ''; }; - system.replaceRuntimeDependencies = mkOption { - default = []; - example = lib.literalExpression "[ ({ original = pkgs.openssl; replacement = pkgs.callPackage /path/to/openssl { }; }) ]"; - type = types.listOf (types.submodule ( - { ... }: { - options.original = mkOption { - type = types.package; - description = "The original package to override."; - }; + system.replaceDependencies = { + replacements = mkOption { + default = []; + example = lib.literalExpression "[ ({ oldDependency = pkgs.openssl; newDependency = pkgs.callPackage /path/to/openssl { }; }) ]"; + type = types.listOf (types.submodule ( + { ... }: { + imports = [ + (mkRenamedOptionModule [ "original" ] [ "oldDependency" ]) + (mkRenamedOptionModule [ "replacement" ] [ "newDependency" ]) + ]; - options.replacement = mkOption { - type = types.package; - description = "The replacement package."; - }; - }) - ); - apply = map ({ original, replacement, ... }: { - oldDependency = original; - newDependency = replacement; - }); - description = '' - List of packages to override without doing a full rebuild. - The original derivation and replacement derivation must have the same - name length, and ideally should have close-to-identical directory layout. - ''; + options.oldDependency = mkOption { + type = types.package; + description = "The original package to override."; + }; + + options.newDependency = mkOption { + type = types.package; + description = "The replacement package."; + }; + }) + ); + apply = map ({ oldDependency, newDependency, ... }: { + inherit oldDependency newDependency; + }); + description = '' + List of packages to override without doing a full rebuild. + The original derivation and replacement derivation must have the same + name length, and ideally should have close-to-identical directory layout. + ''; + }; + + cutoffPackages = mkOption { + default = [ config.system.build.initialRamdisk ]; + defaultText = literalExpression "[ config.system.build.initialRamdisk ]"; + type = types.listOf types.package; + description = '' + Packages to which no replacements should be applied. + The initrd is matched by default, because its structure renders the replacement process ineffective and prone to breakage. + ''; + }; }; system.name = mkOption { From fee5c7e1c2b7395b61d7436503292df584e52840 Mon Sep 17 00:00:00 2001 From: Alois Wohlschlager Date: Sat, 16 Dec 2023 19:02:17 +0100 Subject: [PATCH 59/65] replaceDependencies: add tests The tests cannot be directly built by Hydra, because replaceDependencies relies on IFD. Instead, they are put inside a NixOS test where they are built on the guest. --- nixos/tests/all-tests.nix | 1 + nixos/tests/replace-dependencies/default.nix | 18 +++ nixos/tests/replace-dependencies/guest.nix | 132 +++++++++++++++++++ 3 files changed, 151 insertions(+) create mode 100644 nixos/tests/replace-dependencies/default.nix create mode 100644 nixos/tests/replace-dependencies/guest.nix diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix index 2917a8ed4887..15efe3a06b56 100644 --- a/nixos/tests/all-tests.nix +++ b/nixos/tests/all-tests.nix @@ -857,6 +857,7 @@ in { redlib = handleTest ./redlib.nix {}; redmine = handleTest ./redmine.nix {}; renovate = handleTest ./renovate.nix {}; + replace-dependencies = handleTest ./replace-dependencies {}; restartByActivationScript = handleTest ./restart-by-activation-script.nix {}; restic-rest-server = handleTest ./restic-rest-server.nix {}; restic = handleTest ./restic.nix {}; diff --git a/nixos/tests/replace-dependencies/default.nix b/nixos/tests/replace-dependencies/default.nix new file mode 100644 index 000000000000..822b0fbecade --- /dev/null +++ b/nixos/tests/replace-dependencies/default.nix @@ -0,0 +1,18 @@ +import ../make-test-python.nix ( + { pkgs, ... }: + { + name = "replace-dependencies"; + meta.maintainers = with pkgs.lib.maintainers; [ alois31 ]; + + nodes.machine = + { ... }: + { + system.extraDependencies = [ pkgs.stdenvNoCC ]; + }; + + testScript = '' + start_all() + machine.succeed("nix-build --option substitute false ${pkgs.path}/nixos/tests/replace-dependencies/guest.nix") + ''; + } +) diff --git a/nixos/tests/replace-dependencies/guest.nix b/nixos/tests/replace-dependencies/guest.nix new file mode 100644 index 000000000000..32376e0a5636 --- /dev/null +++ b/nixos/tests/replace-dependencies/guest.nix @@ -0,0 +1,132 @@ +# This needs to be run in a NixOS test, because Hydra cannot do IFD. +let + pkgs = import ../../.. { }; + inherit (pkgs) + runCommand + writeShellScriptBin + replaceDependency + replaceDependencies + ; + inherit (pkgs.lib) escapeShellArg; + mkCheckOutput = + name: test: output: + runCommand name { } '' + actualOutput="$(${escapeShellArg "${test}/bin/test"})" + if [ "$(${escapeShellArg "${test}/bin/test"})" != ${escapeShellArg output} ]; then + echo >&2 "mismatched output: expected \""${escapeShellArg output}"\", got \"$actualOutput\"" + exit 1 + fi + touch "$out" + ''; + oldDependency = writeShellScriptBin "dependency" '' + echo "got old dependency" + ''; + newDependency = writeShellScriptBin "dependency" '' + echo "got new dependency" + ''; + basic = writeShellScriptBin "test" '' + ${oldDependency}/bin/dependency + ''; + transitive = writeShellScriptBin "test" '' + ${basic}/bin/test + ''; + weirdDependency = writeShellScriptBin "dependency" '' + echo "got weird dependency" + ${basic}/bin/test + ''; + oldDependency1 = writeShellScriptBin "dependency1" '' + echo "got old dependency 1" + ''; + newDependency1 = writeShellScriptBin "dependency1" '' + echo "got new dependency 1" + ''; + oldDependency2 = writeShellScriptBin "dependency2" '' + ${oldDependency1}/bin/dependency1 + echo "got old dependency 2" + ''; + newDependency2 = writeShellScriptBin "dependency2" '' + ${oldDependency1}/bin/dependency1 + echo "got new dependency 2" + ''; + deep = writeShellScriptBin "test" '' + ${oldDependency2}/bin/dependency2 + ''; +in +{ + replacedependency-basic = mkCheckOutput "replacedependency-basic" (replaceDependency { + drv = basic; + inherit oldDependency newDependency; + }) "got new dependency"; + + replacedependency-transitive = mkCheckOutput "replacedependency-transitive" (replaceDependency { + drv = transitive; + inherit oldDependency newDependency; + }) "got new dependency"; + + replacedependency-weird = + mkCheckOutput "replacedependency-weird" + (replaceDependency { + drv = basic; + inherit oldDependency; + newDependency = weirdDependency; + }) + '' + got weird dependency + got old dependency''; + + replacedependencies-precedence = mkCheckOutput "replacedependencies-precedence" (replaceDependencies + { + drv = basic; + replacements = [ { inherit oldDependency newDependency; } ]; + cutoffPackages = [ oldDependency ]; + } + ) "got new dependency"; + + replacedependencies-self = mkCheckOutput "replacedependencies-self" (replaceDependencies { + drv = basic; + replacements = [ + { + inherit oldDependency; + newDependency = oldDependency; + } + ]; + }) "got old dependency"; + + replacedependencies-deep-order1 = + mkCheckOutput "replacedependencies-deep-order1" + (replaceDependencies { + drv = deep; + replacements = [ + { + oldDependency = oldDependency1; + newDependency = newDependency1; + } + { + oldDependency = oldDependency2; + newDependency = newDependency2; + } + ]; + }) + '' + got new dependency 1 + got new dependency 2''; + + replacedependencies-deep-order2 = + mkCheckOutput "replacedependencies-deep-order2" + (replaceDependencies { + drv = deep; + replacements = [ + { + oldDependency = oldDependency2; + newDependency = newDependency2; + } + { + oldDependency = oldDependency1; + newDependency = newDependency1; + } + ]; + }) + '' + got new dependency 1 + got new dependency 2''; +} From 59ca239d1ad234106404de4cf1541bd4629da0b7 Mon Sep 17 00:00:00 2001 From: Alois Wohlschlager Date: Fri, 12 Jan 2024 10:14:38 +0100 Subject: [PATCH 60/65] replaceDirectDependencies: split off from replaceDependencies This allows both swapping out and reusing the rewrite machinery. --- nixos/modules/system/activation/top-level.nix | 4 ++- pkgs/build-support/replace-dependencies.nix | 31 ++++++------------- .../replace-direct-dependencies.nix | 25 +++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 4 files changed, 40 insertions(+), 22 deletions(-) create mode 100644 pkgs/build-support/replace-direct-dependencies.nix diff --git a/nixos/modules/system/activation/top-level.nix b/nixos/modules/system/activation/top-level.nix index 1fdf4c3883da..1b0a62c2e8e7 100644 --- a/nixos/modules/system/activation/top-level.nix +++ b/nixos/modules/system/activation/top-level.nix @@ -74,7 +74,9 @@ let baseSystemAssertWarn else (pkgs.replaceDependencies.override { - nix = config.nix.package; + replaceDirectDependencies = pkgs.replaceDirectDependencies.override { + nix = config.nix.package; + }; }) { drv = baseSystemAssertWarn; inherit replacements cutoffPackages; diff --git a/pkgs/build-support/replace-dependencies.nix b/pkgs/build-support/replace-dependencies.nix index 2af6d19c268d..af0a2c05d623 100644 --- a/pkgs/build-support/replace-dependencies.nix +++ b/pkgs/build-support/replace-dependencies.nix @@ -1,7 +1,7 @@ { - runCommandLocal, - nix, lib, + runCommandLocal, + replaceDirectDependencies, }: # Replace some dependencies in the requisites tree of drv, propagating the change all the way up the tree, even within other replacements, without a full rebuild. @@ -43,15 +43,13 @@ let inherit (builtins) unsafeDiscardStringContext appendContext; inherit (lib) trace - substring stringLength - concatStringsSep - mapAttrsToList listToAttrs attrValues mapAttrs filter hasAttr + mapAttrsToList all ; inherit (lib.attrsets) mergeAttrsList; @@ -90,21 +88,6 @@ let echo }) > $out '' ).outPath; - rewriteHashes = - drv: rewrites: - if rewrites == { } then - drv - else - let - drvName = substring 33 (stringLength (baseNameOf drv)) (baseNameOf drv); - in - runCommandLocal drvName { nixStore = "${nix}/bin/nix-store"; } '' - $nixStore --dump ${drv} | sed 's|${baseNameOf drv}|'$(basename $out)'|g' | sed -e ${ - concatStringsSep " -e " ( - mapAttrsToList (name: value: "'s|${baseNameOf name}|${baseNameOf value}|g'") rewrites - ) - } | $nixStore --restore $out - ''; knownDerivations = [ drv ] ++ map ({ newDependency, ... }: newDependency) replacements; referencesMemo = listToAttrs ( @@ -162,7 +145,13 @@ let }) rewrittenReferences ); in - rewriteHashes storePathOrKnownDerivationMemo.${drv} rewrites + replaceDirectDependencies { + drv = storePathOrKnownDerivationMemo.${drv}; + replacements = mapAttrsToList (name: value: { + oldDependency = name; + newDependency = value; + }) rewrites; + } ) relevantReferences // listToAttrs ( map (drv: { diff --git a/pkgs/build-support/replace-direct-dependencies.nix b/pkgs/build-support/replace-direct-dependencies.nix new file mode 100644 index 000000000000..b579a097c442 --- /dev/null +++ b/pkgs/build-support/replace-direct-dependencies.nix @@ -0,0 +1,25 @@ +{ + lib, + runCommandLocal, + nix, +}: + +# Replace some direct dependencies of drv, not recursing into the dependency tree. +# You likely want to use replaceDependencies instead, unless you plan to implement your own recursion mechanism. +{ drv, replacements ? [ ] }: +let inherit (lib) all stringLength substring concatStringsSep; +in assert all ({ oldDependency, newDependency }: + stringLength oldDependency == stringLength newDependency) replacements; +if replacements == [ ] then + drv +else + let drvName = substring 33 (stringLength (baseNameOf drv)) (baseNameOf drv); + in runCommandLocal drvName { nixStore = "${nix}/bin/nix-store"; } '' + $nixStore --dump ${drv} | sed 's|${ + baseNameOf drv + }|'$(basename $out)'|g' | sed -e ${ + concatStringsSep " -e " (map ({ oldDependency, newDependency }: + "'s|${baseNameOf oldDependency}|${baseNameOf newDependency}|g'") + replacements) + } | $nixStore --restore $out + '' diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 93df75b3b5b9..bcc9af48f461 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1319,6 +1319,8 @@ with pkgs; replaceVars = callPackage ../build-support/replace-vars { }; + replaceDirectDependencies = callPackage ../build-support/replace-direct-dependencies.nix { }; + nukeReferences = callPackage ../build-support/nuke-references { inherit (darwin) signingUtils; }; From 3616cfb8d9f5a20b7c2ae53101e0c6709c63c1cb Mon Sep 17 00:00:00 2001 From: Alois Wohlschlager Date: Sat, 27 Jan 2024 11:59:26 +0100 Subject: [PATCH 61/65] replaceDependencies: add support for ca-derivations Unlike regular input-addressed or fixed-output derivations, floating and deferred derivations do not have their store path available at evaluation time, so their outPath is a placeholder. The following changes are needed for replaceDependencies to continue working: * Detect the placeholder and retrieve the store path using another IFD hack when collecting the rewrite plan. * Try to obtain the derivation name needed for replaceDirectDependencies from the derivation arguments if a placeholder is detected. * Move the length mismatch detection to build time, since the placeholder has a fixed length which is unrelated to the store path. --- nixos/tests/replace-dependencies/default.nix | 1 + nixos/tests/replace-dependencies/guest.nix | 17 +++++ pkgs/build-support/replace-dependencies.nix | 54 +++++++++----- .../replace-direct-dependencies.nix | 73 +++++++++++++++---- 4 files changed, 114 insertions(+), 31 deletions(-) diff --git a/nixos/tests/replace-dependencies/default.nix b/nixos/tests/replace-dependencies/default.nix index 822b0fbecade..ce0013a868c7 100644 --- a/nixos/tests/replace-dependencies/default.nix +++ b/nixos/tests/replace-dependencies/default.nix @@ -7,6 +7,7 @@ import ../make-test-python.nix ( nodes.machine = { ... }: { + nix.settings.experimental-features = [ "ca-derivations" ]; system.extraDependencies = [ pkgs.stdenvNoCC ]; }; diff --git a/nixos/tests/replace-dependencies/guest.nix b/nixos/tests/replace-dependencies/guest.nix index 32376e0a5636..f022f1728599 100644 --- a/nixos/tests/replace-dependencies/guest.nix +++ b/nixos/tests/replace-dependencies/guest.nix @@ -21,12 +21,17 @@ let oldDependency = writeShellScriptBin "dependency" '' echo "got old dependency" ''; + oldDependency-ca = oldDependency.overrideAttrs { __contentAddressed = true; }; newDependency = writeShellScriptBin "dependency" '' echo "got new dependency" ''; + newDependency-ca = newDependency.overrideAttrs { __contentAddressed = true; }; basic = writeShellScriptBin "test" '' ${oldDependency}/bin/dependency ''; + basic-ca = writeShellScriptBin "test" '' + ${oldDependency-ca}/bin/dependency + ''; transitive = writeShellScriptBin "test" '' ${basic}/bin/test ''; @@ -58,6 +63,18 @@ in inherit oldDependency newDependency; }) "got new dependency"; + replacedependency-basic-old-ca = mkCheckOutput "replacedependency-basic" (replaceDependency { + drv = basic-ca; + oldDependency = oldDependency-ca; + inherit newDependency; + }) "got new dependency"; + + replacedependency-basic-new-ca = mkCheckOutput "replacedependency-basic" (replaceDependency { + drv = basic; + inherit oldDependency; + newDependency = newDependency-ca; + }) "got new dependency"; + replacedependency-transitive = mkCheckOutput "replacedependency-transitive" (replaceDependency { drv = transitive; inherit oldDependency newDependency; diff --git a/pkgs/build-support/replace-dependencies.nix b/pkgs/build-support/replace-dependencies.nix index af0a2c05d623..c276b3e09e49 100644 --- a/pkgs/build-support/replace-dependencies.nix +++ b/pkgs/build-support/replace-dependencies.nix @@ -43,14 +43,14 @@ let inherit (builtins) unsafeDiscardStringContext appendContext; inherit (lib) trace - stringLength listToAttrs + isStorePath + readFile attrValues mapAttrs filter hasAttr mapAttrsToList - all ; inherit (lib.attrsets) mergeAttrsList; @@ -89,17 +89,38 @@ let '' ).outPath; - knownDerivations = [ drv ] ++ map ({ newDependency, ... }: newDependency) replacements; + targetDerivations = [ drv ] ++ map ({ newDependency, ... }: newDependency) replacements; + realisation = + drv: + if isStorePath drv then + # Input-addressed and fixed-output derivations have their realisation as outPath. + toContextlessString drv + else + # Floating and deferred derivations have a placeholder outPath. + # The realisation can only be obtained by performing an actual build. + unsafeDiscardStringContext ( + readFile ( + runCommandLocal "realisation" + { + env = { + inherit drv; + }; + } + '' + echo -n "$drv" > $out + '' + ) + ); referencesMemo = listToAttrs ( map (drv: { - name = toContextlessString drv; + name = realisation drv; value = referencesOf drv; - }) knownDerivations + }) targetDerivations ); relevantReferences = mergeAttrsList (attrValues referencesMemo); # Make sure a derivation is returned even when no replacements are actually applied. # Yes, even in the stupid edge case where the root derivation itself is replaced. - storePathOrKnownDerivationMemo = + storePathOrKnownTargetDerivationMemo = mapAttrs ( drv: _references: # builtins.storePath does not work in pure evaluation mode, even though it is not impure. @@ -109,9 +130,9 @@ let ) relevantReferences // listToAttrs ( map (drv: { - name = toContextlessString drv; + name = realisation drv; value = drv; - }) knownDerivations + }) targetDerivations ); relevantReplacements = filter ( @@ -121,7 +142,7 @@ let # Attempting to replace a dependency by itself is completely useless, and would only lead to infinite recursion. # Hence it must not be attempted to apply this replacement in any case. false - else if !hasAttr (toContextlessString oldDependency) referencesMemo.${toContextlessString drv} then + else if !hasAttr (realisation oldDependency) referencesMemo.${realisation drv} then warn "replaceDependencies: ${drv} does not depend on ${oldDependency}" # Handle the corner case where one of the other replacements introduces the dependency. # It would be more correct to not show the warning in this case, but the added complexity is probably not worth it. @@ -146,7 +167,7 @@ let ); in replaceDirectDependencies { - drv = storePathOrKnownDerivationMemo.${drv}; + drv = storePathOrKnownTargetDerivationMemo.${drv}; replacements = mapAttrsToList (name: value: { oldDependency = name; newDependency = value; @@ -155,21 +176,18 @@ let ) relevantReferences // listToAttrs ( map (drv: { - name = toContextlessString drv; - value = storePathOrKnownDerivationMemo.${toContextlessString drv}; + name = realisation drv; + value = storePathOrKnownTargetDerivationMemo.${realisation drv}; }) cutoffPackages ) // listToAttrs ( map ( { oldDependency, newDependency }: { - name = toContextlessString oldDependency; - value = rewriteMemo.${toContextlessString newDependency}; + name = realisation oldDependency; + value = rewriteMemo.${realisation newDependency}; } ) relevantReplacements ); in -assert all ( - { oldDependency, newDependency }: stringLength oldDependency == stringLength newDependency -) replacements; -rewriteMemo.${toContextlessString drv} +rewriteMemo.${realisation drv} diff --git a/pkgs/build-support/replace-direct-dependencies.nix b/pkgs/build-support/replace-direct-dependencies.nix index b579a097c442..57036ebd74d1 100644 --- a/pkgs/build-support/replace-direct-dependencies.nix +++ b/pkgs/build-support/replace-direct-dependencies.nix @@ -6,20 +6,67 @@ # Replace some direct dependencies of drv, not recursing into the dependency tree. # You likely want to use replaceDependencies instead, unless you plan to implement your own recursion mechanism. -{ drv, replacements ? [ ] }: -let inherit (lib) all stringLength substring concatStringsSep; -in assert all ({ oldDependency, newDependency }: - stringLength oldDependency == stringLength newDependency) replacements; +{ + drv, + replacements ? [ ], +}: +let + inherit (lib) + isStorePath + substring + stringLength + optionalString + escapeShellArgs + concatMap + ; +in if replacements == [ ] then drv else - let drvName = substring 33 (stringLength (baseNameOf drv)) (baseNameOf drv); - in runCommandLocal drvName { nixStore = "${nix}/bin/nix-store"; } '' - $nixStore --dump ${drv} | sed 's|${ - baseNameOf drv - }|'$(basename $out)'|g' | sed -e ${ - concatStringsSep " -e " (map ({ oldDependency, newDependency }: - "'s|${baseNameOf oldDependency}|${baseNameOf newDependency}|g'") - replacements) - } | $nixStore --restore $out + let + drvName = + if isStorePath drv then + # Reconstruct the name from the actual store path if available. + substring 33 (stringLength (baseNameOf drv)) (baseNameOf drv) + else if drv ? drvAttrs.name then + # Try to get the name from the derivation arguments otherwise (for floating or deferred derivations). + drv.drvAttrs.name + + ( + let + outputName = drv.outputName or "out"; + in + optionalString (outputName != "out") "-${outputName}" + ) + else + throw "cannot reconstruct the derivation name from ${drv}"; + in + runCommandLocal drvName { nativeBuildInputs = [ nix.out ]; } '' + createRewriteScript() { + while [ $# -ne 0 ]; do + oldBasename="$(basename "$1")" + newBasename="$(basename "$2")" + shift 2 + if [ ''${#oldBasename} -ne ''${#newBasename} ]; then + echo "cannot rewrite $oldBasename to $newBasename: length does not match" >&2 + exit 1 + fi + echo "s|$oldBasename|$newBasename|g" >> rewrite.sed + done + } + createRewriteScript ${ + escapeShellArgs ( + [ + drv + (placeholder "out") + ] + ++ concatMap ( + { oldDependency, newDependency }: + [ + oldDependency + newDependency + ] + ) replacements + ) + } + nix-store --dump ${drv} | sed -f rewrite.sed | nix-store --restore $out '' From 6fc0699003d64e9c884eca15f162b0125020aef7 Mon Sep 17 00:00:00 2001 From: Alois Wohlschlager Date: Fri, 7 Jun 2024 18:35:36 +0200 Subject: [PATCH 62/65] replaceDependencies: show warnings as such --- pkgs/build-support/replace-dependencies.nix | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pkgs/build-support/replace-dependencies.nix b/pkgs/build-support/replace-dependencies.nix index c276b3e09e49..780ede9d019a 100644 --- a/pkgs/build-support/replace-dependencies.nix +++ b/pkgs/build-support/replace-dependencies.nix @@ -42,7 +42,6 @@ let inherit (builtins) unsafeDiscardStringContext appendContext; inherit (lib) - trace listToAttrs isStorePath readFile @@ -55,7 +54,7 @@ let inherit (lib.attrsets) mergeAttrsList; toContextlessString = x: unsafeDiscardStringContext (toString x); - warn = if verbose then trace else (x: y: y); + warn = if verbose then lib.warn else (x: y: y); referencesOf = drv: From 965289e5e07243f1cde3212d8bcaf726d36c5c46 Mon Sep 17 00:00:00 2001 From: Alois Wohlschlager Date: Fri, 7 Jun 2024 18:52:45 +0200 Subject: [PATCH 63/65] replaceDependencies: do not build unused replacements To prevent excessive build times when replacement lists are shared between partially overlapping closures, skip the build of unused replacements. Unfortunately, this also means that the replacement won't be applied any more if another replacement that is applied introduces its source. But this is a corner case, and we already show a warning, so make it clearer that handling this situation (should it ever arise) is the responsibility of the user. --- pkgs/build-support/replace-dependencies.nix | 35 +++++++++++---------- 1 file changed, 18 insertions(+), 17 deletions(-) diff --git a/pkgs/build-support/replace-dependencies.nix b/pkgs/build-support/replace-dependencies.nix index 780ede9d019a..fe325b175fe7 100644 --- a/pkgs/build-support/replace-dependencies.nix +++ b/pkgs/build-support/replace-dependencies.nix @@ -88,7 +88,6 @@ let '' ).outPath; - targetDerivations = [ drv ] ++ map ({ newDependency, ... }: newDependency) replacements; realisation = drv: if isStorePath drv then @@ -110,6 +109,24 @@ let '' ) ); + rootReferences = referencesOf drv; + relevantReplacements = filter ( + { oldDependency, newDependency }: + if toString oldDependency == toString newDependency then + warn "replaceDependencies: attempting to replace dependency ${oldDependency} of ${drv} with itself" + # Attempting to replace a dependency by itself is completely useless, and would only lead to infinite recursion. + # Hence it must not be attempted to apply this replacement in any case. + false + else if !hasAttr (realisation oldDependency) rootReferences then + warn "replaceDependencies: ${drv} does not depend on ${oldDependency}, so it will not be replaced" + # Strictly speaking, another replacement could introduce the dependency. + # However, handling this corner case would add significant complexity. + # So we just leave it to the user to apply the replacement at the correct place, but show a warning to let them know. + false + else + true + ) replacements; + targetDerivations = [ drv ] ++ map ({ newDependency, ... }: newDependency) relevantReplacements; referencesMemo = listToAttrs ( map (drv: { name = realisation drv; @@ -134,22 +151,6 @@ let }) targetDerivations ); - relevantReplacements = filter ( - { oldDependency, newDependency }: - if toString oldDependency == toString newDependency then - warn "replaceDependencies: attempting to replace dependency ${oldDependency} of ${drv} with itself" - # Attempting to replace a dependency by itself is completely useless, and would only lead to infinite recursion. - # Hence it must not be attempted to apply this replacement in any case. - false - else if !hasAttr (realisation oldDependency) referencesMemo.${realisation drv} then - warn "replaceDependencies: ${drv} does not depend on ${oldDependency}" - # Handle the corner case where one of the other replacements introduces the dependency. - # It would be more correct to not show the warning in this case, but the added complexity is probably not worth it. - true - else - true - ) replacements; - rewriteMemo = # Mind the order of how the three attrsets are merged here. # The order of precedence needs to be "explicitly specified replacements" > "rewrite exclusion (cutoffPackages)" > "rewrite". From 17e1a5cf5d6560be66cc0181ed477f18c0ff3dcf Mon Sep 17 00:00:00 2001 From: K900 Date: Tue, 24 Sep 2024 14:19:54 +0300 Subject: [PATCH 64/65] nixos/doc: add release note for DT matching changes See #341883. --- .../manual/release-notes/rl-2411.section.md | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/nixos/doc/manual/release-notes/rl-2411.section.md b/nixos/doc/manual/release-notes/rl-2411.section.md index 0d69c3c0dcef..48dc9b31b685 100644 --- a/nixos/doc/manual/release-notes/rl-2411.section.md +++ b/nixos/doc/manual/release-notes/rl-2411.section.md @@ -487,6 +487,8 @@ place. The GUI components related to the project are non-free and not packaged. +- Compatible string matching for `hardware.deviceTree.overlays` has been changed to a more correct behavior. See [below](#sec-release-24.11-migration-dto-compatible) for details. + ## Other Notable Changes {#sec-release-24.11-notable-changes} @@ -611,3 +613,22 @@ in { ]; }; ``` + +### `hardware.deviceTree.overlays` compatible string matching {#sec-release-24.11-migration-dto-compatible} + +The original compatible string implementation in older NixOS versions relied on substring matching, +which is incorrect for overlays with multiple compatible strings and other cases. + +The new behavior is consistent with what other tools already do - the overlay is considered applicable if, +and only if, _any_ of the compatible strings in the overlay match _any_ of the compatible strings in the DT. + +To provide some examples: + +| Overlay `compatible` | DT `compatible` | Pre-24.11 behavior | Correct behavior | Notes | +|----------------------|-----------------|--------------------|------------------|--------------------------------------------| +| `"foo"` | `"foo", "bar"` | match | match | Most common use case does not change | +| `"foo"` | `"foobar"` | match | no match | Substrings should not be matched | +| `"foo bar"` | `"foo", "bar"` | match | no match | Separators should not be matched to spaces | +| `"foo", "bar"` | `"baz", "bar"` | no match | match | One compatible string matching is enough | + +Note that this also allows writing overlays that explicitly apply to multiple boards. From 14c922afe07d3488cdcc5759d6a23c39dfe7cc02 Mon Sep 17 00:00:00 2001 From: Konrad Malik Date: Tue, 27 Aug 2024 17:57:27 +0200 Subject: [PATCH 65/65] openapi-python-client: init at 0.21.5 --- .../op/openapi-python-client/package.nix | 79 +++++++++++++++++++ 1 file changed, 79 insertions(+) create mode 100644 pkgs/by-name/op/openapi-python-client/package.nix diff --git a/pkgs/by-name/op/openapi-python-client/package.nix b/pkgs/by-name/op/openapi-python-client/package.nix new file mode 100644 index 000000000000..550fca6c7abb --- /dev/null +++ b/pkgs/by-name/op/openapi-python-client/package.nix @@ -0,0 +1,79 @@ +{ + lib, + stdenv, + darwin, + python3Packages, + fetchFromGitHub, + installShellFiles, + ruff, + testers, + openapi-python-client, +}: + +python3Packages.buildPythonApplication rec { + pname = "openapi-python-client"; + version = "0.21.5"; + pyproject = true; + + src = fetchFromGitHub { + inherit version; + owner = "openapi-generators"; + repo = "openapi-python-client"; + rev = "refs/tags/v${version}"; + hash = "sha256-/m/XXNqsr0FjYSEGMSw4zIUpWJDOqu9BzNuJKyb7fKY="; + }; + + nativeBuildInputs = + [ + installShellFiles + ] + ++ lib.optionals stdenv.isDarwin [ + darwin.ps + ]; + + build-system = with python3Packages; [ + hatchling + ]; + + dependencies = + (with python3Packages; [ + attrs + httpx + jinja2 + pydantic + python-dateutil + ruamel-yaml + shellingham + typer + typing-extensions + ]) + ++ [ ruff ]; + + # ruff is not packaged as a python module in nixpkgs + pythonRemoveDeps = [ "ruff" ]; + + postInstall = '' + # see: https://github.com/fastapi/typer/blob/5889cf82f4ed925f92e6b0750bf1b1ed9ee672f3/typer/completion.py#L54 + # otherwise shellingham throws exception on darwin + export _TYPER_COMPLETE_TEST_DISABLE_SHELL_DETECTION=1 + installShellCompletion --cmd openapi-python-client \ + --bash <($out/bin/openapi-python-client --show-completion bash) \ + --fish <($out/bin/openapi-python-client --show-completion fish) \ + --zsh <($out/bin/openapi-python-client --show-completion zsh) + ''; + + passthru = { + tests.version = testers.testVersion { + package = openapi-python-client; + }; + }; + + meta = { + description = "Generate modern Python clients from OpenAPI"; + homepage = "https://github.com/openapi-generators/openapi-python-client"; + changelog = "https://github.com/openapi-generators/openapi-python-client/releases/tag/v${version}"; + license = lib.licenses.mit; + mainProgram = "openapi-python-client"; + maintainers = with lib.maintainers; [ konradmalik ]; + }; +}