Skip to content

Commit

Permalink
Remove filter sourcing
Browse files Browse the repository at this point in the history
  • Loading branch information
lukateras committed Sep 7, 2018
1 parent 24f6c29 commit 15c500e
Showing 1 changed file with 1 addition and 23 deletions.
24 changes: 1 addition & 23 deletions makePackages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -34,29 +34,7 @@ let
extra-deps = self: super:
mapAttrs (resolveExtraDep self super) proj.extra-deps;

nixageFilter = name: type:
let
baseName = baseNameOf name;
inRoot = dirOf name == toString proj.root;
pkgStackWork = mapAttrsToList (_: locPath: locPath + "/.stack-work") proj.packages;
match = p: name == toString (proj.root + ("/" + p));
matchDir = p: type == "directory" && match p;
in ! (
matchDir ".stack-work"
|| any matchDir pkgStackWork
|| match "stack.yaml"

|| matchDir "dist"
|| matchDir "dist-newstyle"
|| inRoot && hasPrefix ".ghc.environment" baseName
|| match "cabal.project"
|| match "cabal.project.local"
);

projectSrc = cleanSourceWith {
filter = nixageFilter;
src = cleanSource proj.root;
};
projectSrc = proj.root;

mkLocalPackage = name: path:
let
Expand Down

0 comments on commit 15c500e

Please sign in to comment.