summaryrefslogtreecommitdiff
path: root/default.nix
blob: 01ae26963c597d6352a76a26ec599e5a8fd4eecb (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
28
29
{
  hugo,
  lib,
  stdenv,
  self ? null,
}:
stdenv.mkDerivation {
  pname = "tdback-net";
  version = if self ? rev then self.rev else "dirty";
  src = lib.cleanSource ./.;

  nativeBuildInputs = [ hugo ];

  buildPhase = ''
    runHook preBuild

    hugo build --minify

    runHook postBuild
  '';

  installPhase = ''
    runHook preInstall

    mv public $out

    runHook postInstall
  '';
}