Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)

haskellPackages.shellFor: fix after recent getHaskellBuildInputs fix.

Fixes #45318

(cherry picked from commit b00b2363b3de547eaeed6dd792e2a2232d2b9215)

+11 -8
+9 -6
pkgs/development/haskell-modules/lib.nix
··· 292 overrideSrc = drv: { src, version ? drv.version }: 293 overrideCabal drv (_: { inherit src version; editedCabalFile = null; }); 294 295 # Extract the haskell build inputs of a haskell package. 296 # This is useful to build environments for developing on that 297 # package. 298 - getHaskellBuildInputs = p: 299 - (overrideCabal p (args: { 300 - passthru = (args.passthru or {}) // { 301 - _getHaskellBuildInputs = (extractBuildInputs p.compiler args).haskellBuildInputs; 302 - }; 303 - }))._getHaskellBuildInputs; 304 305 # Under normal evaluation, simply return the original package. Under 306 # nix-shell evaluation, return a nix-shell optimized environment.
··· 292 overrideSrc = drv: { src, version ? drv.version }: 293 overrideCabal drv (_: { inherit src version; editedCabalFile = null; }); 294 295 + # Get all of the build inputs of a haskell package, divided by category. 296 + getBuildInputs = p: 297 + (overrideCabal p (args: { 298 + passthru = (args.passthru or {}) // { 299 + _getBuildInputs = extractBuildInputs p.compiler args; 300 + }; 301 + }))._getBuildInputs; 302 + 303 # Extract the haskell build inputs of a haskell package. 304 # This is useful to build environments for developing on that 305 # package. 306 + getHaskellBuildInputs = p: (getBuildInputs p).haskellBuildInputs; 307 308 # Under normal evaluation, simply return the original package. Under 309 # nix-shell evaluation, return a nix-shell optimized environment.
+2 -2
pkgs/development/haskell-modules/make-package-set.nix
··· 38 inherit (stdenv) buildPlatform hostPlatform; 39 40 inherit (stdenv.lib) fix' extends makeOverridable; 41 - inherit (haskellLib) overrideCabal getHaskellBuildInputs; 42 43 mkDerivationImpl = pkgs.callPackage ./generic-builder.nix { 44 inherit stdenv; ··· 228 shellFor = { packages, withHoogle ? false, ... } @ args: 229 let 230 selected = packages self; 231 - packageInputs = builtins.map getHaskellBuildInputs selected; 232 haskellInputs = 233 builtins.filter 234 (input: pkgs.lib.all (p: input.outPath != p.outPath) selected)
··· 38 inherit (stdenv) buildPlatform hostPlatform; 39 40 inherit (stdenv.lib) fix' extends makeOverridable; 41 + inherit (haskellLib) overrideCabal getBuildInputs; 42 43 mkDerivationImpl = pkgs.callPackage ./generic-builder.nix { 44 inherit stdenv; ··· 228 shellFor = { packages, withHoogle ? false, ... } @ args: 229 let 230 selected = packages self; 231 + packageInputs = builtins.map getBuildInputs selected; 232 haskellInputs = 233 builtins.filter 234 (input: pkgs.lib.all (p: input.outPath != p.outPath) selected)