38 lines
731 B
Nix
38 lines
731 B
Nix
|
{
|
||
|
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;
|
||
|
};
|
||
|
}
|