@@ -20,6 +20,7 @@
20, withHoogle ? true
20, withHoogle ? true
21, exactDeps ? false
21, exactDeps ? false
22, tools ? {}
22, tools ? {}
23+, otherShells ? [] # List of other shells to include in this one
23, ... } @ args:
24, ... } @ args:
@@ -116,18 +117,20 @@ let
119− mkDrvArgs = builtins.removeAttrs args ["packages" "additional" "withHoogle" "tools"];
120+ mkDrvArgs = builtins.removeAttrs args ["packages" "additional" "withHoogle" "tools" "otherShells"];
121 stdenv.mkDerivation (mkDrvArgs // {
122 stdenv.mkDerivation (mkDrvArgs // {
122 name = mkDrvArgs.name or name;
123 name = mkDrvArgs.name or name;
124 buildInputs = systemInputs
125 buildInputs = systemInputs
125 ++ mkDrvArgs.buildInputs or []
126 ++ mkDrvArgs.buildInputs or []
126− ++ lib.optional withHoogle' hoogleIndex;
127+ ++ lib.optional withHoogle' hoogleIndex
128+ ++ lib.concatMap (s: s.buildInputs) otherShells;
127 nativeBuildInputs = [ ghcEnv ]
129 nativeBuildInputs = [ ghcEnv ]
128 ++ nativeBuildInputs
130 ++ nativeBuildInputs
129 ++ mkDrvArgs.nativeBuildInputs or []
131 ++ mkDrvArgs.nativeBuildInputs or []
130 ++ lib.attrValues (buildPackages.haskell-nix.tools compiler.nix-name tools)
132 ++ lib.attrValues (buildPackages.haskell-nix.tools compiler.nix-name tools)
133+ ++ lib.concatMap (s: s.nativeBuildInputs) otherShells
131 # If this shell is a cross compilation shell include
134 # If this shell is a cross compilation shell include
132 # wrapper script for running cabal build with appropriate args.
135 # wrapper script for running cabal build with appropriate args.
133 ++ lib.optional (ghcEnv.targetPrefix != "") (
136 ++ lib.optional (ghcEnv.targetPrefix != "") (