~aasg/haunted-blog

eeed5686b294c51d3e35fdd982f51da1c91c47ba — Aluísio Augusto Silva Gonçalves 7 months ago ddc3946
Publish SPDX licensing metadata
2 files changed, 31 insertions(+), 11 deletions(-)

M default.nix
M pages/about-site.md
M default.nix => default.nix +28 -11
@@ 8,27 8,44 @@
    (
      pkgs.nix-gitignore.gitignoreFilter ''
        /*
        # For building
        !/haunt.scm
        !/assets/
        !/pages/
        !/posts/
        !/scm/
        !/static/
        # For licensing information
        !/*.nix
        !/LICENSES/
        !/.reuse/
      '' ./.
    ) ./.
}:
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
  '';
  drv = pkgs.stdenvNoCC.mkDerivation {
    name = "aasg-blog";
    inherit src;

    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";

    nativeBuildInputs = [ aasg-pkgs.haunt pkgs.pandoc pkgs.reuse ];
    buildPhase = ''
      cd $src
      export HAUNT_DESTDIR=$out
      haunt build
      reuse spdx -o $out/files/reuse.spdx
    '';

    doCheck = true;
    checkPhase = ''
      reuse --root=${src} lint
    '';

    dontInstall = true;
  };
  ciDeps = with pkgs; [ ipfs ipfs-cluster libarchive ];
in
pkgs.recurseIntoAttrs (drv // { inherit ciDeps; })

M pages/about-site.md => pages/about-site.md +3 -0
@@ 11,6 11,8 @@ Fragments of software source code are in addition released under the [CC0 1.0 Un

The source code for the programs that build this website is © 2020 Aluísio Augusto Silva Gonçalves and can be redistributed and/or modified under the terms of the [GNU General Public License, version 3][GPL] or (at your option) any later version published by the Free Software Foundation.

We also publish the complete [licensing information] for this site's source, in SPDX format.

[Automated builds]: https://builds.sr.ht/~aasg/haunted-blog
[CC-BY-SA]: https://creativecommons.org/licenses/by-sa/4.0/
[CC0]: https://creativecommons.org/publicdomain/zero/1.0/


@@ 18,6 20,7 @@ The source code for the programs that build this website is © 2020 Aluísio Aug
[GPL]: https://www.gnu.org/licenses/gpl-3.0.html
[Haunt]: https://dthompson.us/projects/haunt.html
[IPFS]: https://ipfs.io
[Licensing information]: files/reuse.spdx
[Nix]: https://nixos.org
[Source code]: https://git.sr.ht/~aasg/haunted-blog
[Sourcehut]: https://sourcehut.org