~aasg/haunted-blog

ref: ddc39469a1b6ea301e20815b2cedc4491472c9df haunted-blog/default.nix -rw-r--r-- 920 bytes
ddc39469 — Aluísio Augusto Silva Gonçalves Apply SPDX copyright and license headers in compliance with REUSE 8 months ago
                                                                                
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
# SPDX-FileCopyrightText: 2020 Aluísio Augusto Silva Gonçalves <https://aasg.name>
# SPDX-License-Identifier: MIT

{ pkgs ? (import ./channels.nix).nixpkgs { }
, aasg-pkgs ? ((import ./channels.nix).aasg { inherit pkgs; })
, src ?
  builtins.filterSource
    (
      pkgs.nix-gitignore.gitignoreFilter ''
        /*
        !/haunt.scm
        !/assets/
        !/pages/
        !/posts/
        !/scm/
        !/static/
      '' ./.
    ) ./.
}:
let
  drv = pkgs.runCommand "aasg-blog"
    {
      nativeBuildInputs = [ aasg-pkgs.haunt pkgs.pandoc ];
      LANG = "C.UTF-8";
      GUILE_LOAD_PATH = "${aasg-pkgs.guile-json}/share/guile/site";
      GUILE_COMPILED_LOAD_PATH = "${aasg-pkgs.guile-json}/share/guile/site/site-ccache";
    } ''
    cd ${src}
    export HAUNT_DESTDIR=$out
    haunt build
  '';
  ciDeps = with pkgs; [ ipfs ipfs-cluster libarchive ];
in
pkgs.recurseIntoAttrs (drv // { inherit ciDeps; })