about summary refs log tree commit diff stats
path: root/flake.nix
diff options
context:
space:
mode:
authorAlan Pearce2024-04-18 21:58:52 +0200
committerAlan Pearce2024-04-18 21:58:52 +0200
commitbfacaf987deabe8610bcd47cd0c5780b2c3b339e (patch)
treef4c697ac9bfb43daf66824bdeccb7167d5dc0059 /flake.nix
parent7203854714190d4adee41d56fa7872eadf77d181 (diff)
downloadwebsite-bfacaf987deabe8610bcd47cd0c5780b2c3b339e.tar.lz
website-bfacaf987deabe8610bcd47cd0c5780b2c3b339e.tar.zst
website-bfacaf987deabe8610bcd47cd0c5780b2c3b339e.zip
add and check licenses
Diffstat (limited to 'flake.nix')
-rw-r--r--flake.nix4
1 files changed, 4 insertions, 0 deletions
diff --git a/flake.nix b/flake.nix
index 479e700..cd1e86d 100644
--- a/flake.nix
+++ b/flake.nix
@@ -29,6 +29,7 @@
                 gopls
                 gotools
                 go-tools
+                go-licenses
                 gomod2nix.packages.${system}.default
                 gci
                 flyctl
@@ -38,6 +39,9 @@
                 (writeShellScriptBin "watch-server" ''
                   ${pkgs.watchexec}/bin/watchexec -r -w flake.nix --shell fish 'direnv exec . watchexec -r go run ./server.go'
                 '')
+                (writeShellScriptBin "check-licenses" ''
+                  ${pkgs.go-licenses}/bin/go-licenses check --include_tests ./... --disallowed_types=restricted,forbidden
+                '')
               ] ++ nativeBuildInputs;
             };
           };