Skip to content

Commit 02ce8ab

Browse files
committed
Fix debug builds
1 parent ba55562 commit 02ce8ab

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

builder/comp-builder.nix

+3-3
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,8 @@ let
110110

111111
ghc = (if enableDWARF then (x: x.dwarf) else (x: x)) (
112112
(if smallAddressSpace then (x: x.smallAddressSpace) else (x: x)) defaults.ghc);
113-
setup = (if enableDWARF then (x: x.dwarf) else (x: x)) (
114-
(if smallAddressSpace then (x: x.smallAddressSpace) else (x: x)) drvArgs.setup);
113+
setup = (if enableDWARF then (x: x.dwarf or x) else (x: x)) (
114+
(if smallAddressSpace then (x: x.smallAddressSpace or x) else (x: x)) drvArgs.setup);
115115

116116
# TODO fix cabal wildcard support so hpack wildcards can be mapped to cabal wildcards
117117
canCleanSource = !(cabal-generator == "hpack" && !(package.cleanHpack or false));
@@ -285,7 +285,7 @@ let
285285

286286
enableParallelBuilding = true;
287287

288-
SETUP_HS = setup;
288+
SETUP_HS = setup + (if setup.isCabal or false then "/bin/cabal act-as-setup --build-type=Simple --" else "/bin/Setup");
289289

290290
inherit cabalFile;
291291
passAsFile = [ "cabalFile" ];

builder/hspkg-builder.nix

+2-2
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ let
3535

3636
setup = if package.buildType == "Simple"
3737
then
38-
buildPackages.haskell-nix.nix-tools-unchecked.exes.cabal + "/bin/cabal act-as-setup --build-type=Simple --"
38+
buildPackages.haskell-nix.nix-tools-unchecked.exes.cabal // { isCabal = true; }
3939
else setup-builder ({
4040
component = components.setup // {
4141
depends = config.setup-depends ++ components.setup.depends ++ package.setup-depends;
@@ -46,7 +46,7 @@ let
4646
inherit (pkg) preUnpack postUnpack prePatch postPatch;
4747
} // lib.optionalAttrs (package.buildType != "Custom") {
4848
nonReinstallablePkgs = ["base" "Cabal"];
49-
}) + "/bin/Setup";
49+
});
5050

5151
buildComp = allComponent: componentId: component: comp-builder {
5252
inherit allComponent componentId component package name src flags setup cabalFile cabal-generator patches

0 commit comments

Comments
 (0)