From eeed5686b294c51d3e35fdd982f51da1c91c47ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alu=C3=ADsio=20Augusto=20Silva=20Gon=C3=A7alves?= Date: Tue, 14 Jul 2020 04:14:56 -0300 Subject: [PATCH] Publish SPDX licensing metadata --- default.nix | 39 ++++++++++++++++++++++++++++----------- pages/about-site.md | 3 +++ 2 files changed, 31 insertions(+), 11 deletions(-) diff --git a/default.nix b/default.nix index e1afeb4..533b146 100644 --- a/default.nix +++ b/default.nix @@ -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; }) diff --git a/pages/about-site.md b/pages/about-site.md index 3b97bb5..59225d8 100644 --- a/pages/about-site.md +++ b/pages/about-site.md @@ -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 -- 2.30.2