Skip to content

Copying executables when installing is fragile with packages relying on the paths in Cabal's Paths_<pkg-name> module #828

Closed
@DanielG

Description

@DanielG

Since stack install is merely an alias for copying executables after building them this means that the Paths_ module doesn't get re-generated for the actual installation prefix but rather remains at pointing to somewhere in .stack-work. This is a real problems for programs or libraries that rely on these paths being correct.

cabal install does this correctly and rebuilds the whole package with the proper paths in this module.

My specific use case is cabal-helper where, in the library, I have to use libexecdir to find the wrapper executable (since I don't want that to show up on the user's PATH). Since there isn't such a thing as LIBEXECPATH I'm kind of stuck here as I can't think of another way to find my executables in libexec.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions