45 lines
1.0 KiB
Nix
45 lines
1.0 KiB
Nix
{
|
|
lib, stdenv
|
|
, python3
|
|
, shared-assets
|
|
, tailwindWithTypography
|
|
}: let
|
|
pythonEnv = python3.withPackages (ps: with ps; [
|
|
markdown pygments
|
|
]);
|
|
in stdenv.mkDerivation {
|
|
pname = "website";
|
|
version = "20230722";
|
|
|
|
src = ../.;
|
|
|
|
buildInputs = [ shared-assets python3 ];
|
|
|
|
buildPhase = ''
|
|
${pythonEnv}/bin/python ${shared-assets}/bin/makesite.py \
|
|
-v page_assets=https://cdn.polynom.me \
|
|
--assets ./assets \
|
|
--copy-assets \
|
|
--include robots.txt \
|
|
-p params.json
|
|
|
|
# Build Tailwind CSS data
|
|
${tailwindWithTypography}/bin/tailwindcss --input ./input.css --output _site/assets/css/index.css
|
|
'';
|
|
|
|
installPhase = ''
|
|
mkdir -p $out/srv/www/website
|
|
cp -vr _site/* $out/srv/www/website
|
|
cp -vr well-known $out/srv/www/website/.well-known
|
|
'';
|
|
|
|
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;
|
|
};
|
|
}
|