nix-community.nixvim/docs/server/default.nix
2025-05-22 13:48:58 +01:00

21 lines
409 B
Nix

{
lib,
runCommand,
makeBinaryWrapper,
python3,
xdg-utils,
docs,
}:
runCommand "serve-docs"
{
nativeBuildInputs = [ makeBinaryWrapper ];
meta.mainProgram = "server";
}
''
mkdir -p $out/bin
makeWrapper ${lib.getExe python3} \
$out/bin/server \
--add-flags ${./server.py} \
--chdir ${docs} \
--prefix PATH : ${lib.makeBinPath [ xdg-utils ]}
''