blob: 63f4290a197bc4279b2cc71dd48c377795026130 (
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
|
{
lib,
stdenvNoCC,
writeShellApplication,
miniserve,
zola,
nix-filter,
self,
}:
let
website = stdenvNoCC.mkDerivation {
pname = "getchoo-website";
version = builtins.substring 0 8 self.lastModifiedDate or "dirty";
src = nix-filter.lib {
root = self;
include = [
"config.toml"
"content"
"static"
"templates"
];
};
nativeBuildInputs = [ zola ];
dontConfigure = true;
dontFixup = true;
buildPhase = "zola build";
installPhase = "mv public $out";
passthru = {
serve = writeShellApplication {
name = "serve";
runtimeInputs = [ miniserve ];
text = ''
miniserve ${website}/
'';
};
};
meta = {
homepage = "https://github.com/getchoo/website";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ getchoo ];
};
};
in
website
|