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

32 lines
747 B
Nix
Raw Normal View History

2022-06-11 14:04:50 +00:00
{
2022-09-30 15:09:55 +00:00
stdenvNoCC,
2023-05-29 15:32:15 +00:00
fetchgit,
2022-09-30 15:09:55 +00:00
chevron,
lndir,
lib,
}: let
source = builtins.fromJSON (builtins.readFile ./miifox.json);
in
stdenvNoCC.mkDerivation {
2022-06-11 14:04:50 +00:00
pname = "miifox.net";
2022-09-30 15:09:55 +00:00
version = source.date;
2023-05-29 15:32:15 +00:00
src = fetchgit {
inherit (source) url rev sha256;
2022-09-30 15:09:55 +00:00
};
nativeBuildInputs = [chevron lndir];
2022-06-11 14:04:50 +00:00
buildPhase = ''
chevron -d index.json index.handlebars > index.html
'';
installPhase = ''
mkdir $out
2022-09-30 15:09:55 +00:00
lndir -silent $src $out
2022-06-11 14:04:50 +00:00
cp index.html $out
rm $out/index.json
'';
2022-09-30 15:09:55 +00:00
meta = {
description = "miifox.net";
license = lib.licenses.unfree;
};
passthru.updateScript = [../scripts/update-git.sh "https://git.chir.rs/CarolineHusky/MiiFox.net" "web/miifox.json"];
}