cabal icon indicating copy to clipboard operation
cabal copied to clipboard

Allow 'if' for data-files section

Open augustss opened this issue 3 months ago • 2 comments

In the MicroHs cabal file I'd like to say this

data-files:
      src/runtime/*.c
      src/runtime/*.h
if impl(ghc)
   data-files:
      lib/**/*.hs
      lib/**/*.hs-boot

But when I tried it, it didn't work. It works in MicroCabal so I've managed to hack around it, but it seems like an obvious thing that should work.

augustss avatar Nov 29 '25 13:11 augustss

What is cabal sdist supposed to do? Pack all of those files or conditionally exclude some?

ffaf1 avatar Nov 29 '25 14:11 ffaf1

I'd expect cabal sdist to include all the files so it can do the the right thing when you later do cabal install of that package.

augustss avatar Dec 06 '25 17:12 augustss