website/pkgs/website.nix

38 lines
731 B
Nix
Raw Normal View History

2022-05-14 15:23:19 +00:00
{
lib, stdenv
, python3
, shared-assets
}:
stdenv.mkDerivation {
pname = "website";
version = "202205120-01";
src = ../.;
buildInputs = [ shared-assets python3 ];
buildPhase = ''
${python3}/bin/python ${shared-assets}/bin/makesite.py \
-v page_assets=https://cdn.polynom.me \
--assets ./assets \
--copy-assets \
--include robots.txt \
-p params.json
'';
installPhase = ''
mkdir -p $out/srv/www/website
cp -vr _site/* $out/srv/www/website
'';
doCheck = false;
meta = with lib; {
description = "The website hosted at https://polynom.me";
homepage = "https://git.polynom.me/polynom.me/website";
maintainers = [];
license = licenses.gpl3;
};
}