summary refs log blame commit diff
path: root/Documentation/default.nix
blob: 564a4769a836afa29d9f56074acfdb56b702a93b (plain) (tree)
1
2
3
4
5
6
7
8
9
10
                                                         
                                     

                              
                                                                        
 



                                             
 
                                   
                          
                         

                                                    

                                 

    

                    
                            




                     
                                                 
 
                                 
 
   
                                                   
 
# SPDX-FileCopyrightText: 2022 Alyssa Ross <hi@alyssa.is>
# SPDX-FileCopyrightText: 2022 Unikie
# SPDX-License-Identifier: MIT

{ config ? import ../nix/eval-config.nix {} }: config.pkgs.callPackage (

{ lib, stdenvNoCC, jekyll, drawio-headless }:

stdenvNoCC.mkDerivation {
  name = "spectrum-docs";

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

  buildPhase = ''
    runHook preBuild
    scripts/build.sh -d $out
    runHook postBuild
  '';

  dontInstall = true;

  nativeBuildInputs = [ jekyll drawio-headless ];

  passthru = { inherit jekyll; };
}
) {
  jekyll = import ./jekyll.nix { inherit config; };
}