Build the site with nix
This commit is contained in:
parent
3a556717bf
commit
09a424d956
1 changed files with 16 additions and 0 deletions
16
flake.nix
16
flake.nix
|
|
@ -24,9 +24,25 @@
|
|||
inherit pkgs;
|
||||
src = inputs.eleventy-src;
|
||||
};
|
||||
|
||||
# The static site
|
||||
site = pkgs.stdenv.mkDerivation {
|
||||
pname = "my-static-site";
|
||||
version = "1.0.0";
|
||||
src = ./.;
|
||||
buildInputs = [ eleventy ];
|
||||
buildPhase = "eleventy";
|
||||
installPhase = ''
|
||||
mkdir -p $out/
|
||||
echo $out
|
||||
cp -r _site/* $out/
|
||||
'';
|
||||
};
|
||||
in
|
||||
{
|
||||
packages.eleventy = eleventy;
|
||||
packages.site = site;
|
||||
packages.default = site;
|
||||
devShells.default = pkgs.mkShell {
|
||||
buildInputs = with pkgs; [
|
||||
just
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue