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
{
inputs.nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
outputs = { self, nixpkgs }:
let
pkgs = nixpkgs.legacyPackages.x86_64-linux.pkgs;
# https://github.com/NixOS/nixpkgs/blob/340a3345a23ad684a8c328eecc20bb0437e6954d/pkgs/development/haskell-modules/configuration-nix.nix#L1311
tailwind = pkgs.nodePackages.tailwindcss.overrideAttrs
(o: { plugins = [ pkgs.nodePackages."@tailwindcss/typography" ]; });
buildInputs = with pkgs; [
just
zola
] ++ [ tailwind ];
in
{
packages.x86_64-linux.default = pkgs.stdenv.mkDerivation {
name = "liljamo-dev-zola";
src = ./.;
inherit buildInputs;
buildPhase = ''
just build
'';
installPhase = ''
mkdir -p $out
cp -R public $out
'';
};
devShells.x86_64-linux.default = pkgs.mkShell {
buildInputs = with pkgs; [
tailwindcss-language-server
] ++ buildInputs;
};
};
}