diff --git a/flake.nix b/flake.nix
index 92c7171c322c17d966d03aefb903b4410679afa8..906f465e385912d2d41b42dcd25839467c1e02d3 100644
--- a/flake.nix
+++ b/flake.nix
@@ -87,6 +87,12 @@
               cat >cabal.project.local <<EOF
               -- This file is auto-generated by the flake devShell's shellHook.  Do
               -- not edit this file.  Make changes in flake.nix.
+              package zlib
+                -- by default the cabal build won't use pkg-config to find the
+                -- underlying zlib c library.  this will most likely cause
+                -- "cabal build" to fail (unless other steps are taken).  turn
+                -- on pkg-config so that the cabal-test app below can succeed.
+                flags: -bundled-c-zlib -non-blocking-ffi +pkg-config
               EOF
             '';
           }