mirror of
https://github.com/ilyakooo0/haskell.nix.git
synced 2024-09-11 06:55:40 +03:00
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-...`.
43 lines
1.1 KiB
Plaintext
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
|