mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-10 03:23:29 +03:00
29 lines
473 B
Nix
29 lines
473 B
Nix
![]() |
{ lib, ... }:
|
||
|
let
|
||
|
mainPort = "5001";
|
||
|
in
|
||
|
{
|
||
|
name = "docling-serve";
|
||
|
meta = with lib.maintainers; {
|
||
|
maintainers = [ drupol ];
|
||
|
};
|
||
|
|
||
|
nodes = {
|
||
|
machine =
|
||
|
{ ... }:
|
||
|
{
|
||
|
services.docling-serve = {
|
||
|
enable = true;
|
||
|
};
|
||
|
};
|
||
|
};
|
||
|
|
||
|
testScript = ''
|
||
|
machine.start()
|
||
|
|
||
|
machine.wait_for_unit("docling-serve.service")
|
||
|
machine.wait_for_open_port(${mainPort})
|
||
|
machine.succeed("curl http://127.0.0.1:${mainPort}")
|
||
|
'';
|
||
|
}
|