diff --git a/configuration.nix b/configuration.nix
index 5c9170ccccf89be8d2edda2e60b743cd0e3eaf5b..7793d14a4ba521882911f04edaa9e4d541be186c 100644
--- a/configuration.nix
+++ b/configuration.nix
@@ -11,4 +11,6 @@ final: prev: {
   splitmix = prev.callPackage ./pkgs/splitmix.nix { inherit (pkgs) testu01; };
 
   text-icu = prev.callPackage ./pkgs/text-icu.nix { inherit (pkgs) icu-i18n; };
+
+  zlib = prev.callPackage ./pkgs/zlib.nix { inherit (pkgs) zlib; };
 }
diff --git a/manifest.dhall b/manifest.dhall
index ee119e1b4c00c64668464cf32ae04de8a7983dbd..81c9da148c985c67615e273f3aa0f021749f5632 100644
--- a/manifest.dhall
+++ b/manifest.dhall
@@ -937,4 +937,5 @@ in  [ callHackage "Cabal" "3.8.1.0"
     , callHackage "xml" "1.3.14"
     , callHackage "yaml" "0.11.8.0"
     , callHackage "zip-archive" "0.4.2.2"
+    , callHackage "zlib" "0.6.3.0"
     ]
diff --git a/overlay.nix b/overlay.nix
index 8ad60a33c2f758dda1108db4dbe4b323a62bf3dc..e8fac7ebd4d853c7ee560b40cda7e1a2be738a13 100644
--- a/overlay.nix
+++ b/overlay.nix
@@ -1501,4 +1501,6 @@ self: with pkgs.haskell.lib; {
 
   zip-archive = self.callPackage (./pkgs/zip-archive.nix) { };
 
+  zlib = self.callPackage (./pkgs/zlib.nix) { };
+
 }
diff --git a/pkgs/zlib.nix b/pkgs/zlib.nix
new file mode 100644
index 0000000000000000000000000000000000000000..8fa0d9cbaca4ff53c8165b29cd4f6bf63c23777e
--- /dev/null
+++ b/pkgs/zlib.nix
@@ -0,0 +1,36 @@
+{ mkDerivation
+, base
+, bytestring
+, lib
+, QuickCheck
+, tasty
+, tasty-quickcheck
+, zlib
+}:
+mkDerivation {
+  pname = "zlib";
+  version = "0.6.3.0";
+  sha256 = "9eaa989ad4534438b5beb51c1d3a4c8f6a088fdff0b259a5394fbf39aaee04da";
+  isLibrary = true;
+  isExecutable = false;
+  enableSeparateDataOutput = false;
+  libraryHaskellDepends = [ base bytestring ];
+  librarySystemDepends = [ zlib ];
+  testHaskellDepends = [
+    base
+    bytestring
+    QuickCheck
+    tasty
+    tasty-quickcheck
+  ];
+  enableLibraryProfiling = false;
+  enableExecutableProfiling = false;
+  doHaddock = false;
+  jailbreak = true;
+  doCheck = false;
+  doBenchmark = false;
+  hyperlinkSource = false;
+  description = "Compression and decompression in the gzip and zlib formats";
+  license = lib.licenses.bsd3;
+  broken = false;
+}