diff --git a/overlays.nix b/overlays.nix
index 837bb9082beeb17515b924f26b5bd043c9e26e8a..25a69fb11a199e50b0662fd2654d41b733c272d0 100644
--- a/overlays.nix
+++ b/overlays.nix
@@ -5,18 +5,20 @@ self: super: {
 
   python27 = super.python27.override {
     packageOverrides = python-self: python-super: {
-      # A newer version of Hypothesis is required for compatibility with the
-      # typing module which gets pulled in by some dependency or other.
-      #
-      # A bug report filed against nixpkgs -
-      # https://github.com/NixOS/nixpkgs/issues/70431
-      hypothesis = python-super.callPackage ./hypothesis.nix { };
-
-      # The newer hypothesis requires a newer attrs.
-      attrs = python-super.callPackage ./attrs.nix { };
-
-      # The newer hypothesis or attrs breaks the pytest test suite.
-      pytest = python-super.callPackage ./pytest.nix { };
+      # # A newer version of Hypothesis is required for compatibility with the
+      # # typing module which gets pulled in by some dependency or other.
+      # #
+      # # A bug report filed against nixpkgs -
+      # # https://github.com/NixOS/nixpkgs/issues/70431
+      # hypothesis = python-super.callPackage ./hypothesis.nix { };
+
+      # # The newer hypothesis requires a newer attrs.
+      # attrs = python-super.callPackage ./attrs.nix { };
+
+      # # The newer hypothesis or attrs breaks the pytest test suite.
+      # pytest = python-super.callPackage ./pytest.nix { };
+
+      typing = python-super.callPackage ./typing.nix { };
 
       # new tahoe-lafs dependency
       eliot = python-super.callPackage ./eliot.nix { };
diff --git a/typing.nix b/typing.nix
new file mode 100644
index 0000000000000000000000000000000000000000..84c08746f9fdc6bc19bd121e37f168febefb2025
--- /dev/null
+++ b/typing.nix
@@ -0,0 +1,30 @@
+{ lib, buildPythonPackage, fetchPypi, pythonOlder, isPy3k, isPyPy, python }:
+
+let
+  testDir = if isPy3k then "src" else "python2";
+
+in buildPythonPackage rec {
+  pname = "typing";
+  version = "3.6.6";
+
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "sha256:0ba9acs4awx15bf9v3nrs781msbd2nx826906nj6fqks2bvca9s0";
+  };
+
+  # Error for Python3.6: ImportError: cannot import name 'ann_module'
+  # See https://github.com/python/typing/pull/280
+  # Also, don't bother on PyPy: AssertionError: TypeError not raised
+  doCheck = pythonOlder "3.6" && !isPyPy;
+
+  checkPhase = ''
+    cd ${testDir}
+    ${python.interpreter} -m unittest discover
+  '';
+
+  meta = with lib; {
+    description = "Backport of typing module to Python versions older than 3.5";
+    homepage = https://docs.python.org/3/library/typing.html;
+    license = licenses.psfl;
+  };
+}