html.nix/pkgs-lib.nix

9 lines
236 B
Nix
Raw Normal View History

{ lib ? import ./lib.nix, pkgs }:
let pkgBin = name: "${pkgs.${name}}/bin/${name}"; in
{
mkServePathScript = path: pkgs.writeScriptBin "serve" { } ''
#!${pkgBin "bash"}
${pkgBin "miniserve"} --index index.html ${path}
'';
}