~aasg/haunted-blog

8c0e41e00bd8793b356a085f6b512147a5243722 — Aluísio Augusto Silva Gonçalves 7 months ago eeed568
ci: Move REUSE lint to CI and check that src is buildable
2 files changed, 9 insertions(+), 6 deletions(-)

M .build.yml
M default.nix
M .build.yml => .build.yml +8 -0
@@ 19,6 19,14 @@ tasks:
      nix-env --file haunted-blog --install --attr ciDeps
  - build: |
      nix-build haunted-blog
  - check: |
      # Verify that the source specified in default.nix is enough to
      # build the package.  We can't compare the results, though, due
      # to timestamps present in the output.
      src=$(nix eval --raw --file haunted-blog src)
      nix-build --no-out-link "$src"
      # Verify that the source is REUSE-compliant.
      reuse --root=haunted-blog lint
  - package: |
      result=$(realpath result)
      bsdtar -caf ~/site.tar.zst --format=rpax --strip-components=3 "$result"

M default.nix => default.nix +1 -6
@@ 39,13 39,8 @@ let
      reuse spdx -o $out/files/reuse.spdx
    '';

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

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