diff --git a/builder/comp-builder.nix b/builder/comp-builder.nix index a57e1fe134..04f98a942f 100644 --- a/builder/comp-builder.nix +++ b/builder/comp-builder.nix @@ -28,7 +28,8 @@ let self = # (not just the one we are building). # Enable for tests in packages that use cabal-doctest. ( haskellLib.isTest componentId && - lib.any (x: x.identifier.name or "" == "cabal-doctest") (package.setup-depends ++ setup.config.depends or []) + lib.any (x: x.identifier.name or "" == "cabal-doctest") (package.setup-depends ++ setup.config.depends or []) && + lib.any (x: x.identifier.name or "" == "doctest") (package.setup-depends ++ setup.config.depends or []) ) , allComponent # Used when `configureAllComponents` is set to get a suitable configuration. diff --git a/builder/default.nix b/builder/default.nix index 27ae6f2f3e..f0c8a2858d 100644 --- a/builder/default.nix +++ b/builder/default.nix @@ -59,11 +59,7 @@ let hoogleLocal = let - # Use hoogle.nix from at least nixpkgs 22.05 - nixpkgs = if lib.versionAtLeast lib.trivial.release "22.05" - then pkgs.path - else pkgs.haskell-nix.sources.nixpkgs-2205; - nixpkgsHoogle = import (nixpkgs + /pkgs/development/haskell-modules/hoogle.nix); + nixpkgsHoogle = import "${pkgs.path}/pkgs/development/haskell-modules/hoogle.nix"; in { packages ? [], hoogle }: let haskellPackages = { diff --git a/lib/import-and-filter-project.nix b/lib/import-and-filter-project.nix index 442866a818..4af306a0fa 100644 --- a/lib/import-and-filter-project.nix +++ b/lib/import-and-filter-project.nix @@ -46,9 +46,7 @@ in project // { src = srcRoot; subDir = removePrefix "/" (removePrefix "${projectNix}" (toString oldPkg.src.content)); - includeSiblings = true; # Filtering sibling dirs of the package dir is done in the - # component builder so that relative paths can be used to - # reference project directories not in the package subDir. + includeSiblings = false; }; }; in oldPkg // { diff --git a/lib/load-cabal-plan.nix b/lib/load-cabal-plan.nix index bebdea1912..840a09779e 100644 --- a/lib/load-cabal-plan.nix +++ b/lib/load-cabal-plan.nix @@ -161,7 +161,9 @@ in { if pkgs.lib.hasPrefix ".${callProjectResults.src.origSubDir or ""}/" (p.pkg-src.path + "/") then pkgs.lib.removePrefix ".${callProjectResults.src.origSubDir or ""}" p.pkg-src.path else throw "Unexpected path ${p.pkg-src.path} expected it to start with .${callProjectResults.src.origSubDir or ""}")))); - includeSiblings = true; # Filtering sibling dirs of the package dir is done in the + includeSiblings = false; # we disable this because it is extremely slow + + # Filtering sibling dirs of the package dir is done in the # component builder so that relative paths can be used to # reference project directories not in the package subDir. };