aboutsummaryrefslogtreecommitdiff
path: root/default.nix
blob: 80a173eeca845e10778daa8857b8c38c0331a1a9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
with import <nixpkgs> { };

let jekyllEnv = bundlerEnv rec {
  name = "jekyllEnv";
  inherit ruby;
  gemfile = ./Gemfile;
  lockfile = ./Gemfile.lock;
  gemset = ./gemset.nix;
};
in
  stdenv.mkDerivation rec {
    name = "tudorBlog";
    version = "unstable";

    src = ./.;

    nativeBuildInputs = [ jekyllEnv bundler ruby ];
    dontInstall = true;

    buildPhase = ''
      buildDir="$(pwd)"

      cp -rf $src/* "$buildDir"

      ${jekyllEnv}/bin/jekyll build -d "$out" --trace
    '';
  }