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

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