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
577 B
Nix

{
inputs,
pkgs,
...
}: rec {
miifox-net-source = pkgs.callPackage ./miifox-source.nix {};
miifox-net = pkgs.stdenvNoCC.mkDerivation {
pname = "miifox.net";
version = inputs.miifox-net.lastModifiedDate;
srcs = miifox-net-source;
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
'';
};
}