2024-04-26 09:26:26 +00:00
|
|
|
{
|
|
|
|
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
|
|
|
|
];
|
2024-04-26 09:26:26 +00:00
|
|
|
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"];
|
2024-04-26 09:26:26 +00:00
|
|
|
}
|