@@ -20,6 +20,7 @@
2020, withHoogle ? true
2121, exactDeps ? false
2222, tools ? {}
23+, otherShells ? [] # List of other shells to include in this one
2324, ... } @ args:
2425
2526let
@@ -116,18 +117,20 @@ let
116117 }
117118 ));
118119
119− mkDrvArgs = builtins.removeAttrs args ["packages" "additional" "withHoogle" "tools"];
120+ mkDrvArgs = builtins.removeAttrs args ["packages" "additional" "withHoogle" "tools" "otherShells"];
120121in
121122 stdenv.mkDerivation (mkDrvArgs // {
122123 name = mkDrvArgs.name or name;
123124
124125 buildInputs = systemInputs
125126 ++ mkDrvArgs.buildInputs or []
126− ++ lib.optional withHoogle' hoogleIndex;
127+ ++ lib.optional withHoogle' hoogleIndex
128+ ++ lib.concatMap (s: s.buildInputs) otherShells;
127129 nativeBuildInputs = [ ghcEnv ]
128130 ++ nativeBuildInputs
129131 ++ mkDrvArgs.nativeBuildInputs or []
130132 ++ lib.attrValues (buildPackages.haskell-nix.tools compiler.nix-name tools)
133+ ++ lib.concatMap (s: s.nativeBuildInputs) otherShells
131134 # If this shell is a cross compilation shell include
132135 # wrapper script for running cabal build with appropriate args.
133136 ++ lib.optional (ghcEnv.targetPrefix != "") (