This repository has been archived on 2024-10-13. You can view files and clone it, but cannot push or open issues or pull requests.
nix-packages/web/miifox-net.nix

25 lines
510 B
Nix
Raw Normal View History

2022-06-11 14:04:50 +00:00
{
inputs,
pkgs,
...
}: {
miifox-net = pkgs.stdenvNoCC.mkDerivation {
pname = "miifox.net";
version = inputs.miifox-net.lastModifiedDate;
srcs = inputs.miifox-net;
nativeBuildInputs = with pkgs; [
python3Packages.chevron
xorg.lndir
];
buildPhase = ''
chevron -d index.json index.handlebars > index.html
'';
installPhase = ''
mkdir $out
lndir -silent ${inputs.miifox-net} $out
cp index.html $out
rm $out/index.json
'';
};
}