nixos-config/packages/web/miifox-net.nix

35 lines
766 B
Nix
Raw Normal View History

{
stdenvNoCC,
fetchgit,
chevron,
lndir,
lib,
}: let
source = builtins.fromJSON (builtins.readFile ./miifox.json);
in
stdenvNoCC.mkDerivation {
pname = "miifox.net";
version = source.date;
src = fetchgit {
inherit (source) url rev sha256;
};
2024-12-01 12:52:58 +00:00
nativeBuildInputs = [
chevron
lndir
];
buildPhase = ''
chevron -d index.json index.handlebars > index.html
'';
installPhase = ''
mkdir $out
lndir -silent $src $out
cp index.html $out
rm $out/index.json
'';
meta = {
description = "miifox.net";
license = lib.licenses.unfree;
};
2024-12-01 12:52:58 +00:00
#passthru.updateScript = [../scripts/update-git.sh "https://git.chir.rs/CarolineHusky/MiiFox.net" "web/miifox.json"];
}