nix-packages/web/miifox-net.nix

26 lines
577 B
Nix
Raw Normal View History

2022-06-11 14:04:50 +00:00
{
inputs,
pkgs,
...
2022-07-08 12:13:33 +00:00
}: rec {
miifox-net-source = pkgs.callPackage ./miifox-source.nix {};
2022-06-11 14:04:50 +00:00
miifox-net = pkgs.stdenvNoCC.mkDerivation {
pname = "miifox.net";
version = inputs.miifox-net.lastModifiedDate;
2022-07-08 12:13:33 +00:00
srcs = miifox-net-source;
2022-06-11 14:04:50 +00:00
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
'';
};
}