--- a/pandoc.cabal
+++ b/pandoc.cabal
@@ -442,24 +442,9 @@ common common-executable
   build-depends:    pandoc
   ghc-options:      -rtsopts -with-rtsopts=-A8m -threaded
 
-library xml-light
-  import:        common-options
-  build-depends: xml                   >= 1.3.12   && < 1.4,
-                 xml-conduit           >= 1.9.1.1  && < 1.10,
-                 xml-types             >= 0.3      && < 0.4,
-                 containers            >= 0.6.0.1  && < 0.7,
-                 text                  >= 1.1.1.0  && < 2.1
-
-  hs-source-dirs:  xml-light
-  exposed-modules: Text.Pandoc.XML.Light,
-                   Text.Pandoc.XML.Light.Types,
-                   Text.Pandoc.XML.Light.Proc,
-                   Text.Pandoc.XML.Light.Output
-
 library
   import:        common-options
-  build-depends: xml-light,
-                 Glob                  >= 0.7      && < 0.11,
+  build-depends: Glob                  >= 0.7      && < 0.11,
                  JuicyPixels           >= 3.1.6.1  && < 3.4,
                  SHA                   >= 1.6      && < 1.7,
                  aeson                 >= 2.0.1.0  && < 2.2,
@@ -521,7 +506,9 @@ library
                  yaml                  >= 0.11     && < 0.12,
                  zip-archive           >= 0.2.3.4  && < 0.5,
                  zlib                  >= 0.5      && < 0.7,
-                 xml                   >= 1.3.12   && < 1.4
+                 xml                   >= 1.3.12   && < 1.4,
+                 xml-conduit           >= 1.9.1.1  && < 1.10,
+                 xml-types             >= 0.3      && < 0.4,
 
   if !os(windows)
     build-depends:  unix >= 2.4 && < 2.9
@@ -529,6 +516,7 @@ library
      cpp-options:   -DEMBED_DATA_FILES
      other-modules: Text.Pandoc.Data.BakedIn
   hs-source-dirs:  src
+                   xml-light
 
   exposed-modules: Text.Pandoc,
                    Text.Pandoc.App,
@@ -624,6 +612,10 @@ library
                    Text.Pandoc.Slides,
                    Text.Pandoc.Templates,
                    Text.Pandoc.XML,
+                   Text.Pandoc.XML.Light,
+                   Text.Pandoc.XML.Light.Types,
+                   Text.Pandoc.XML.Light.Proc,
+                   Text.Pandoc.XML.Light.Output
                    Text.Pandoc.SelfContained,
                    Text.Pandoc.Highlighting,
                    Text.Pandoc.Logging,
