Skip to content

Relocatable data-files: support #1262

Closed

Description

@lukexi

I have some packages that require some accompanying data to be placed alongside any executables that depend on them; in a few cases that's some closed-source DLLs, and in another it's some shader files. I could use file-embed as a workaround for the shaders, but the DLLs aren't as straightforward.

cabal-install has the ability to specify where the data-files: of a package are placed via --datadir and --datasubdir, which I think would solve this nicely alongside the existing --local-bin-dir option?

(I haven't needed this until I switched to Stack, but I assume cabal-install's --datadir flag works alongside the Paths_foo module system to enable use of getDataFileName regardless of installation destination, for the shader example case)

Activity

  1. added this to the P3: Optional milestone on Nov 5, 2015
  2. borsboom commented on Nov 11, 2015

    @borsboom
    Contributor

    @lukexi, will #848 do what you need? If not, is there a way that proposal could be extended to support what you need?

  3. borsboom commented on Nov 18, 2015

    @borsboom
    Contributor

    For lack of feedback, closing as duplicate of #848.

  4. lukexi commented on Nov 18, 2015

    @lukexi
    ContributorAuthor

    Whoops, sorry I missed this!

    I think #848 will do the trick — I'll explain exactly what I'm hoping for just in case and you can close again if #848 subsumes it : )

    Say I have a dependency tree like this:

    foo
    |
    bar baz
    |    |
    \   /
     bat
    

    bat defines an executable, and all of the projects have data-files in their .cabal.

    When I run stack install --prefix releasedir, I want to have all of foo, bar, baz and bat's data-files along with bat's executable installed into releasedir, and for Paths_Foo, Paths_Bar, and Paths_baz to be configured so that bat's executable can load data from them at runtime.

    Hope that makes sense : )

  5. reopened this on Nov 18, 2015
  6. borsboom commented on Nov 25, 2015

    @borsboom
    Contributor

    Pretty sure #848 will cover this case. I'll reference your case over there to make sure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions