diff --git a/CHANGELOG.md b/CHANGELOG.md
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -5,6 +5,14 @@
 
 The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
 
+## 0.3.5.1 - 2023-03-06
+
+### Added
+
+ - Nix 2.14 support
+
+ - Nix 2.13 support
+
 ## 0.3.5.0 - 2022-12-29
 
 ### Added
diff --git a/hercules-ci-cnix-expr.cabal b/hercules-ci-cnix-expr.cabal
--- a/hercules-ci-cnix-expr.cabal
+++ b/hercules-ci-cnix-expr.cabal
@@ -1,7 +1,7 @@
 cabal-version: 2.4
 
 name:           hercules-ci-cnix-expr
-version:        0.3.5.0
+version:        0.3.5.1
 synopsis:       Bindings for the Nix evaluator
 category:       Nix, CI, Testing, DevOps
 homepage:       https://docs.hercules-ci.com
@@ -68,8 +68,8 @@
 
 custom-setup
   setup-depends:
-    base
-    , Cabal >= 2.2.0.0
+    base < 5
+    , Cabal >= 2.2.0.0 && < 4
     , cabal-pkg-config-version-hook
 
 
diff --git a/src/Hercules/CNix/Expr.hs b/src/Hercules/CNix/Expr.hs
--- a/src/Hercules/CNix/Expr.hs
+++ b/src/Hercules/CNix/Expr.hs
@@ -343,7 +343,9 @@
             // case to return true when it is not a bool. That logic was added
             // because an empty attrset was found here, observed in
             // nixpkgs master 67e2de195a4aa0a50ffb1e1ba0b4fb531dca67dc
-#if NIX_IS_AT_LEAST(2,9,0)
+#if NIX_IS_AT_LEAST(2,14,0)
+            return evalState.forceBool(*iter->value, iter->pos, "while evaluating whether to traverse into an attribute set to find more derivations");
+#elif NIX_IS_AT_LEAST(2,9,0)
             return evalState.forceBool(*iter->value, iter->pos);
 #else
             return evalState.forceBool(*iter->value, *iter->pos);
@@ -510,7 +512,11 @@
         nix::flake::LockFlags {
           .updateLockFile = false,
           .useRegistries = false,
+#if NIX_IS_AT_LEAST(2,13,0)
+          .allowUnlocked = false,
+#else
           .allowMutable = false,
+#endif
         }),
       *r);
     return r;
@@ -531,7 +537,11 @@
         nix::flake::LockFlags {
           .updateLockFile = false,
           .useRegistries = false,
+#if NIX_IS_AT_LEAST(2,13,0)
+          .allowUnlocked = false,
+#else
           .allowMutable = false,
+#endif
         }),
       *r);
     return r;
@@ -562,7 +572,11 @@
         nix::flake::LockFlags {
           .updateLockFile = false,
           .useRegistries = false,
+#if NIX_IS_AT_LEAST(2,13,0)
+          .allowUnlocked = false,
+#else
           .allowMutable = false,
+#endif
         }),
       *r);
     return r;
