diff --git a/CHANGELOG.md b/CHANGELOG.md
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -5,6 +5,16 @@
 The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
 and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
 
+## [0.9.6] - 2022-06-21
+
+### Added
+
+ - Nix 2.9 support
+
+### Fixed
+
+ - Missing file in hackage sdist
+
 ## [0.9.5] - 2022-05-17
 
 ### Added
diff --git a/cbits/hercules-error.hh b/cbits/hercules-error.hh
new file mode 100644
--- /dev/null
+++ b/cbits/hercules-error.hh
@@ -0,0 +1,15 @@
+#include <nix/config.h>
+#include <nix/store-api.hh>
+#include <string>
+
+namespace hercules {
+
+class HerculesBuildError : public nix::BuildError {
+public:
+    nix::StorePath drv;
+    HerculesBuildError(const std::string msg, nix::StorePath drv) : BuildError(msg), drv(drv) {};
+};
+
+void copyErrorStrings(const nix::Error &err, const char **msg, const char **trace) noexcept;
+
+}
diff --git a/hercules-ci-agent-worker/Hercules/Agent/Worker/Evaluate.hs b/hercules-ci-agent-worker/Hercules/Agent/Worker/Evaluate.hs
--- a/hercules-ci-agent-worker/Hercules/Agent/Worker/Evaluate.hs
+++ b/hercules-ci-agent-worker/Hercules/Agent/Worker/Evaluate.hs
@@ -470,7 +470,7 @@
               if isDeriv
                 then walkDerivation store evalState False path attrValue
                 else do
-                  attrs <- liftIO $ getAttrs attrValue
+                  attrs <- liftIO $ getAttrs evalState attrValue
                   void $
                     flip M.traverseWithKey attrs $
                       \name value ->
@@ -605,7 +605,7 @@
                           x <- liftIO (autoCallFunction evalState v autoArgs)
                           walk' True path (depthRemaining - 1) x
                         else do
-                          attrs <- liftIO $ getAttrs attrValue
+                          attrs <- liftIO $ getAttrs evalState attrValue
                           void $
                             flip M.traverseWithKey attrs $
                               \name value ->
diff --git a/hercules-ci-agent.cabal b/hercules-ci-agent.cabal
--- a/hercules-ci-agent.cabal
+++ b/hercules-ci-agent.cabal
@@ -1,7 +1,7 @@
 cabal-version: 2.4
 
 name:           hercules-ci-agent
-version:        0.9.5
+version:        0.9.6
 synopsis:       Runs Continuous Integration tasks on your machines
 category:       Nix, CI, Testing, DevOps
 homepage:       https://docs.hercules-ci.com
@@ -14,6 +14,7 @@
 extra-source-files:
     CHANGELOG.md
     cbits/hercules-aliases.h
+    cbits/hercules-error.hh
     cbits/hercules-logger.hh
     cbits/nix-2.4/hercules-store.hh
     testdata/vm-test-run-agent-test.drv
