For executables you can do something like stack install --local-bin-path ./bin, how about a library? Is there some argument that you can pass to stack to change the default behavior of installing the shared library artifacts in .stack-work?
At least in my reading of --help and the docs, I don’t see a way to do that. Considering that stack wraps ghc in various ways, it might help to look over those options as well.