Add support for building the site via nix.
This commit is contained in:
31
nix/package.nix
Normal file
31
nix/package.nix
Normal file
@@ -0,0 +1,31 @@
|
||||
{
|
||||
lib,
|
||||
pkgs,
|
||||
natter,
|
||||
organic_ast_explorer,
|
||||
homepage_private,
|
||||
}:
|
||||
let
|
||||
|
||||
in
|
||||
pkgs.stdenv.mkDerivation rec {
|
||||
pname = "homepage";
|
||||
version = "0.0.0";
|
||||
|
||||
src = lib.cleanSource ../.;
|
||||
|
||||
configurePhase = "";
|
||||
|
||||
buildPhase = ''
|
||||
mkdir -p static/organic/ast_explorer
|
||||
cp ${organic_ast_explorer}/* static/organic/ast_explorer/
|
||||
cp -r ${homepage_private}/static/* static/
|
||||
|
||||
${natter}/bin/natter build --config natter.toml
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out
|
||||
mv output/* $out/
|
||||
'';
|
||||
}
|
||||
Reference in New Issue
Block a user