diff --git a/horizon.dhall b/horizon.dhall
index 83feb64bc5cf804a1c69a59fb0896ebfa4e567c0..8e3973305a6470a9e859c3611aba232d86c18d62 100644
--- a/horizon.dhall
+++ b/horizon.dhall
@@ -147,6 +147,7 @@ let otherLibraries =
       , H.callHackage "dependent-sum-template" "0.1.1.1"
       , H.callHackage "deriving-compat" "0.6.1"
       , H.callHackage "dictionary-sharing" "0.1.0.0"
+      , H.callHackage "doctest-discover" "0.2.0.0"
       , H.callHackage "dom-lt" "0.2.3"
       , H.callCabal2nix
           "flat"
diff --git a/overlay.nix b/overlay.nix
index f059e3c50f6d77a8d5fa3d50aa97e99d97fa9c8a..34058349cc0f5dbf378e642df0fd0a20bc432726 100644
--- a/overlay.nix
+++ b/overlay.nix
@@ -99,6 +99,8 @@ final: prev: with pkgs.haskell.lib; {
 
   dictionary-sharing = final.callPackage (./pkgs/dictionary-sharing.nix) { };
 
+  doctest-discover = final.callPackage (./pkgs/doctest-discover.nix) { };
+
   dom-lt = final.callPackage (./pkgs/dom-lt.nix) { };
 
   flat = final.callPackage (./pkgs/flat.nix) { };
diff --git a/pkgs/doctest-discover.nix b/pkgs/doctest-discover.nix
new file mode 100644
index 0000000000000000000000000000000000000000..58a61a454920bba09aacc438878f7552473d3825
--- /dev/null
+++ b/pkgs/doctest-discover.nix
@@ -0,0 +1,45 @@
+{ mkDerivation
+, aeson
+, base
+, bytestring
+, directory
+, doctest
+, filepath
+, lib
+}:
+mkDerivation {
+  pname = "doctest-discover";
+  version = "0.2.0.0";
+  sha256 = "a953aa50837e52efc766a77e382c2be2acbc887fa6dadbc54b756f59d6c49ec8";
+  isLibrary = true;
+  isExecutable = true;
+  enableSeparateDataOutput = false;
+  libraryHaskellDepends = [
+    aeson
+    base
+    bytestring
+    directory
+    doctest
+    filepath
+  ];
+  executableHaskellDepends = [
+    aeson
+    base
+    bytestring
+    directory
+    doctest
+    filepath
+  ];
+  testHaskellDepends = [ base doctest ];
+  enableLibraryProfiling = true;
+  enableExecutableProfiling = true;
+  doHaddock = false;
+  jailbreak = true;
+  doCheck = false;
+  doBenchmark = false;
+  hyperlinkSource = false;
+  homepage = "http://github.com/karun012/doctest-discover";
+  description = "Easy way to run doctests via cabal";
+  license = lib.licenses.publicDomain;
+  broken = false;
+}