diff --git a/flake.nix b/flake.nix
index 72e7dac3d07880153daef299b550ccd22605fde3..01d65c63769c028fcc7dbeaf82221e4ed9712a87 100644
--- a/flake.nix
+++ b/flake.nix
@@ -84,8 +84,13 @@
               # headers and stuff.
               export PKG_CONFIG_PATH=${pkgs.lib.makeSearchPath "lib/pkgconfig" [pkgs.zlib.dev]}
 
+              # Get (or update if we have one) a package database so cabal can
+              # solve our dependencies.
               cabal update hackage.haskell.org
-              cabal run tests
+
+              # Configure with tests enable, build the tests (if necessary),
+              # and run the default test suite.
+              cabal run --enable-tests tests
             '';
           }
         }/bin/cabal-build-and-test";