mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-21 08:35:43 +02:00
22 lines
360 B
Nix
22 lines
360 B
Nix
{
|
|
docs,
|
|
http-server,
|
|
writeShellApplication,
|
|
}:
|
|
writeShellApplication {
|
|
name = "serve-docs";
|
|
runtimeInputs = [ http-server ];
|
|
runtimeEnv.server_flags = [
|
|
# Search for available port
|
|
"--port=0"
|
|
|
|
# Disable browser cache
|
|
"-c-1"
|
|
|
|
# Open using xdg-open
|
|
"-o"
|
|
];
|
|
text = ''
|
|
http-server ${docs} "''${server_flags[@]}"
|
|
'';
|
|
}
|