Add pre-built site

This commit is contained in:
Mats Rauhala 2020-02-01 22:49:12 +02:00
parent 2e2f7b9be1
commit 809599d830
1 changed files with 16 additions and 2 deletions

View File

@ -12,6 +12,21 @@ in
let let
haskellPackages = pkgs.haskellPackages; haskellPackages = pkgs.haskellPackages;
site = pkgs.callPackage ./default.nix {}; site = pkgs.callPackage ./default.nix {};
website = with pkgs; stdenv.mkDerivation {
pname = "rauhala.info";
version = "0.1.0";
src = lib.cleanSource ./.;
LANG = "en_US.UTF-8";
LOCALE_ARCHIVE = lib.optionalString stdenv.isLinux "${glibcLocales}/lib/locale/locale-archive";
buildPhase = ''
${site}/bin/site clean
${site}/bin/site build
'';
installPhase = ''
mkdir -p $out/share/
mv _site $out/share/html
'';
};
shell = pkgs.buildEnv { shell = pkgs.buildEnv {
name = "site-shell"; name = "site-shell";
paths = []; paths = [];
@ -25,6 +40,5 @@ let
in in
{ {
site = site; inherit site shell website;
shell = shell;
} }