-
Notifications
You must be signed in to change notification settings - Fork 845
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add stack build --prefix
option
#848
Comments
In order to support installation into directories where the user doesn't have write permission (e.g., |
Make sure this covers the case outlined in #1262 (comment) |
Seems like this issue is cropping up for multiple people. Bumping to P2 |
Important use case for supporting a |
Here's a more concrete example for Homebrew: Homebrew/homebrew-core#1630 |
Further rationale—sorry if already mentioned in some links: clearing snapshots (to recover space) leaves compiled binaries around, but not their data-files. |
Many packages have |
More demand for this feature, bumping priority. |
@borsboom @snoyberg @mgsloan @Blaisorblade However,
There’s obviously a lot of interest in the capability and the lack of it is holding back deployment of Haskell-based tools. Are there any plans to tackle this soon? Related: |
What about packages that explicitly specify When How can this be fixed when |
@jgm Would you please provide any tips or recipes for converting a package to use embedded files and avoid this issue? Is it relatively easy? Would it be reasonable to ask any packages like Hearing your experience about how to fix this issue with code would be much appreciated. |
This older post from @ndmitchell appears to provide at least a couple straightforward solutions to
Does anyone have any experience or pointers with this cc: @borsboom @snoyberg @mgsloan @Blaisorblade @jgm @acfoltzer @bubba @phadej @typedrat @23Skidoo @bos @simonmar @christiaanb |
I did once implement partial support of "relocatable" packages in Cabal: haskell/cabal#2255; it was sufficient to get relocatable Cabal sandboxes: http://qbaylogic.com/blog/2016/05/08/relocatable-sandboxes.html |
Thank you. Does the @christiaanb’s post brings us to three possible solutions:
@borsboom @snoyberg Would any of these solutions work within If any of these do work, I could personally modify specific ports of stack-based packages, or even MacPorts automated process for stack builds, but this issue goes above specific packages built on macOS. If |
@essandess - pandoc has an Of course, this is not the ideal solution when pandoc is installed by a package manager. In that case it's usually good practice to have the data files live separately in the file hierarchy, where they can be inspected and replaced. (This is how debian linux installs of pandoc work, for example.) Unfortunately, stack doesn't currently support this because of the lack of |
The approach described by hlint's author @ndmitchell solves the issue of hardcoded All that's required is to specify the path within a file called
Also, setting the environment variable In contrast, setting @borsboom @snoyberg @mgsloan @Blaisorblade @jgm @acfoltzer @bubba @phadej @typedrat @23Skidoo @bos @simonmar @christiaanb |
* Fix destroot issue in binary caused by datadir in stack_root * Fix stack/cabal data-files hardcoded path issue with Paths_${name}.hs file * Allow initialization of proxy configuration files * See commercialhaskell/stack#848 * See commercialhaskell/stack#4857
* Fix destroot issue in binary caused by datadir in stack_root * Fix stack/cabal data-files hardcoded path issue with Paths_${name}.hs file * Allow initialization of proxy configuration files * See commercialhaskell/stack#848 * See commercialhaskell/stack#4857
Relocatable data files are still not supported in Stack, and there are no per-package workarounds in Gitit or its dependencies other than Pandoc's embed_data_files flag. Therefore, I will continue the existing approach of using Cabal with frozen deps instead of Stack. jgm/gitit#622 haskell/cabal#462 commercialhaskell/stack#848
Just wanted to note: AIUI Cabal (the library) actuall does support both |
This new
stack build
option will add a post-build step that rebuilds the targets with acabal configure --prefix=
option in a separatedist
directory. This will allow installing packages that usedata-files
in a fixed location on the file system outside of any stack-controlled sandbox.The text was updated successfully, but these errors were encountered: