summary refs log tree commit diff
path: root/Documentation/default.nix
blob: 736300a9271f6bcf291afe107674082b288936c6 (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
# SPDX-FileCopyrightText: 2022 Alyssa Ross <hi@alyssa.is>
# SPDX-License-Identifier: MIT

{ pkgs ? import <nixpkgs> {} }: pkgs.callPackage (

{ lib, runCommand, jekyll }:

runCommand "spectrum-docs" {
  src = with lib; cleanSourceWith {
    src = cleanSource ./.;
    filter = name: _type:
      name != ".jekyll-cache" &&
      name != "_site" &&
      !(hasSuffix ".nix" name);
  };

  nativeBuildInputs = [ jekyll ];

  passthru = { inherit jekyll; };
} ''
  jekyll build --disable-disk-cache -s $src -d $out
''
) {
  jekyll = import ./jekyll.nix { inherit pkgs; };
}