lol
1{ stdenv
2, lib
3, fetchFromGitHub
4, rustPlatform
5, nix-update-script
6, protobuf
7, rust-jemalloc-sys
8, Security
9}:
10
11let
12 pname = "quickwit";
13 version = "0.6.4";
14in
15rustPlatform.buildRustPackage rec {
16 inherit pname version;
17
18 src = fetchFromGitHub {
19 owner = "quickwit-oss";
20 repo = pname;
21 rev = "v${version}";
22 hash = "sha256-stlm3oDMQVoMza3s4JApynXbzhrarfXw3uAxGMZQJqs=";
23 };
24
25 postPatch = ''
26 substituteInPlace ./quickwit-ingest/build.rs \
27 --replace '&[]' '&["."]'
28 substituteInPlace ./quickwit-codegen/example/build.rs \
29 --replace '&[]' '&["."]'
30 substituteInPlace ./quickwit-proto/build.rs \
31 --replace '&[]' '&["."]'
32 '';
33
34 sourceRoot = "${src.name}/quickwit";
35
36 buildInputs = [
37 rust-jemalloc-sys
38 ] ++ lib.optionals stdenv.isDarwin [ Security ];
39
40 cargoLock = {
41 lockFile = ./Cargo.lock;
42 outputHashes = {
43 "chitchat-0.5.0" = "sha256-gGWMzTzQNb9JXSbPIanMJpEKhKen1KsIrWQz6wvypDY=";
44 "ownedbytes-0.5.0" = "sha256-ZuWwj5EzDm4YOUU/MhmR7CBOHM444ljBFSkC+wLBia4=";
45 "path-0.1.0" = "sha256-f+Iix+YuKy45zoQXH7ctzANaL96s7HNUBOhcM1ZV0Ko=";
46 "pulsar-5.0.2" = "sha256-j7wpsAro6x4fk3pvSL4fxLkddJFq8duZ7jDj0Edf3YQ=";
47 "sasl2-sys-0.1.20+2.1.28" = "sha256-u4BsfmTDFxuY3i1amLCsr7MDv356YPThMHclura0Sxs=";
48 "whichlang-0.1.0" = "sha256-7AvLGjtWHjG0TnZdg9p5D+O0H19uo2sqPxJMn6mOU0k=";
49 };
50 };
51
52 # needed for internal protobuf c wrapper library
53 PROTOC = "${protobuf}/bin/protoc";
54 PROTOC_INCLUDE = "${protobuf}/include";
55
56 passthru.updateScript = nix-update-script { };
57
58 checkFlags = [
59 # tries to make a network access
60 "--skip=test_all_local_index"
61 "--skip=test_cmd_create"
62 "--skip=test_cmd_create_no_index_uri"
63 "--skip=test_cmd_search_aggregation"
64 "--skip=test_cmd_search_with_snippets"
65 "--skip=test_delete_index_cli"
66 "--skip=test_delete_index_cli_dry_run"
67 "--skip=test_ingest_docs_cli"
68 "--skip=test_ingest_docs_cli_keep_cache"
69 "--skip=test_search_index_cli"
70 "--skip=test_garbage_collect_cli_no_grace"
71 "--skip=actors::indexing_service::tests::test_indexing_service_spawn_observe_detach"
72 "--skip=object_storage::s3_compatible_storage::tests::test_s3_compatible_storage_relative_path"
73 # flaky test
74 "--skip=actors::indexer::tests::test_indexer_triggers_commit_on_drained_mailbox"
75 "--skip=actors::indexer::tests::test_indexer_partitioning"
76 "--skip=actors::indexing_pipeline::tests::test_merge_pipeline_does_not_stop_on_indexing_pipeline_failure"
77 "--skip=actors::indexer::tests::test_indexer_triggers_commit_on_target_num_docs"
78 "--skip=actors::packager::tests::test_packager_simple"
79 # fail on darwin for some reason
80 "--skip=io::tests::test_controlled_writer_limited_async"
81 "--skip=io::tests::test_controlled_writer_limited_sync"
82 ];
83
84 meta = with lib; {
85 description = "Sub-second search & analytics engine on cloud storage";
86 homepage = "https://quickwit.io/";
87 license = licenses.agpl3Only;
88 maintainers = with maintainers; [ happysalada ];
89 platforms = platforms.all;
90 };
91}