Skip to content

Commit

Permalink
quickwit: Set default config file. Fixes NixOS#289000
Browse files Browse the repository at this point in the history
  • Loading branch information
nh2 committed Apr 1, 2024
1 parent 86e9e2e commit 5c60517
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions pkgs/servers/search/quickwit/default.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{ stdenv
, lib
, fetchFromGitHub
, makeWrapper
, rustPlatform
, nix-update-script
, protobuf
Expand Down Expand Up @@ -33,6 +34,10 @@ rustPlatform.buildRustPackage rec {

sourceRoot = "${src.name}/quickwit";

nativeBuildInputs = [
makeWrapper
];

buildInputs = [
rust-jemalloc-sys
] ++ lib.optionals stdenv.isDarwin [ Security ];
Expand All @@ -53,6 +58,14 @@ rustPlatform.buildRustPackage rec {
PROTOC = "${protobuf}/bin/protoc";
PROTOC_INCLUDE = "${protobuf}/include";

# * Set default config file via `QW_CONFIG`, otherwise `quickwit run`
# will fail to start. See https://github.com/NixOS/nixpkgs/issues/289000
postInstall = ''
mkdir -p $out/share/quickwit/config
cp ../config/quickwit.yaml $out/share/quickwit/config/quickwit.yaml
wrapProgram $out/bin/quickwit --set-default QW_CONFIG $out/share/quickwit/config/quickwit.yaml
'';

passthru.updateScript = nix-update-script { };

checkFlags = [
Expand Down

0 comments on commit 5c60517

Please sign in to comment.