spelling.nix

 1{ pkgs, src }:
 2
 3pkgs.runCommand "spelling"
 4  {
 5    inherit src;
 6    nativeBuildInputs = with pkgs; [ codespell ];
 7    description = "Check for spelling mistakes";
 8  }
 9  ''
10    pushd $src
11    codespell --check-hidden */**
12    popd
13    touch $out
14  ''