Skip to content

Commit 49a2fb9

Browse files
committed
Merge remote-tracking branch 'origin/master' into armv7a
2 parents 3521582 + c7ff32f commit 49a2fb9

File tree

4 files changed

+19
-12
lines changed

4 files changed

+19
-12
lines changed

flake.lock

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/load-cabal-plan.nix

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,15 @@ let
4747
name = pkgs.lib.removePrefix "${prefix}:" n;
4848
value = (if cabal2nixComponents == null then {} else cabal2nixComponents.${collectionName}.${name}) // {
4949
buildable = true;
50-
} // lookupDependencies hsPkgs c.depends c.exe-depends;
50+
} // lookupDependencies hsPkgs (
51+
c.depends
52+
# If plan.json uses a single unit for this package (build-type: Custom),
53+
# then it will leave the package itself out of `c.depends` for the
54+
# components of the package.
55+
# Haskell.nix builds the components separately so we need
56+
# to add the `library` component as a dependency.
57+
++ pkgs.lib.optional (p ? components && p.components ? lib) p.id
58+
) c.exe-depends;
5159
in { inherit name value; }
5260
)) components));
5361
in

test/setup-deps/pkg/src/Pkg.hs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
module Pkg where
2+
3+
foo :: Int
4+
foo = 1

test/setup-deps/pkg/src/conduit-test.hs

Lines changed: 0 additions & 5 deletions
This file was deleted.

0 commit comments

Comments
 (0)