diff --git a/gbs-downloader.cabal b/gbs-downloader.cabal
index 8d377001b6a0f7437ef008f13a615b2108909641..d247f4e8ce613b685b1c4b6a74450669ce2e4e6d 100644
--- a/gbs-downloader.cabal
+++ b/gbs-downloader.cabal
@@ -75,7 +75,7 @@ library
     , language
 
   -- Modules exported by the library.
-  exposed-modules:  Tahoe.Download
+  exposed-modules:   Tahoe.Download
 
   -- Modules included in this library but not exported.
   -- other-modules:
@@ -94,10 +94,16 @@ library
     , text
 
   -- Directories containing source files.
-  hs-source-dirs:   src
+  hs-source-dirs:    src
 
   -- Base language which the package is written in.
-  default-language: Haskell2010
+  default-language:  Haskell2010
+
+  -- We don't directly depend on zlib but we transitively depend on it through
+  -- some Haskell library that (I think) doesn't bother to declare a pkgconfig
+  -- dependency - so the build fails if zlib isn't in just the right place
+  -- unless we add this.
+  pkgconfig-depends: zlib
 
 executable gbs-download
   -- Import common warning flags.