sonic-server: add passthru.tests and passthru.updateScript

+14
+14
pkgs/servers/search/sonic-server/default.nix
··· 1 1 { lib 2 2 , rustPlatform 3 3 , fetchFromGitHub 4 + , nix-update-script 5 + , testers 6 + , sonic-server 4 7 }: 5 8 6 9 rustPlatform.buildRustPackage rec { ··· 37 40 --replace /etc/sonic.cfg $out/etc/sonic/config.cfg 38 41 ''; 39 42 43 + passthru = { 44 + tests = { 45 + version = testers.testVersion { 46 + command = "sonic --version"; 47 + package = sonic-server; 48 + }; 49 + }; 50 + updateScript = nix-update-script { }; 51 + }; 52 + 40 53 meta = with lib; { 41 54 description = "Fast, lightweight and schema-less search backend"; 42 55 homepage = "https://github.com/valeriansaliou/sonic"; 43 56 changelog = "https://github.com/valeriansaliou/sonic/releases/tag/v${version}"; 44 57 license = licenses.mpl20; 45 58 platforms = platforms.unix; 59 + mainProgram = "sonic"; 46 60 maintainers = with maintainers; [ pleshevskiy ]; 47 61 }; 48 62 }