diff --git a/CHANGELOG.md b/CHANGELOG.md
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -5,6 +5,12 @@
 
 The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
 
+## 0.3.2.0 - 2022-05-17
+
+### Added
+
+ - Nix 2.8 support
+
 ## 0.3.1.0 - 2022-04-08
 
 ### Added
diff --git a/hercules-ci-cnix-store.cabal b/hercules-ci-cnix-store.cabal
--- a/hercules-ci-cnix-store.cabal
+++ b/hercules-ci-cnix-store.cabal
@@ -1,7 +1,7 @@
 cabal-version: 2.4
 
 name:           hercules-ci-cnix-store
-version:        0.3.1.0
+version:        0.3.2.0
 synopsis:       Haskell bindings for Nix's libstore
 category:       Nix
 homepage:       https://docs.hercules-ci.com
@@ -76,8 +76,8 @@
   include-dirs:
       include
   pkgconfig-depends:
-      nix-store >= 2.4 && < 2.8
-    , nix-main >= 2.4 && < 2.8
+      nix-store >= 2.4 && < 2.9
+    , nix-main >= 2.4 && < 2.9
   install-includes:
       hercules-ci-cnix/store.hxx
   hs-source-dirs: src
diff --git a/src/Hercules/CNix/Store.hs b/src/Hercules/CNix/Store.hs
--- a/src/Hercules/CNix/Store.hs
+++ b/src/Hercules/CNix/Store.hs
@@ -1,4 +1,5 @@
 {-# LANGUAGE BlockArguments #-}
+{-# LANGUAGE CPP #-}
 {-# LANGUAGE FlexibleInstances #-}
 {-# LANGUAGE QuasiQuotes #-}
 {-# LANGUAGE ScopedTypeVariables #-}
@@ -527,7 +528,18 @@
                       [&](DerivationOutputDeferred) -> void {
                         typ = 3;
                       },
-                    }, i->second.output);
+#if NIX_IS_AT_LEAST(2,8,0)
+                      [&](DerivationOutputImpure) -> void {
+                        typ = 4;
+                      },
+#endif
+                    },
+#if NIX_IS_AT_LEAST(2,8,0)
+                      i->second.raw()
+#else
+                      i->second.output
+#endif
+                    );
                     i++;
                   }|]
                   name <- unsafePackMallocCString =<< peek nameP
@@ -556,6 +568,7 @@
                       fim <- getFileIngestionMethod
                       pure $ DerivationOutputCAFloating fim hashType
                     3 -> pure DerivationOutputDeferred
+                    4 -> panic "getDerivationOutputs: impure derivations not supported yet"
                     _ -> panic "getDerivationOutputs: impossible getDerivationOutputs typ"
                   pure
                     ( DerivationOutput
