2021-05-15 02:51:50 +03:00
|
|
|
{ lib, pkgs }:
|
2021-05-15 02:39:30 +03:00
|
|
|
let pkgBin = name: "${pkgs.${name}}/bin/${name}"; in
|
|
|
|
{
|
|
|
|
mkServePathScript = path: pkgs.writeScriptBin "serve" { } ''
|
|
|
|
#!${pkgBin "bash"}
|
|
|
|
${pkgBin "miniserve"} --index index.html ${path}
|
|
|
|
'';
|
|
|
|
}
|