flake/website/package.nix
matthewcroughan bd8f65bfbc website: push to gh-pages via hercules-ci.github-pages
This is pretty awesome, just two lines and the website is deployed.
2023-02-28 01:56:02 +00:00

31 lines
551 B
Nix

{ lib, pandoc, stdenvNoCC }:
lib.fix (self: stdenvNoCC.mkDerivation {
pname = "nixified-ai-website";
version = "1.0.0";
src = ./src;
nativeBuildInputs = [
pandoc
];
buildCommand = ''
unpackPhase
cd $sourceRoot
pandoc \
--css=./styles.css \
-H header.html \
-V pagetitle='Nixified AI' \
-s index.md \
-o index.html
webroot=$out/share/www/nixified.ai
mkdir -p $webroot
cp -v index.html *.css *.png CNAME $webroot
'';
passthru.webroot = "${self}/share/www/nixified.ai";
})