diff --git a/CHANGELOG b/CHANGELOG
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,6 @@
+- 0.1.1.0
+    * Allow use with Cabal >= 1.22
+
 - 0.1.0.1
     * Add links to github in cabal file
     * Tweak project description
diff --git a/cabal-dependency-licenses.cabal b/cabal-dependency-licenses.cabal
--- a/cabal-dependency-licenses.cabal
+++ b/cabal-dependency-licenses.cabal
@@ -1,5 +1,5 @@
 Name:     cabal-dependency-licenses
-Version:  0.1.0.1
+Version:  0.1.1.0
 Synopsis: Compose a list of a project's transitive dependencies with their licenses
 
 Description:
@@ -24,7 +24,7 @@
   Ghc-options:         -Wall
 
   Build-depends:
-    Cabal      >= 1.20 && < 1.21,
+    Cabal      >= 1.20 && < 1.23,
     containers >= 0.5  && < 0.6,
     base       >= 4    && < 5,
     directory  >= 1.2  && < 1.3,
diff --git a/src/Main.hs b/src/Main.hs
--- a/src/Main.hs
+++ b/src/Main.hs
@@ -1,3 +1,4 @@
+{-# LANGUAGE CPP #-}
 --------------------------------------------------------------------------------
 module Main
     ( main
@@ -35,10 +36,15 @@
     contents <- getDirectoryContents "."
     return $ any ((== ".cabal") . takeExtension) contents
 
-
 --------------------------------------------------------------------------------
+#if MIN_VERSION_Cabal(1,22,0)
+type PackageIndex a = Cabal.PackageIndex (InstalledPackageInfo.InstalledPackageInfo_ a)
+#else
+type PackageIndex a = Cabal.PackageIndex
+#endif
+
 findTransitiveDependencies
-    :: Cabal.PackageIndex
+    :: PackageIndex a
     -> Set Cabal.InstalledPackageId
     -> Set Cabal.InstalledPackageId
 findTransitiveDependencies pkgIdx set0 = go Set.empty (Set.toList set0)
