let's see how we go...

This commit is contained in:
Robert Pearce 2020-09-21 22:03:52 -04:00
parent ba4bd84bd0
commit b29661efb6
No known key found for this signature in database
GPG key ID: 07A0E482E5616C9B
35 changed files with 902 additions and 2 deletions

26
default.nix Normal file
View file

@ -0,0 +1,26 @@
let
cfg = import ./nix/default.nix {};
in
{ pkgs ? cfg.pkgs }:
pkgs.stdenv.mkDerivation {
name = "my-site";
buildInputs = [
cfg.generator
];
src = cfg.src;
# https://github.com/jaspervdj/hakyll/issues/614
# https://github.com/NixOS/nix/issues/318#issuecomment-52986702
# https://github.com/MaxDaten/brutal-recipes/blob/source/default.nix#L24
LOCALE_ARCHIVE = pkgs.lib.optionalString (pkgs.buildPlatform.libc == "glibc") "${pkgs.glibcLocales}/lib/locale/locale-archive";
LANG = "en_US.UTF-8";
buildPhase = ''
hakyll-site build
'';
installPhase = ''
mkdir -p "$out/dist"
cp -r ../dist/* "$out/dist"
'';
}