A fast and simple blog backend.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
mediocre-blog/static/default.nix

39 lines
935 B

{pkgs}: rec {
depInputs = [ pkgs.imagemagick pkgs.exiftool pkgs.bundler pkgs.bundix ];
depShell = pkgs.stdenv.mkDerivation {
name = "mediocre-blog-static-dep-shell";
buildInputs = depInputs;
};
jekyllEnv = pkgs.bundlerEnv {
name = "jekyllEnv";
ruby = pkgs.ruby;
gemdir = ./.;
};
build = pkgs.stdenv.mkDerivation {
name = "mediocre-blog-static";
src = ./src;
buildPhase = "${jekyllEnv}/bin/jekyll build";
installPhase = "mv _site $out";
};
serve = pkgs.writeScriptBin "static-serve" ''
#!/bin/sh
exec ${jekyllEnv}/bin/jekyll serve \
-s ./src \
-d ./_site \
-w -I -D \
-P 4001
'';
allInputs = depInputs ++ [ jekyllEnv serve ];
shell = pkgs.stdenv.mkDerivation {
name = "mediocre-blog-static-shell";
buildInputs = allInputs;
};
}