haskell.nix/test/cabal-sublib/cabal-sublib.cabal
Hamish Mackenzie 2b7d93baf6
Allow package-name:sublib-name in build-depends (#963)
With cabal 3 it should be possible to reference a sublib in the
`build-depends` of a `.cabal` file using `package-name:sublib-name`

The `cabal-sublib` test is updated to include the new type syntax
and a fix is included for the component builder.

We will need to update `plan-to-nix` in `nix-tools` as well.
For now the work around is to use a module to add the sublib to
`depends` (see `test/cabal-sublib/default.nix`).

Without this fix the `cabal-sublib:slib` was not found by
`setup configure` because only `--dependency=slib=cabal-sublib-...`
was passed.  The fix is to also pass
`--dependency=cabal-sublib:slib=cabal-sublib-...`.
2021-01-08 23:11:16 +13:00

43 lines
1.1 KiB
Plaintext

cabal-version: 3.0
-- Initial package description 'cabal-simple.cabal' generated by 'cabal
-- init'. For further documentation, see
-- http://haskell.org/cabal/users-guide/
name: cabal-sublib
version: 0.1.0.0
-- synopsis:
-- description:
-- bug-reports:
license: MIT
author: Moritz Angermann
maintainer: moritz.angermann@iohk.io
-- category:
build-type: Simple
library
-- exposed-modules:
-- other-modules:
-- other-extensions:
build-depends: base
, slib
-- hs-source-dirs:
default-language: Haskell2010
library slib
build-depends: extra
, safe
, aeson
default-language: Haskell2010
executable cabal-sublib
main-is: Main.hs
-- other-modules:
-- other-extensions:
build-depends: base
, cabal-sublib
, cabal-sublib:slib
, extra
, optparse-applicative
-- hs-source-dirs:
default-language: Haskell2010