[Hackage] #218: Data-files have no way of being installed conditionally

#218: Data-files have no way of being installed conditionally ----------------------------+----------------------------------------------- Reporter: guest | Owner: Type: defect | Status: new Priority: normal | Milestone: Component: Cabal library | Version: 1.2.3.0 Severity: normal | Keywords: Difficulty: normal | Ghcversion: 6.8.2 Platform: Linux | ----------------------------+----------------------------------------------- Using cabal-1.2.3.0 and Yi, I have the following problem. For the Mac OS X Cocoa port, it has an icon which is a PDF file containing a rendered version of the Yi SVG logo, and which gets installed with it. Installing the PDF only makes sense if you are on a Mac (indeed, the PDF seems to be corrupt if you try to view it with, say, Xpdf). Right now, the yi.cabal file just reads: cabal-Version: == 1.2.3.0 tested-with: GHC==6.8.2 build-type: Custom data-files: art/yi+lambda-fat.pdf -- FIXME: Install Cocoa icon only when Cocoa configured That is, the PDF is always installed. Now, my first attempt was to read the Cabal manual and realize that the obvious solution was to just stick the data-files: field under a flag or conditional - just like the yi.cabal already does for build-depends, ghc-options, buildable, etc. But this doesn't work! Yi will still compile and build, but Cabal says: Warning: Unknown fields: data-files (line 101) Fields allowed in this section: executable, main-is, buildable, build-tools, cpp-options, cc-options, ld-options, pkgconfig-depends, frameworks, c-sources, extensions, extra-libraries, extra-lib-dirs, includes, install-includes, include-dirs, hs-source-dirs, other-modules, ghc-prof-options, ghc-shared-options, ghc-options, hugs-options, nhc98-options, jhc-options The error tells me that the conditional didn't take: gwern@localhost:1023~/bin/yi_0>locate fat|grep lambda|grep .pdf [ 4:31PM] /home/gwern/bin/yi/_darcs/pristine/art/yi+lambda-fat.pdf /home/gwern/bin/yi/art/yi+lambda-fat.pdf /home/gwern/bin/share/yi-0.3/art/yi+lambda-fat.pdf gwern@localhost:1024~/bin/yi_0> (Even though I am on Linux, and the Cocoa flag is emphatically set to False.) -- Anyway, given that what I want to do is sensible, that nowhere in the docs I've been able to find or on #haskell mentions any non-hacky solution, and that it's already supported by Cabal for other kinds of files, I think this is a pretty reasonable feature request. -- Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/218 Hackage http://haskell.org/cabal/ Hackage: Cabal and related projects

#218: Data-files have no way of being installed conditionally ----------------------------+----------------------------------------------- Reporter: guest | Owner: Type: enhancement | Status: new Priority: normal | Milestone: Component: Cabal library | Version: 1.2.3.0 Severity: normal | Resolution: Keywords: | Difficulty: normal Ghcversion: 6.8.2 | Platform: Linux ----------------------------+----------------------------------------------- Changes (by ross@soi.city.ac.uk): * type: defect => enhancement -- Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/218#comment:1 Hackage http://haskell.org/cabal/ Hackage: Cabal and related projects

#218: Data-files have no way of being installed conditionally ----------------------------+----------------------------------------------- Reporter: guest | Owner: nominolo Type: enhancement | Status: new Priority: normal | Milestone: Component: Cabal library | Version: 1.2.3.0 Severity: normal | Resolution: Keywords: | Difficulty: normal Ghcversion: 6.8.2 | Platform: Linux ----------------------------+----------------------------------------------- Changes (by duncan): * owner: => nominolo Comment: Presumably this is just a matter of changing data-files to be in the BuildInfo rather than the PackageDescription and putting in code to move it from the global section for all the existing packages that specify it there. -- Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/218#comment:2 Hackage http://haskell.org/cabal/ Hackage: Cabal and related projects

#218: Data-files have no way of being installed conditionally ----------------------------+----------------------------------------------- Reporter: guest | Owner: nominolo Type: enhancement | Status: new Priority: normal | Milestone: Cabal-1.6 Component: Cabal library | Version: 1.2.3.0 Severity: normal | Resolution: Keywords: | Difficulty: normal Ghcversion: 6.8.2 | Platform: Linux ----------------------------+----------------------------------------------- Changes (by duncan): * milestone: => Cabal-1.6 -- Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/218#comment:3 Hackage http://haskell.org/cabal/ Hackage: Cabal and related projects

#218: Data-files have no way of being installed conditionally ----------------------------+----------------------------------------------- Reporter: guest | Owner: nominolo Type: enhancement | Status: new Priority: normal | Milestone: Cabal-1.8 Component: Cabal library | Version: 1.2.3.0 Severity: normal | Resolution: Keywords: | Difficulty: normal Ghcversion: 6.8.2 | Platform: Linux ----------------------------+----------------------------------------------- Changes (by duncan): * milestone: Cabal-1.6 => Cabal-1.8 -- Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/218#comment:4 Hackage http://haskell.org/cabal/ Hackage: Cabal and related projects
participants (1)
-
Hackage