Skip to content
This repository was archived by the owner on Apr 12, 2021. It is now read-only.
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs-channels
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 9b2e0e8b0c17
Choose a base ref
...
head repository: NixOS/nixpkgs-channels
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 72deac4893a9
Choose a head ref
  • 1 commit
  • 2 files changed
  • 1 contributor

Commits on Sep 5, 2018

  1. haskellPackages.shellFor: fix after recent getHaskellBuildInputs fix.

    Fixes #45318
    
    (cherry picked from commit b00b236)
    shlevy committed Sep 5, 2018
    Copy the full SHA
    72deac4 View commit details
Showing with 11 additions and 8 deletions.
  1. +9 −6 pkgs/development/haskell-modules/lib.nix
  2. +2 −2 pkgs/development/haskell-modules/make-package-set.nix
15 changes: 9 additions & 6 deletions pkgs/development/haskell-modules/lib.nix
Original file line number Diff line number Diff line change
@@ -292,15 +292,18 @@ rec {
overrideSrc = drv: { src, version ? drv.version }:
overrideCabal drv (_: { inherit src version; editedCabalFile = null; });

# Extract the haskell build inputs of a haskell package.
# This is useful to build environments for developing on that
# package.
getHaskellBuildInputs = p:
# Get all of the build inputs of a haskell package, divided by category.
getBuildInputs = p:
(overrideCabal p (args: {
passthru = (args.passthru or {}) // {
_getHaskellBuildInputs = (extractBuildInputs p.compiler args).haskellBuildInputs;
_getBuildInputs = extractBuildInputs p.compiler args;
};
}))._getHaskellBuildInputs;
}))._getBuildInputs;

# Extract the haskell build inputs of a haskell package.
# This is useful to build environments for developing on that
# package.
getHaskellBuildInputs = p: (getBuildInputs p).haskellBuildInputs;

# Under normal evaluation, simply return the original package. Under
# nix-shell evaluation, return a nix-shell optimized environment.
4 changes: 2 additions & 2 deletions pkgs/development/haskell-modules/make-package-set.nix
Original file line number Diff line number Diff line change
@@ -38,7 +38,7 @@ let
inherit (stdenv) buildPlatform hostPlatform;

inherit (stdenv.lib) fix' extends makeOverridable;
inherit (haskellLib) overrideCabal getHaskellBuildInputs;
inherit (haskellLib) overrideCabal getBuildInputs;

mkDerivationImpl = pkgs.callPackage ./generic-builder.nix {
inherit stdenv;
@@ -228,7 +228,7 @@ in package-set { inherit pkgs stdenv callPackage; } self // {
shellFor = { packages, withHoogle ? false, ... } @ args:
let
selected = packages self;
packageInputs = builtins.map getHaskellBuildInputs selected;
packageInputs = builtins.map getBuildInputs selected;
haskellInputs =
builtins.filter
(input: pkgs.lib.all (p: input.outPath != p.outPath) selected)