From 757207f233f8b1f63b9439d84078930008ff8283 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Wed, 5 Jun 2024 11:50:35 +0000 Subject: [PATCH 01/15] eksctl: 0.179.0 -> 0.181.0 --- pkgs/by-name/ek/eksctl/package.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/by-name/ek/eksctl/package.nix b/pkgs/by-name/ek/eksctl/package.nix index 7308d66cd6c9..74eee59654ce 100644 --- a/pkgs/by-name/ek/eksctl/package.nix +++ b/pkgs/by-name/ek/eksctl/package.nix @@ -6,16 +6,16 @@ buildGoModule rec { pname = "eksctl"; - version = "0.179.0"; + version = "0.181.0"; src = fetchFromGitHub { owner = "weaveworks"; repo = pname; rev = version; - hash = "sha256-WDiuk/fmoGsfbs2l3TBDIugU3HBo6V0W4MDcVYJfaxs="; + hash = "sha256-3VTMkWDahIMrOO05ZI0f/sbyZagwbVVD/fu9z4JRPZw="; }; - vendorHash = "sha256-M/OiHXsvPAaYVNw7Q9LiDbH7B7QhBQxmK0H8TNWcu74="; + vendorHash = "sha256-eaEAC1jDmApcyn0RC5pvonYVWblRCB2PFTr/K5rZvtU="; doCheck = false; From 83d10630eace28f5248978d428488857a240b6c3 Mon Sep 17 00:00:00 2001 From: Alyssa Ross Date: Wed, 5 Jun 2024 12:50:45 +0100 Subject: [PATCH 02/15] weston: 13.0.1 -> 13.0.2 --- pkgs/applications/window-managers/weston/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/window-managers/weston/default.nix b/pkgs/applications/window-managers/weston/default.nix index a4e36c18368e..8bca4417f256 100644 --- a/pkgs/applications/window-managers/weston/default.nix +++ b/pkgs/applications/window-managers/weston/default.nix @@ -19,11 +19,11 @@ stdenv.mkDerivation rec { pname = "weston"; - version = "13.0.1"; + version = "13.0.2"; src = fetchurl { url = "https://gitlab.freedesktop.org/wayland/weston/-/releases/${version}/downloads/weston-${version}.tar.xz"; - hash = "sha256-6hVmq09f/Ofp/U96H8pbMMquTVACO/RZITmUCU4Cspo="; + hash = "sha256-T+EUAfVe3Dp7Z1/RwJ8VmGAWL6p9PJegpNaCOzHu0Qw="; }; postPatch = '' From 2c2f1d042f35d6c22df4fcdef793d22a2ac1da62 Mon Sep 17 00:00:00 2001 From: Daniel Baker Date: Wed, 5 Jun 2024 13:24:14 -0700 Subject: [PATCH 03/15] Fix the update script so it points at the new nixos/nixfmt repo and bump to the lasest version on master. --- pkgs/by-name/ni/nixfmt-rfc-style/date.txt | 2 +- .../ni/nixfmt-rfc-style/generated-package.nix | 15 ++++++++------- pkgs/by-name/ni/nixfmt-rfc-style/package.nix | 7 ------- pkgs/by-name/ni/nixfmt-rfc-style/update.sh | 6 +++--- 4 files changed, 12 insertions(+), 18 deletions(-) diff --git a/pkgs/by-name/ni/nixfmt-rfc-style/date.txt b/pkgs/by-name/ni/nixfmt-rfc-style/date.txt index f4f1f2ef867e..c494f5c70a47 100644 --- a/pkgs/by-name/ni/nixfmt-rfc-style/date.txt +++ b/pkgs/by-name/ni/nixfmt-rfc-style/date.txt @@ -1 +1 @@ -2024-03-01 +2024-05-28 diff --git a/pkgs/by-name/ni/nixfmt-rfc-style/generated-package.nix b/pkgs/by-name/ni/nixfmt-rfc-style/generated-package.nix index 738b3e53c872..e1e8f89df13d 100644 --- a/pkgs/by-name/ni/nixfmt-rfc-style/generated-package.nix +++ b/pkgs/by-name/ni/nixfmt-rfc-style/generated-package.nix @@ -1,26 +1,27 @@ # This file has been autogenerate with cabal2nix. # Update via ./update.sh { mkDerivation, base, cmdargs, directory, fetchzip, filepath, lib -, megaparsec, mtl, parser-combinators, safe-exceptions, scientific -, text, transformers, unix +, megaparsec, mtl, parser-combinators, pretty-simple +, safe-exceptions, scientific, text, transformers, unix }: mkDerivation { pname = "nixfmt"; - version = "0.5.0"; + version = "0.6.0"; src = fetchzip { - url = "https://github.com/piegamesde/nixfmt/archive/2b5ee820690bae64cb4003e46917ae43541e3e0b.tar.gz"; - sha256 = "1i1jbc1q4gd7fpilwy6s3a583yl5l8d8rlmipygj61mpclg9ihqg"; + url = "https://github.com/nixos/nixfmt/archive/c67a7b65906bd2432730929bd0e4957659c95b8e.tar.gz"; + sha256 = "03f00vwlla6i3m125389h3xjsl5xm07630ahm4w5gqwq1007y3r2"; }; isLibrary = true; isExecutable = true; libraryHaskellDepends = [ - base megaparsec mtl parser-combinators scientific text transformers + base megaparsec mtl parser-combinators pretty-simple scientific + text transformers ]; executableHaskellDepends = [ base cmdargs directory filepath safe-exceptions text unix ]; jailbreak = true; - homepage = "https://github.com/serokell/nixfmt"; + homepage = "https://github.com/NixOS/nixfmt"; description = "An opinionated formatter for Nix"; license = lib.licenses.mpl20; mainProgram = "nixfmt"; diff --git a/pkgs/by-name/ni/nixfmt-rfc-style/package.nix b/pkgs/by-name/ni/nixfmt-rfc-style/package.nix index 90e6dbf2e25d..bf1c093051d5 100644 --- a/pkgs/by-name/ni/nixfmt-rfc-style/package.nix +++ b/pkgs/by-name/ni/nixfmt-rfc-style/package.nix @@ -14,13 +14,6 @@ let passthru.updateScript = ./update.sh; - patches = [ - (fetchpatch { - url = "https://github.com/serokell/nixfmt/commit/ca9c8975ed671112fdfce94f2e9e2ad3de480c9a.patch"; - hash = "sha256-UOSAYahSKBsqPMVcQJ3H26Eg2xpPAsNOjYMI6g+WTYU="; - }) - ]; - maintainers = lib.teams.formatter.members; # These tests can be run with the following command. diff --git a/pkgs/by-name/ni/nixfmt-rfc-style/update.sh b/pkgs/by-name/ni/nixfmt-rfc-style/update.sh index c70a6e88e788..9213c7396452 100755 --- a/pkgs/by-name/ni/nixfmt-rfc-style/update.sh +++ b/pkgs/by-name/ni/nixfmt-rfc-style/update.sh @@ -13,8 +13,8 @@ derivation_file="${script_dir}/generated-package.nix" date_file="${script_dir}/date.txt" # This is the latest version of nixfmt-rfc-style branch on GitHub. -new_version=$(curl --silent https://api.github.com/repos/piegamesde/nixfmt/git/refs/heads/rfc101-style | jq '.object.sha' --raw-output) -new_date=$(curl --silent https://api.github.com/repos/piegamesde/nixfmt/git/commits/"$new_version" | jq '.committer.date' --raw-output) +new_version=$(curl --silent https://api.github.com/repos/nixos/nixfmt/git/refs/heads/master | jq '.object.sha' --raw-output) +new_date=$(curl --silent https://api.github.com/repos/nixos/nixfmt/git/commits/"$new_version" | jq '.committer.date' --raw-output) echo "Updating nixfmt-rfc-style to version $new_date." echo "Running cabal2nix and outputting to ${derivation_file}..." @@ -25,7 +25,7 @@ cat > "$derivation_file" << EOF EOF cabal2nix --jailbreak \ - "https://github.com/piegamesde/nixfmt/archive/${new_version}.tar.gz" \ + "https://github.com/nixos/nixfmt/archive/${new_version}.tar.gz" \ >> "$derivation_file" date --date="$new_date" -I > "$date_file" From a66c6da272d765da0828ecd7757a4855e56c18df Mon Sep 17 00:00:00 2001 From: Gaetan Lepage Date: Wed, 5 Jun 2024 23:29:11 +0200 Subject: [PATCH 04/15] ruff: 0.4.7 -> 0.4.8 Diff: https://github.com/astral-sh/ruff/compare/refs/tags/v0.4.7...v0.4.8 Changelog: https://github.com/astral-sh/ruff/releases/tag/v0.4.8 --- pkgs/development/tools/ruff/Cargo.lock | 119 +++++++++--------------- pkgs/development/tools/ruff/default.nix | 4 +- 2 files changed, 45 insertions(+), 78 deletions(-) diff --git a/pkgs/development/tools/ruff/Cargo.lock b/pkgs/development/tools/ruff/Cargo.lock index 1ee4a7ef6bc2..162ca379af1a 100644 --- a/pkgs/development/tools/ruff/Cargo.lock +++ b/pkgs/development/tools/ruff/Cargo.lock @@ -350,7 +350,7 @@ version = "4.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "528131438037fd55894f62d6e9f068b8f45ac57ffa77517819645d10aed04f64" dependencies = [ - "heck 0.5.0", + "heck", "proc-macro2", "quote", "syn", @@ -868,12 +868,6 @@ dependencies = [ "allocator-api2", ] -[[package]] -name = "heck" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" - [[package]] name = "heck" version = "0.5.0" @@ -1029,9 +1023,9 @@ dependencies = [ [[package]] name = "insta" -version = "1.38.0" +version = "1.39.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3eab73f58e59ca6526037208f0e98851159ec1633cf17b6cd2e1f2c3fd5d53cc" +checksum = "810ae6042d48e2c9e9215043563a58a80b877bc863228a74cf10c49d4620a6f5" dependencies = [ "console", "globset", @@ -1116,9 +1110,9 @@ dependencies = [ [[package]] name = "itertools" -version = "0.12.1" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569" +checksum = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186" dependencies = [ "either", ] @@ -1178,9 +1172,9 @@ checksum = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c" [[package]] name = "libcst" -version = "1.3.1" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f1e25d1b119ab5c2f15a6e081bb94a8d547c5c2ad065f5fd0dbb683f31ced91" +checksum = "10293a04a48e8b0cb2cc825a93b83090e527bffd3c897a0255ad7bc96079e920" dependencies = [ "chic", "libcst_derive", @@ -1193,9 +1187,9 @@ dependencies = [ [[package]] name = "libcst_derive" -version = "1.3.1" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a5011f2d59093de14a4a90e01b9d85dee9276e58a25f0107dcee167dd601be0" +checksum = "a2ae40017ac09cd2c6a53504cb3c871c7f2b41466eac5bc66ba63f39073b467b" dependencies = [ "quote", "syn", @@ -1404,9 +1398,9 @@ dependencies = [ [[package]] name = "nu-ansi-term" -version = "0.49.0" +version = "0.50.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c073d3c1930d0751774acf49e66653acecb416c3a54c6ec095a9b11caddb5a68" +checksum = "dd2800e1520bdc966782168a627aa5d1ad92e33b984bf7c7615d31280c83ff14" dependencies = [ "windows-sys 0.48.0", ] @@ -1670,9 +1664,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.84" +version = "1.0.85" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec96c6a92621310b51366f1e28d05ef11489516e93be030060e5fc12024a49d6" +checksum = "22244ce15aa966053a896d1accb3a6e68469b97c7f33f284b99f0d576879fc23" dependencies = [ "unicode-ident", ] @@ -1795,7 +1789,6 @@ dependencies = [ "rustc-hash", "smol_str", "tempfile", - "textwrap", "tracing", "tracing-subscriber", "tracing-tree", @@ -1903,7 +1896,7 @@ dependencies = [ [[package]] name = "ruff" -version = "0.4.7" +version = "0.4.8" dependencies = [ "anyhow", "argfile", @@ -1920,7 +1913,7 @@ dependencies = [ "insta", "insta-cmd", "is-macro", - "itertools 0.12.1", + "itertools 0.13.0", "log", "mimalloc", "notify", @@ -1966,7 +1959,6 @@ dependencies = [ "ruff_linter", "ruff_python_ast", "ruff_python_formatter", - "ruff_python_index", "ruff_python_parser", "serde", "serde_json", @@ -1982,7 +1974,7 @@ dependencies = [ "filetime", "glob", "globset", - "itertools 0.12.1", + "itertools 0.13.0", "regex", "ruff_macros", "seahash", @@ -1998,7 +1990,7 @@ dependencies = [ "imara-diff", "indicatif", "indoc", - "itertools 0.12.1", + "itertools 0.13.0", "libcst", "pretty_assertions", "rayon", @@ -2014,6 +2006,7 @@ dependencies = [ "ruff_python_parser", "ruff_python_stdlib", "ruff_python_trivia", + "ruff_text_size", "ruff_workspace", "schemars", "serde", @@ -2064,7 +2057,7 @@ dependencies = [ [[package]] name = "ruff_linter" -version = "0.4.7" +version = "0.4.8" dependencies = [ "aho-corasick", "annotate-snippets 0.9.2", @@ -2080,7 +2073,7 @@ dependencies = [ "insta", "is-macro", "is-wsl", - "itertools 0.12.1", + "itertools 0.13.0", "libcst", "log", "memchr", @@ -2128,7 +2121,7 @@ dependencies = [ name = "ruff_macros" version = "0.0.0" dependencies = [ - "itertools 0.12.1", + "itertools 0.13.0", "proc-macro2", "quote", "ruff_python_trivia", @@ -2140,7 +2133,7 @@ name = "ruff_notebook" version = "0.0.0" dependencies = [ "anyhow", - "itertools 0.12.1", + "itertools 0.13.0", "once_cell", "rand", "ruff_diagnostics", @@ -2161,7 +2154,7 @@ dependencies = [ "aho-corasick", "bitflags 2.5.0", "is-macro", - "itertools 0.12.1", + "itertools 0.13.0", "once_cell", "ruff_python_trivia", "ruff_source_file", @@ -2190,6 +2183,7 @@ dependencies = [ "ruff_python_literal", "ruff_python_parser", "ruff_source_file", + "ruff_text_size", ] [[package]] @@ -2200,7 +2194,7 @@ dependencies = [ "clap", "countme", "insta", - "itertools 0.12.1", + "itertools 0.13.0", "memchr", "once_cell", "regex", @@ -2208,7 +2202,6 @@ dependencies = [ "ruff_formatter", "ruff_macros", "ruff_python_ast", - "ruff_python_index", "ruff_python_parser", "ruff_python_trivia", "ruff_source_file", @@ -2241,7 +2234,7 @@ name = "ruff_python_literal" version = "0.0.0" dependencies = [ "bitflags 2.5.0", - "itertools 0.12.1", + "itertools 0.13.0", "ruff_python_ast", "unic-ucd-category", ] @@ -2255,10 +2248,9 @@ dependencies = [ "bitflags 2.5.0", "bstr", "insta", - "is-macro", - "itertools 0.12.1", "memchr", "ruff_python_ast", + "ruff_python_trivia", "ruff_source_file", "ruff_text_size", "rustc-hash", @@ -2305,7 +2297,7 @@ dependencies = [ name = "ruff_python_trivia" version = "0.0.0" dependencies = [ - "itertools 0.12.1", + "itertools 0.13.0", "ruff_source_file", "ruff_text_size", "unicode-ident", @@ -2316,7 +2308,6 @@ name = "ruff_python_trivia_integration_tests" version = "0.0.0" dependencies = [ "insta", - "ruff_python_index", "ruff_python_parser", "ruff_python_trivia", "ruff_source_file", @@ -2391,7 +2382,6 @@ dependencies = [ "ruff_python_formatter", "ruff_python_index", "ruff_python_parser", - "ruff_python_trivia", "ruff_source_file", "ruff_text_size", "ruff_workspace", @@ -2412,7 +2402,7 @@ dependencies = [ "globset", "ignore", "is-macro", - "itertools 0.12.1", + "itertools 0.13.0", "log", "matchit", "path-absolutize", @@ -2624,9 +2614,9 @@ 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", ] @@ -2699,12 +2689,6 @@ version = "1.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" -[[package]] -name = "smawk" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7c388c1b5e93756d0c740965c41e8822f866621d41acbdf6336a6a168f8840c" - [[package]] name = "smol_str" version = "0.2.2" @@ -2758,11 +2742,11 @@ dependencies = [ [[package]] name = "strum_macros" -version = "0.26.2" +version = "0.26.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6cf59daf282c0a494ba14fd21610a0325f9f90ec9d1231dea26bcb1d696c946" +checksum = "f7993a8e3a9e88a00351486baae9522c91b123a088f76469e5bd5cc17198ea87" dependencies = [ - "heck 0.4.1", + "heck", "proc-macro2", "quote", "rustversion", @@ -2854,17 +2838,6 @@ dependencies = [ "test-case-core", ] -[[package]] -name = "textwrap" -version = "0.16.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23d434d3f8967a09480fb04132ebe0a3e088c173e6d0ee7897abbdf4eab0f8b9" -dependencies = [ - "smawk", - "unicode-linebreak", - "unicode-width", -] - [[package]] name = "thiserror" version = "1.0.61" @@ -2942,9 +2915,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "toml" -version = "0.8.12" +version = "0.8.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9dd1545e8208b4a5af1aa9bbd0b4cf7e9ea08fabc5d0a5c67fcaafa17433aa3" +checksum = "a4e43f8cc456c9704c851ae29c67e17ef65d2c30017c17a9765b89c382dc8bba" dependencies = [ "serde", "serde_spanned", @@ -2954,18 +2927,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.22.12" +version = "0.22.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3328d4f68a705b2a4498da1d580585d39a6510f98318a2cec3018a7ec61ddef" +checksum = "c127785850e8c20836d49732ae6abfa47616e60bf9d9f57c43c250361a9db96c" dependencies = [ "indexmap", "serde", @@ -3050,11 +3023,11 @@ dependencies = [ [[package]] name = "tracing-tree" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "65139ecd2c3f6484c3b99bc01c77afe21e95473630747c7aca525e78b0666675" +checksum = "b56c62d2c80033cb36fae448730a2f2ef99410fe3ecbffc916681a32f6807dbe" dependencies = [ - "nu-ansi-term 0.49.0", + "nu-ansi-term 0.50.0", "tracing-core", "tracing-log", "tracing-subscriber", @@ -3120,12 +3093,6 @@ version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" -[[package]] -name = "unicode-linebreak" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b09c83c3c29d37506a3e260c08c03743a6bb66a9cd432c6934ab501a190571f" - [[package]] name = "unicode-normalization" version = "0.1.23" diff --git a/pkgs/development/tools/ruff/default.nix b/pkgs/development/tools/ruff/default.nix index 25ed93f4ba6c..89e67e5f00a6 100644 --- a/pkgs/development/tools/ruff/default.nix +++ b/pkgs/development/tools/ruff/default.nix @@ -10,13 +10,13 @@ rustPlatform.buildRustPackage rec { pname = "ruff"; - version = "0.4.7"; + version = "0.4.8"; src = fetchFromGitHub { owner = "astral-sh"; repo = "ruff"; rev = "refs/tags/v${version}"; - hash = "sha256-1WQQpIdGFWEq6HzFFA5qRC3wnqtUvdzC/6VIkDY1pZI="; + hash = "sha256-XuAJ65R80+IntWBGikG1cxAH8Tr3mnwQvSxeKFQj2ac="; }; cargoLock = { From 528be480b3d394d1faf3726fd25619b51b1f0887 Mon Sep 17 00:00:00 2001 From: Gaetan Lepage Date: Wed, 5 Jun 2024 23:32:48 +0200 Subject: [PATCH 05/15] protobuf_27: 27.0 -> 27.1 Changelog: https://github.com/protocolbuffers/protobuf/releases/tag/v27.1 --- pkgs/development/libraries/protobuf/27.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/protobuf/27.nix b/pkgs/development/libraries/protobuf/27.nix index 8b80ad681c1c..0f256c5c783a 100644 --- a/pkgs/development/libraries/protobuf/27.nix +++ b/pkgs/development/libraries/protobuf/27.nix @@ -1,6 +1,6 @@ { callPackage, ... } @ args: callPackage ./generic.nix ({ - version = "27.0"; - hash = "sha256-QVgDGyNTCSYU/rXTMcHUefUGVjwkkjnpq0Kq+eXK/bo="; + version = "27.1"; + hash = "sha256-9XOcjNm4k4VhQ/XagcVO2tXxp6bBdyuvrS7sNGy4wG0="; } // args) From b5331032eb63a6c84ad938fc10211b2e31da1f39 Mon Sep 17 00:00:00 2001 From: Jono Chang Date: Wed, 5 Jun 2024 16:50:26 +1000 Subject: [PATCH 06/15] llama-cpp: 3070 -> 3089 Diff: https://github.com/ggerganov/llama.cpp/compare/b3070..b3089 Changelog: https://github.com/ggerganov/llama.cpp/releases/tag/b3089 --- pkgs/by-name/ll/llama-cpp/package.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/by-name/ll/llama-cpp/package.nix b/pkgs/by-name/ll/llama-cpp/package.nix index 38e3dd192f0b..4df9edcfced7 100644 --- a/pkgs/by-name/ll/llama-cpp/package.nix +++ b/pkgs/by-name/ll/llama-cpp/package.nix @@ -71,13 +71,13 @@ let in effectiveStdenv.mkDerivation (finalAttrs: { pname = "llama-cpp"; - version = "3070"; + version = "3089"; src = fetchFromGitHub { owner = "ggerganov"; repo = "llama.cpp"; rev = "refs/tags/b${finalAttrs.version}"; - hash = "sha256-3PJ3YBFMSv2bFHkcDpOAZ/ZbuKEGjyfeLI7oavDbfBc="; + hash = "sha256-bI1qSO0f+Uf7svcxAKt1g8fEXjJlMcJWO6zhMkjDGPA="; leaveDotGit = true; postFetch = '' git -C "$out" rev-parse --short HEAD > $out/COMMIT From f244c9cef0037d0187edd31b30cc2a36eed10a95 Mon Sep 17 00:00:00 2001 From: Gaetan Lepage Date: Thu, 6 Jun 2024 00:21:40 +0200 Subject: [PATCH 07/15] python311Packages.nbmake: 1.5.3 -> 1.5.4 Diff: https://github.com/treebeardtech/nbmake/compare/refs/tags/v1.5.3...v1.5.4 Changelog: https://github.com/treebeardtech/nbmake/releases/tag/v1.5.4 --- pkgs/development/python-modules/nbmake/default.nix | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pkgs/development/python-modules/nbmake/default.nix b/pkgs/development/python-modules/nbmake/default.nix index be7d9d628cac..bb050d9b89af 100644 --- a/pkgs/development/python-modules/nbmake/default.nix +++ b/pkgs/development/python-modules/nbmake/default.nix @@ -20,7 +20,7 @@ buildPythonPackage rec { pname = "nbmake"; - version = "1.5.3"; + version = "1.5.4"; pyproject = true; disabled = pythonOlder "3.8"; @@ -29,7 +29,7 @@ buildPythonPackage rec { owner = "treebeardtech"; repo = "nbmake"; rev = "refs/tags/v${version}"; - hash = "sha256-sX0YqyBchLlo0QPIpLvl11/gwoiZknG5rBDzmQKiXhs="; + hash = "sha256-OzjqpipFb5COhqc//Sg6OU65ShPrYe/KtxifToEXveg="; }; build-system = [ @@ -60,11 +60,11 @@ buildPythonPackage rec { __darwinAllowLocalNetworking = true; - meta = with lib; { + meta = { description = "Pytest plugin for testing notebooks"; homepage = "https://github.com/treebeardtech/nbmake"; changelog = "https://github.com/treebeardtech/nbmake/releases/tag/v${version}"; - license = licenses.asl20; - maintainers = with maintainers; [ GaetanLepage ]; + license = lib.licenses.asl20; + maintainers = with lib.maintainers; [ GaetanLepage ]; }; } From ab897a8c62a08d0a2aee7430825807af350b3c9c Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Thu, 6 Jun 2024 00:49:35 +0200 Subject: [PATCH 08/15] nixos/test-driver: fix return value of subtest function Mypy since version 1.10.0 complains about this: > test_driver/driver.py:109: error: No return value expected [return-value] --- nixos/lib/test-driver/test_driver/driver.py | 1 - 1 file changed, 1 deletion(-) diff --git a/nixos/lib/test-driver/test_driver/driver.py b/nixos/lib/test-driver/test_driver/driver.py index 10092fc966c8..01b64b92e977 100644 --- a/nixos/lib/test-driver/test_driver/driver.py +++ b/nixos/lib/test-driver/test_driver/driver.py @@ -106,7 +106,6 @@ class Driver: with self.logger.subtest(name): try: yield - return True except Exception as e: self.logger.error(f'Test "{name}" failed with error: "{e}"') raise e From 6791c1a7178d00be55532c0e07a2d5311521fba1 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Thu, 6 Jun 2024 01:04:34 +0200 Subject: [PATCH 09/15] python312Packages.mypy: run nixos-test-driver test in passthru Failing typing checks on the test-driver result in channel blockers. --- pkgs/development/python-modules/mypy/default.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkgs/development/python-modules/mypy/default.nix b/pkgs/development/python-modules/mypy/default.nix index b81f46a10808..5dad7136d271 100644 --- a/pkgs/development/python-modules/mypy/default.nix +++ b/pkgs/development/python-modules/mypy/default.nix @@ -26,6 +26,7 @@ filelock, pytest-xdist, pytestCheckHook, + nixosTests, }: buildPythonPackage rec { @@ -118,6 +119,10 @@ buildPythonPackage rec { "mypyc/test/test_run.py" ]; + passthru.tests = { + inherit (nixosTests) nixos-test-driver; + }; + meta = with lib; { description = "Optional static typing for Python"; homepage = "https://www.mypy-lang.org"; From 00c515de371e2b84ae8323630cfc15f3641939cb Mon Sep 17 00:00:00 2001 From: Jonathan Davies Date: Sun, 2 Jun 2024 12:21:06 +0100 Subject: [PATCH 10/15] =?UTF-8?q?quickwit:=200.8.0=20=E2=86=92=200.8.1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkgs/servers/search/quickwit/Cargo.lock | 60 ++++++++++++------------ pkgs/servers/search/quickwit/default.nix | 7 +-- 2 files changed, 34 insertions(+), 33 deletions(-) diff --git a/pkgs/servers/search/quickwit/Cargo.lock b/pkgs/servers/search/quickwit/Cargo.lock index 6de7a8e9c644..5888255d9182 100644 --- a/pkgs/servers/search/quickwit/Cargo.lock +++ b/pkgs/servers/search/quickwit/Cargo.lock @@ -1240,7 +1240,7 @@ dependencies = [ [[package]] name = "chitchat" version = "0.8.0" -source = "git+https://github.com/quickwit-oss/chitchat.git?rev=f783620#f78362008b4b5522181c77e830f585c9d9e8b799" +source = "git+https://github.com/quickwit-oss/chitchat.git?rev=d039699#d03969982e1c199aa05cb8e4f86d8d83118057ff" dependencies = [ "anyhow", "async-trait", @@ -5441,7 +5441,7 @@ dependencies = [ [[package]] name = "quickwit-actors" -version = "0.8.0" +version = "0.8.1" dependencies = [ "anyhow", "async-trait", @@ -5461,7 +5461,7 @@ dependencies = [ [[package]] name = "quickwit-aws" -version = "0.8.0" +version = "0.8.1" dependencies = [ "async-trait", "aws-config", @@ -5483,7 +5483,7 @@ dependencies = [ [[package]] name = "quickwit-cli" -version = "0.8.0" +version = "0.8.1" dependencies = [ "anyhow", "async-trait", @@ -5541,7 +5541,7 @@ dependencies = [ [[package]] name = "quickwit-cluster" -version = "0.8.0" +version = "0.8.1" dependencies = [ "anyhow", "async-trait", @@ -5570,7 +5570,7 @@ dependencies = [ [[package]] name = "quickwit-codegen" -version = "0.8.0" +version = "0.8.1" dependencies = [ "anyhow", "futures", @@ -5587,7 +5587,7 @@ dependencies = [ [[package]] name = "quickwit-codegen-example" -version = "0.8.0" +version = "0.8.1" dependencies = [ "anyhow", "async-trait", @@ -5614,7 +5614,7 @@ dependencies = [ [[package]] name = "quickwit-common" -version = "0.8.0" +version = "0.8.1" dependencies = [ "anyhow", "async-speed-limit", @@ -5652,7 +5652,7 @@ dependencies = [ [[package]] name = "quickwit-config" -version = "0.8.0" +version = "0.8.1" dependencies = [ "anyhow", "bytes", @@ -5686,7 +5686,7 @@ dependencies = [ [[package]] name = "quickwit-control-plane" -version = "0.8.0" +version = "0.8.1" dependencies = [ "anyhow", "async-trait", @@ -5724,7 +5724,7 @@ dependencies = [ [[package]] name = "quickwit-datetime" -version = "0.8.0" +version = "0.8.1" dependencies = [ "anyhow", "itertools 0.12.1", @@ -5738,7 +5738,7 @@ dependencies = [ [[package]] name = "quickwit-directories" -version = "0.8.0" +version = "0.8.1" dependencies = [ "anyhow", "async-trait", @@ -5759,7 +5759,7 @@ dependencies = [ [[package]] name = "quickwit-doc-mapper" -version = "0.8.0" +version = "0.8.1" dependencies = [ "anyhow", "base64 0.21.7", @@ -5794,7 +5794,7 @@ dependencies = [ [[package]] name = "quickwit-index-management" -version = "0.8.0" +version = "0.8.1" dependencies = [ "anyhow", "async-trait", @@ -5826,7 +5826,7 @@ dependencies = [ [[package]] name = "quickwit-indexing" -version = "0.8.0" +version = "0.8.1" dependencies = [ "anyhow", "arc-swap", @@ -5891,7 +5891,7 @@ dependencies = [ [[package]] name = "quickwit-ingest" -version = "0.8.0" +version = "0.8.1" dependencies = [ "anyhow", "async-trait", @@ -5931,7 +5931,7 @@ dependencies = [ [[package]] name = "quickwit-integration-tests" -version = "0.8.0" +version = "0.8.1" dependencies = [ "anyhow", "bytes", @@ -5964,7 +5964,7 @@ dependencies = [ [[package]] name = "quickwit-jaeger" -version = "0.8.0" +version = "0.8.1" dependencies = [ "anyhow", "async-trait", @@ -5998,7 +5998,7 @@ dependencies = [ [[package]] name = "quickwit-janitor" -version = "0.8.0" +version = "0.8.1" dependencies = [ "anyhow", "async-trait", @@ -6035,7 +6035,7 @@ dependencies = [ [[package]] name = "quickwit-lambda" -version = "0.8.0" +version = "0.8.1" dependencies = [ "anyhow", "aws_lambda_events", @@ -6075,7 +6075,7 @@ dependencies = [ [[package]] name = "quickwit-macros" -version = "0.8.0" +version = "0.8.1" dependencies = [ "proc-macro2", "quote", @@ -6084,7 +6084,7 @@ dependencies = [ [[package]] name = "quickwit-metastore" -version = "0.8.0" +version = "0.8.1" dependencies = [ "anyhow", "async-trait", @@ -6127,7 +6127,7 @@ dependencies = [ [[package]] name = "quickwit-opentelemetry" -version = "0.8.0" +version = "0.8.1" dependencies = [ "anyhow", "async-trait", @@ -6151,7 +6151,7 @@ dependencies = [ [[package]] name = "quickwit-proto" -version = "0.8.0" +version = "0.8.1" dependencies = [ "anyhow", "async-trait", @@ -6188,7 +6188,7 @@ dependencies = [ [[package]] name = "quickwit-query" -version = "0.8.0" +version = "0.8.1" dependencies = [ "anyhow", "base64 0.21.7", @@ -6214,7 +6214,7 @@ dependencies = [ [[package]] name = "quickwit-rest-client" -version = "0.8.0" +version = "0.8.1" dependencies = [ "anyhow", "bytes", @@ -6238,7 +6238,7 @@ dependencies = [ [[package]] name = "quickwit-search" -version = "0.8.0" +version = "0.8.1" dependencies = [ "anyhow", "assert-json-diff 2.0.2", @@ -6290,7 +6290,7 @@ dependencies = [ [[package]] name = "quickwit-serve" -version = "0.8.0" +version = "0.8.1" dependencies = [ "anyhow", "assert-json-diff 2.0.2", @@ -6359,7 +6359,7 @@ dependencies = [ [[package]] name = "quickwit-storage" -version = "0.8.0" +version = "0.8.1" dependencies = [ "anyhow", "async-trait", @@ -6407,7 +6407,7 @@ dependencies = [ [[package]] name = "quickwit-telemetry" -version = "0.8.0" +version = "0.8.1" dependencies = [ "async-trait", "encoding_rs", diff --git a/pkgs/servers/search/quickwit/default.nix b/pkgs/servers/search/quickwit/default.nix index 5e205b40bac5..39cf1b7c1548 100644 --- a/pkgs/servers/search/quickwit/default.nix +++ b/pkgs/servers/search/quickwit/default.nix @@ -10,7 +10,7 @@ let pname = "quickwit"; - version = "0.8.0"; + version = "0.8.1"; in rustPlatform.buildRustPackage rec { inherit pname version; @@ -19,7 +19,7 @@ rustPlatform.buildRustPackage rec { owner = "quickwit-oss"; repo = pname; rev = "v${version}"; - hash = "sha256-FZVGQfDuQYIdRnCsBZvXeLbJBdcLugZeHNm+kf6L9SY="; + hash = "sha256-B5U9nzXh6kj3/UnQzM3//h4hn9ippWHbeDMcMTP9XfM="; }; postPatch = '' @@ -40,7 +40,7 @@ rustPlatform.buildRustPackage rec { cargoLock = { lockFile = ./Cargo.lock; outputHashes = { - "chitchat-0.8.0" = "sha256-cjwKaBXoztYUXgnJvtFH+OSQU6tl2U3zKFWX324+9wo="; + "chitchat-0.8.0" = "sha256-6K2noPoFaDnOxQIEV1WbmVPfRGwlI/WS1OWSBH2qb1Q="; "mrecordlog-0.4.0" = "sha256-9LIVs+BqK9FLSfHL3vm9LL+/FXIXJ6v617QLv4luQik="; "ownedbytes-0.6.0" = "sha256-in18/NYYIgUiZ9sm8NgJlebWidRp34DR7AhOD1Nh0aw="; "pulsar-5.0.2" = "sha256-j7wpsAro6x4fk3pvSL4fxLkddJFq8duZ7jDj0Edf3YQ="; @@ -72,6 +72,7 @@ rustPlatform.buildRustPackage rec { "--skip=object_storage::s3_compatible_storage::tests::test_s3_compatible_storage_relative_path" # flaky test "--skip=actors::indexer::tests::test_indexer_triggers_commit_on_drained_mailbox" + "--skip=actors::indexer::tests::test_indexer_triggers_commit_on_timeout" "--skip=actors::indexer::tests::test_indexer_partitioning" "--skip=actors::indexing_pipeline::tests::test_merge_pipeline_does_not_stop_on_indexing_pipeline_failure" "--skip=actors::indexer::tests::test_indexer_triggers_commit_on_target_num_docs" From 2ef778f69a6d26157ef32ddc38b6763b3c0f5f3f Mon Sep 17 00:00:00 2001 From: Jonathan Davies Date: Tue, 4 Jun 2024 00:33:36 +0100 Subject: [PATCH 11/15] nixos/quickwit: init module --- nixos/modules/module-list.nix | 1 + nixos/modules/services/search/quickwit.nix | 190 +++++++++++++++++++++ 2 files changed, 191 insertions(+) create mode 100644 nixos/modules/services/search/quickwit.nix diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix index 4c81336fc231..c8d485f694cc 100644 --- a/nixos/modules/module-list.nix +++ b/nixos/modules/module-list.nix @@ -1248,6 +1248,7 @@ ./services/search/meilisearch.nix ./services/search/opensearch.nix ./services/search/qdrant.nix + ./services/search/quickwit.nix ./services/search/sonic-server.nix ./services/search/typesense.nix ./services/security/aesmd.nix diff --git a/nixos/modules/services/search/quickwit.nix b/nixos/modules/services/search/quickwit.nix new file mode 100644 index 000000000000..6b2db935cf0b --- /dev/null +++ b/nixos/modules/services/search/quickwit.nix @@ -0,0 +1,190 @@ +{ config, lib, pkgs, ... }: + +with lib; + +let + cfg = config.services.quickwit; + + settingsFormat = pkgs.formats.yaml {}; + quickwitYml = settingsFormat.generate "quickwit.yml" cfg.settings; + + usingDefaultDataDir = cfg.dataDir == "/var/lib/quickwit"; + usingDefaultUserAndGroup = cfg.user == "quickwit" && cfg.group == "quickwit"; +in +{ + + options.services.quickwit = { + enable = mkEnableOption "Quickwit"; + + package = lib.mkPackageOption pkgs "Quickwit" { + default = [ "quickwit" ]; + }; + + settings = lib.mkOption { + type = lib.types.submodule { + freeformType = settingsFormat.type; + + options."rest" = lib.mkOption { + default = {}; + description = '' + Rest server configuration for Quickwit + ''; + + type = lib.types.submodule { + freeformType = settingsFormat.type; + + options."listen_port" = lib.mkOption { + type = lib.types.port; + default = 7280; + description = '' + The port to listen on for HTTP REST traffic. + ''; + }; + }; + }; + + options."grpc_listen_port" = lib.mkOption { + type = lib.types.port; + default = 7281; + description = '' + The port to listen on for gRPC traffic. + ''; + }; + + options."listen_address" = lib.mkOption { + type = lib.types.str; + default = "127.0.0.1"; + description = '' + Listen address of Quickwit. + ''; + }; + + options."version" = lib.mkOption { + type = lib.types.float; + default = 0.7; + description = '' + Configuration file version. + ''; + }; + }; + + default = {}; + + description = '' + Quickwit configuration. + ''; + }; + + dataDir = lib.mkOption { + type = lib.types.path; + default = "/var/lib/quickwit"; + apply = converge (removeSuffix "/"); + description = '' + Data directory for Quickwit. If you change this, you need to + manually create the directory. You also need to create the + `quickwit` user and group, or change + [](#opt-services.quickwit.user) and + [](#opt-services.quickwit.group) to existing ones with + access to the directory. + ''; + }; + + user = lib.mkOption { + type = lib.types.str; + default = "quickwit"; + description = '' + The user Quickwit runs as. Should be left at default unless + you have very specific needs. + ''; + }; + + group = lib.mkOption { + type = lib.types.str; + default = "quickwit"; + description = '' + The group quickwit runs as. Should be left at default unless + you have very specific needs. + ''; + }; + + extraFlags = lib.mkOption { + description = "Extra command line options to pass to Quickwit."; + default = [ ]; + type = lib.types.listOf lib.types.str; + }; + + restartIfChanged = lib.mkOption { + type = lib.types.bool; + description = '' + Automatically restart the service on config change. + This can be set to false to defer restarts on a server or cluster. + Please consider the security implications of inadvertently running an older version, + and the possibility of unexpected behavior caused by inconsistent versions across a cluster when disabling this option. + ''; + default = true; + }; + }; + + config = mkIf cfg.enable { + systemd.services.quickwit = { + description = "Quickwit"; + wantedBy = [ "multi-user.target" ]; + after = [ "network.target" ]; + inherit (cfg) restartIfChanged; + environment = { + QW_DATA_DIR = cfg.dataDir; + }; + serviceConfig = { + ExecStart = '' + ${cfg.package}/bin/quickwit run --config ${quickwitYml} \ + ${escapeShellArgs cfg.extraFlags} + ''; + User = cfg.user; + Group = cfg.group; + Restart = "on-failure"; + DynamicUser = usingDefaultUserAndGroup && usingDefaultDataDir; + CapabilityBoundingSet = [ "" ]; + DevicePolicy = "closed"; + LockPersonality = true; + MemoryDenyWriteExecute = true; + NoNewPrivileges = true; + PrivateDevices = true; + ProcSubset = "pid"; + ProtectClock = true; + ProtectHome = true; + ProtectHostname = true; + ProtectControlGroups = true; + ProtectKernelLogs = true; + ProtectKernelModules = true; + ProtectKernelTunables = true; + ProtectProc = "invisible"; + ProtectSystem = "strict"; + ReadWritePaths = [ + "/var/lib/quickwit" + ]; + RestrictAddressFamilies = [ + "AF_NETLINK" + "AF_INET" + "AF_INET6" + ]; + RestrictNamespaces = true; + RestrictRealtime = true; + RestrictSUIDSGID = true; + SystemCallArchitectures = "native"; + SystemCallFilter = [ + # 1. allow a reasonable set of syscalls + "@system-service @resources" + # 2. and deny unreasonable ones + "~@privileged" + # 3. then allow the required subset within denied groups + "@chown" + ]; + } // (optionalAttrs (usingDefaultDataDir) { + StateDirectory = "quickwit"; + StateDirectoryMode = "0700"; + }); + }; + + environment.systemPackages = [ cfg.package ]; + }; +} From 237353040e346d66806f9bf2a96cc9bfd9f6f752 Mon Sep 17 00:00:00 2001 From: Jonathan Davies Date: Tue, 4 Jun 2024 22:39:48 +0100 Subject: [PATCH 12/15] nixos/quickwit: Added testcase --- nixos/tests/all-tests.nix | 1 + nixos/tests/quickwit.nix | 31 +++++++++++++++++++++++++++++++ 2 files changed, 32 insertions(+) create mode 100644 nixos/tests/quickwit.nix diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix index 35092dd329e1..aa7e007e4fdd 100644 --- a/nixos/tests/all-tests.nix +++ b/nixos/tests/all-tests.nix @@ -788,6 +788,7 @@ in { qtile = handleTestOn ["x86_64-linux" "aarch64-linux"] ./qtile.nix {}; quake3 = handleTest ./quake3.nix {}; quicktun = handleTest ./quicktun.nix {}; + quickwit = handleTest ./quickwit.nix {}; quorum = handleTest ./quorum.nix {}; rabbitmq = handleTest ./rabbitmq.nix {}; radarr = handleTest ./radarr.nix {}; diff --git a/nixos/tests/quickwit.nix b/nixos/tests/quickwit.nix new file mode 100644 index 000000000000..145959f7d3f5 --- /dev/null +++ b/nixos/tests/quickwit.nix @@ -0,0 +1,31 @@ +import ./make-test-python.nix ({ lib, pkgs, ... }: + +{ + name = "quickwit"; + meta.maintainers = [ pkgs.lib.maintainers.happysalada ]; + + nodes = { + quickwit = { config, pkgs, ... }: { + services.quickwit.enable = true; + }; + }; + + testScript = + '' + quickwit.wait_for_unit("quickwit") + quickwit.wait_for_open_port(7280) + quickwit.wait_for_open_port(7281) + + quickwit.wait_until_succeeds( + "journalctl -o cat -u quickwit.service | grep 'version: ${pkgs.quickwit.version}'" + ) + + quickwit.wait_until_succeeds( + "journalctl -o cat -u quickwit.service | grep 'transitioned to ready state'" + ) + + quickwit.log(quickwit.succeed( + "systemd-analyze security quickwit.service | grep -v '✓'" + )) + ''; +}) From c31c69206f4dd758f6eff9cf4b563f2e325ea3f4 Mon Sep 17 00:00:00 2001 From: Jonathan Davies Date: Tue, 4 Jun 2024 00:35:54 +0100 Subject: [PATCH 13/15] =?UTF-8?q?nixos/vector:=20Added=20syslog=E2=86=92Qu?= =?UTF-8?q?ickwit=20testcase?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- nixos/tests/vector/default.nix | 1 + nixos/tests/vector/syslog-quickwit.nix | 155 +++++++++++++++++++++++++ 2 files changed, 156 insertions(+) create mode 100644 nixos/tests/vector/syslog-quickwit.nix diff --git a/nixos/tests/vector/default.nix b/nixos/tests/vector/default.nix index 990b067e8177..dc3747da7421 100644 --- a/nixos/tests/vector/default.nix +++ b/nixos/tests/vector/default.nix @@ -8,4 +8,5 @@ api = import ./api.nix { inherit system pkgs; }; dnstap = import ./dnstap.nix { inherit system pkgs; }; nginx-clickhouse = import ./nginx-clickhouse.nix { inherit system pkgs; }; + syslog-quickwit = import ./syslog-quickwit.nix { inherit system pkgs; }; } diff --git a/nixos/tests/vector/syslog-quickwit.nix b/nixos/tests/vector/syslog-quickwit.nix new file mode 100644 index 000000000000..89c46d42ee75 --- /dev/null +++ b/nixos/tests/vector/syslog-quickwit.nix @@ -0,0 +1,155 @@ +import ../make-test-python.nix ({ lib, pkgs, ... }: + +# Based on https://quickwit.io/docs/log-management/send-logs/using-vector + +{ + name = "vector-syslog-quickwit"; + meta.maintainers = [ pkgs.lib.maintainers.happysalada ]; + + nodes = { + quickwit = { config, pkgs, ... }: { + environment.systemPackages = [ pkgs.jq ]; + + networking.firewall.allowedTCPPorts = [ 7280 ]; + + services.quickwit = { + enable = true; + settings = { + listen_address = "::"; + }; + }; + }; + + syslog = { config, pkgs, ... }: { + services.vector = { + enable = true; + + settings = { + sources = { + generate_syslog = { + type = "demo_logs"; + format = "syslog"; + interval = 0.5; + }; + }; + + transforms = { + remap_syslog = { + inputs = ["generate_syslog"]; + type = "remap"; + source = '' + structured = parse_syslog!(.message) + .timestamp_nanos = to_unix_timestamp!(structured.timestamp, unit: "nanoseconds") + .body = structured + .service_name = structured.appname + .resource_attributes.source_type = .source_type + .resource_attributes.host.hostname = structured.hostname + .resource_attributes.service.name = structured.appname + .attributes.syslog.procid = structured.procid + .attributes.syslog.facility = structured.facility + .attributes.syslog.version = structured.version + .severity_text = if includes(["emerg", "err", "crit", "alert"], structured.severity) { + "ERROR" + } else if structured.severity == "warning" { + "WARN" + } else if structured.severity == "debug" { + "DEBUG" + } else if includes(["info", "notice"], structured.severity) { + "INFO" + } else { + structured.severity + } + .scope_name = structured.msgid + del(.message) + del(.timestamp) + del(.service) + del(.source_type) + ''; + }; + }; + + sinks = { + #emit_syslog = { + # inputs = ["remap_syslog"]; + # type = "console"; + # encoding.codec = "json"; + #}; + quickwit_logs = { + type = "http"; + method = "post"; + inputs = [ "remap_syslog" ]; + encoding.codec = "json"; + framing.method = "newline_delimited"; + uri = "http://quickwit:7280/api/v1/otel-logs-v0_7/ingest"; + }; + }; + }; + }; + }; + }; + + testScript = + let + aggregationQuery = pkgs.writeText "aggregation-query.json" '' + { + "query": "*", + "max_hits": 0, + "aggs": { + "count_per_minute": { + "histogram": { + "field": "timestamp_nanos", + "interval": 60000000 + }, + "aggs": { + "severity_text_count": { + "terms": { + "field": "severity_text" + } + } + } + } + } + } + ''; + in + '' + quickwit.wait_for_unit("quickwit") + quickwit.wait_for_open_port(7280) + quickwit.wait_for_open_port(7281) + + quickwit.wait_until_succeeds( + "journalctl -o cat -u quickwit.service | grep 'transitioned to ready state'" + ) + + syslog.wait_for_unit("vector") + syslog.wait_until_succeeds( + "journalctl -o cat -u vector.service | grep 'Vector has started'" + ) + + quickwit.wait_until_succeeds( + "journalctl -o cat -u quickwit.service | grep 'publish-new-splits'" + ) + + # Wait for logs to be generated + # Test below aggregates by the minute + syslog.sleep(60 * 2) + + quickwit.wait_until_succeeds( + "curl -sSf -XGET http://127.0.0.1:7280/api/v1/otel-logs-v0_7/search?query=severity_text:ERROR |" + + " jq '.num_hits' | grep -v '0'" + ) + + quickwit.wait_until_succeeds( + "journalctl -o cat -u quickwit.service | grep 'SearchRequest'" + ) + + quickwit.wait_until_succeeds( + "curl -sSf -XPOST -H 'Content-Type: application/json' http://127.0.0.1:7280/api/v1/otel-logs-v0_7/search --data @${aggregationQuery} |" + + " jq '.num_hits' | grep -v '0'" + ) + + quickwit.wait_until_succeeds( + "journalctl -o cat -u quickwit.service | grep 'count_per_minute'" + ) + ''; +}) From e81519a8589fc63c2f47b35a5496c7775a977163 Mon Sep 17 00:00:00 2001 From: Jonathan Davies Date: Tue, 4 Jun 2024 00:48:41 +0100 Subject: [PATCH 14/15] quickwit: Added nixosTests to passthru.tests --- pkgs/servers/search/quickwit/default.nix | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/pkgs/servers/search/quickwit/default.nix b/pkgs/servers/search/quickwit/default.nix index 39cf1b7c1548..095bfc679aa4 100644 --- a/pkgs/servers/search/quickwit/default.nix +++ b/pkgs/servers/search/quickwit/default.nix @@ -2,6 +2,7 @@ , lib , fetchFromGitHub , rustPlatform +, nixosTests , nix-update-script , protobuf , rust-jemalloc-sys @@ -53,7 +54,13 @@ rustPlatform.buildRustPackage rec { PROTOC = "${protobuf}/bin/protoc"; PROTOC_INCLUDE = "${protobuf}/include"; - passthru.updateScript = nix-update-script { }; + passthru = { + tests = { + inherit (nixosTests) quickwit; + inherit (nixosTests.vector) syslog-quickwit; + }; + updateScript = nix-update-script { }; + }; checkFlags = [ # tries to make a network access From 7d7cb3e425199e9cc45c65a10a6a35c48fe9346b Mon Sep 17 00:00:00 2001 From: Jonathan Davies Date: Tue, 4 Jun 2024 10:05:12 +0100 Subject: [PATCH 15/15] doc/release-notes: 24.11: Added Quickwit item to new services. --- nixos/doc/manual/release-notes/rl-2411.section.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/nixos/doc/manual/release-notes/rl-2411.section.md b/nixos/doc/manual/release-notes/rl-2411.section.md index d821a6e6cc1f..f3135fbd1883 100644 --- a/nixos/doc/manual/release-notes/rl-2411.section.md +++ b/nixos/doc/manual/release-notes/rl-2411.section.md @@ -12,6 +12,8 @@ for LLMs. Available as [services.open-webui](#opt-services.open-webui.enable) service. +- [Quickwit](https://quickwit.io), sub-second search & analytics engine on cloud storage. Available as [services.quickwit](options.html#opt-services.quickwit). + ## Backward Incompatibilities {#sec-release-24.11-incompatibilities} - `nginx` package no longer includes `gd` and `geoip` dependencies. For enabling it, override `nginx` package with the optionals `withImageFilter` and `withGeoIP`.