diff --git a/dhall-nix.cabal b/dhall-nix.cabal
--- a/dhall-nix.cabal
+++ b/dhall-nix.cabal
@@ -1,5 +1,5 @@
 Name: dhall-nix
-Version: 1.1.17
+Version: 1.1.18
 Cabal-Version: >=1.10
 Build-Type: Simple
 Tested-With: GHC == 8.0.1
@@ -30,8 +30,8 @@
         base                      >= 4.11.0.0 && < 5   ,
         containers                               < 0.7 ,
         data-fix                                 < 0.4 ,
-        dhall                     >= 1.35     && < 1.36,
-        hnix                      >= 0.7      && < 0.10,
+        dhall                     >= 1.36     && < 1.37,
+        hnix                      >= 0.7      && < 0.11,
         lens-family-core          >= 1.0.0    && < 2.2 ,
         neat-interpolation                       < 0.6 ,
         text                      >= 0.8.0.0  && < 1.3
diff --git a/src/Dhall/Nix.hs b/src/Dhall/Nix.hs
--- a/src/Dhall/Nix.hs
+++ b/src/Dhall/Nix.hs
@@ -123,6 +123,7 @@
     , ($+)
     , (==>)
     , (@@)
+    , (@.)
     )
 
 import qualified Data.Text
@@ -439,6 +440,17 @@
         a' <- loop a
         b' <- loop b
         return (Fix (NBinary NPlus a' b'))
+    loop TextReplace = do
+        let from = Nix.mkList [ "needle" ]
+
+        let to = Nix.mkList [ "replacement" ]
+
+        return
+            (   "needle"
+            ==> "replacement"
+            ==> "haystack"
+            ==> ("builtins" @. "replaceStrings" @@ from @@ to @@ "haystack")
+            )
     loop TextShow = do
         let from =
                 Nix.mkList
@@ -465,7 +477,7 @@
                     , Nix.mkStr "\\t"
                     ]
 
-        let replaced = "builtins.replaceStrings" @@ from @@ to @@ "t"
+        let replaced = "builtins" @. "replaceStrings" @@ from @@ to @@ "t"
 
         let quoted = Nix.mkStr "\"" $+ replaced $+ Nix.mkStr "\""
 
