blob: 09e48c66caa2091af492001262d922f7e8090adf (
plain) (
blame)
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
|
{
description = "Hauntingly cool website";
inputs.nixpkgs.url = "https://channels.nixos.org/nixpkgs-unstable/nixexprs.tar.xz";
outputs =
{ nixpkgs, ... }:
let
system = "x86_64-linux";
pkgs = import nixpkgs { inherit system; };
in
{
packages.${system}.default = pkgs.stdenv.mkDerivation {
pname = "website";
version = "0.1.0";
src = ./.;
nativeBuildInputs = [
pkgs.guile
pkgs.haunt
];
buildPhase = ''
haunt build
'';
installPhase = ''
runHook preInstall
mkdir -p $out
cp -r site/* $out/
runHook postInstall
'';
};
devShells.${system}.default = pkgs.mkShell {
buildInputs = [
pkgs.guile
pkgs.haunt
pkgs.guile-commonmark
];
shellHook = ''
echo "Entered Haunt dev shell. Run: haunt build/serve"
'';
};
};
}
|