feat: Expose website as a flake
This commit is contained in:
37
pkgs/website.nix
Normal file
37
pkgs/website.nix
Normal file
@@ -0,0 +1,37 @@
|
||||
{
|
||||
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;
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user