diff --git a/pkgs/development/haskell-modules/configuration-ghc-8.10.x.nix b/pkgs/development/haskell-modules/configuration-ghc-8.10.x.nix
index 975aeb42acec..466e25270193 100644
--- a/pkgs/development/haskell-modules/configuration-ghc-8.10.x.nix
+++ b/pkgs/development/haskell-modules/configuration-ghc-8.10.x.nix
@@ -102,4 +102,7 @@ self: super: {
 
   # ormolu 0.3 requires Cabal == 3.4
   ormolu = super.ormolu_0_2_0_0;
+
+  # weeder 2.3.0 no longer supports GHC 8.10
+  weeder = doDistribute (doJailbreak self.weeder_2_2_0);
 }
diff --git a/pkgs/development/haskell-modules/configuration-hackage2nix/main.yaml b/pkgs/development/haskell-modules/configuration-hackage2nix/main.yaml
index 6b78a97a9468..e8bce3d41949 100644
--- a/pkgs/development/haskell-modules/configuration-hackage2nix/main.yaml
+++ b/pkgs/development/haskell-modules/configuration-hackage2nix/main.yaml
@@ -120,6 +120,7 @@ extra-packages:
   - ormolu == 0.2.*                     # 2022-02-21: For ghc 8.8 and 8.10
   - ghc-exactprint == 1.4.*             # 2022-02-07: preserve for now, 1.5.0 has a breaking change without type changes
   - ShellCheck == 0.7.2                 # 2022-02-20: haskell-ci 0.14 needs this
+  - weeder == 2.2.*                     # 2022-02-21: preserve for GHC 8.10.7
 
 package-maintainers:
   abbradar:
diff --git a/pkgs/development/haskell-modules/hackage-packages.nix b/pkgs/development/haskell-modules/hackage-packages.nix
index 83790ea161dd..a4dfc1c5e550 100644
--- a/pkgs/development/haskell-modules/hackage-packages.nix
+++ b/pkgs/development/haskell-modules/hackage-packages.nix
@@ -288980,6 +288980,32 @@ self: {
        broken = true;
      }) {};
 
+  "weeder_2_2_0" = callPackage
+    ({ mkDerivation, algebraic-graphs, base, bytestring, containers
+     , dhall, directory, filepath, generic-lens, ghc, lens, mtl
+     , optparse-applicative, regex-tdfa, text, transformers
+     }:
+     mkDerivation {
+       pname = "weeder";
+       version = "2.2.0";
+       sha256 = "07ylcq8mza4429snaklhfszpg2c0xcp75hyf0jxhi32mpiz7a5v2";
+       isLibrary = true;
+       isExecutable = true;
+       libraryHaskellDepends = [
+         algebraic-graphs base bytestring containers dhall directory
+         filepath generic-lens ghc lens mtl optparse-applicative regex-tdfa
+         text transformers
+       ];
+       executableHaskellDepends = [
+         base bytestring containers directory filepath ghc
+         optparse-applicative transformers
+       ];
+       description = "Detect dead code";
+       license = lib.licenses.bsd3;
+       hydraPlatforms = lib.platforms.none;
+       maintainers = with lib.maintainers; [ maralorn ];
+     }) {};
+
   "weeder" = callPackage
     ({ mkDerivation, algebraic-graphs, base, bytestring, containers
      , dhall, directory, filepath, generic-lens, ghc, lens, mtl