@@ -1,4 +1,4 @@
1−{ lib, stdenv, glibcLocales, pkgconfig, ghcForComponent, makeConfigFiles, hsPkgs, hoogleLocal, haskellLib, buildPackages, compiler }:
1+{ lib, stdenv, mkShell, glibcLocales, pkgconfig, ghcForComponent, makeConfigFiles, hsPkgs, hoogleLocal, haskellLib, buildPackages, compiler }:
3{ # `packages` function selects packages that will be worked on in the shell itself.
3{ # `packages` function selects packages that will be worked on in the shell itself.
4 # These packages will not be built by `shellFor`, but their
4 # These packages will not be built by `shellFor`, but their
@@ -20,7 +20,6 @@
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
24, ... } @ args:
23, ... } @ args:
@@ -117,19 +116,17 @@ let
120− mkDrvArgs = builtins.removeAttrs args ["packages" "additional" "withHoogle" "tools" "otherShells"];
119+ mkDrvArgs = builtins.removeAttrs args ["packages" "additional" "withHoogle" "tools"];
122− stdenv.mkDerivation (mkDrvArgs // {
121+ mkShell (mkDrvArgs // {
123 name = mkDrvArgs.name or name;
122 name = mkDrvArgs.name or name;
125 buildInputs = systemInputs
124 buildInputs = systemInputs
126− ++ mkDrvArgs.buildInputs or []
125+ ++ mkDrvArgs.buildInputs or [];
127− ++ lib.concatMap (s: s.buildInputs) otherShells;
128 nativeBuildInputs = [ ghcEnv ]
126 nativeBuildInputs = [ ghcEnv ]
129 ++ nativeBuildInputs
127 ++ nativeBuildInputs
130 ++ mkDrvArgs.nativeBuildInputs or []
128 ++ mkDrvArgs.nativeBuildInputs or []
131 ++ lib.attrValues (buildPackages.haskell-nix.tools compiler.nix-name tools)
129 ++ lib.attrValues (buildPackages.haskell-nix.tools compiler.nix-name tools)
132− ++ lib.concatMap (s: s.nativeBuildInputs) otherShells
133 # If this shell is a cross compilation shell include
130 # If this shell is a cross compilation shell include
134 # wrapper script for running cabal build with appropriate args.
131 # wrapper script for running cabal build with appropriate args.
135 ++ lib.optional (ghcEnv.targetPrefix != "") (
132 ++ lib.optional (ghcEnv.targetPrefix != "") (