Skip to content

Commit

Permalink
Test @shlevy's fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
ElvishJerricco committed Feb 28, 2018
1 parent 831ef47 commit e6bd460
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions pkgs/development/haskell-modules/make-package-set.nix
Expand Up @@ -146,16 +146,14 @@ in package-set { inherit pkgs stdenv callPackage; } self // {

# Creates a Haskell package from a source package by calling cabal2nix on the source.
callCabal2nix = name: src: args:
overrideCabal (self.callPackage (haskellSrc2nix {
let filter = path: type:
pkgs.lib.hasSuffix "${name}.cabal" path ||
pkgs.lib.hasSuffix "package.yaml" path;
in overrideCabal (self.callPackage (haskellSrc2nix {
inherit name;
src = pkgs.lib.cleanSourceWith
{ src = if pkgs.lib.canCleanSource src
then src
else pkgs.safeDiscardStringContext src;
filter = path: type:
pkgs.lib.hasSuffix "${name}.cabal" path ||
pkgs.lib.hasSuffix "package.yaml" path;
};
src = if pkgs.lib.canCleanSource src
then pkgs.lib.cleanSourceWith { inherit src filter; }
else src;
}) args) (_: { inherit src; });

# : { root : Path
Expand Down

0 comments on commit e6bd460

Please sign in to comment.