Closed yairchu closed 2 years ago
Thanks for looking into it. That's quite a few extra-deps haha! I won't be merging immediately because this configuration prevents me from using stack in the Nix-based environment, but I'll add a link to the PR in the build instruction I'll push soon. I think it shouldn't be too hard to have both configurations exist together, since the path to the configuration file can be configured with environment variables and I can set these automatically in the nix environment. I'll look into it after I export the rest of my to-do list for this project to GitHub.
Btw, if you managed to build an executable for OSX, I would love to add it to the release executables! Is it completely static?
Btw, if you managed to build an executable for OSX, I would love to add it to the release executables! Is it completely static?
What do you mean by completely static? It's quite static appearing to use only libraries from /usr/lib
which I think is ok:
% otool -L `stack exec -- which frugel-exe`
/Users/yairchu/dev/src/frugel/.stack-work/install/x86_64-osx/018983be76a8292baa60d635ff56287801e2da27aa0d2b9604e7d288e0f02b34/8.10.7/bin/frugel-exe:
/usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.11)
/usr/lib/libiconv.2.dylib (compatibility version 7.0.0, current version 7.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1311.0.0)
/usr/lib/libcharset.1.dylib (compatibility version 2.0.0, current version 2.0.0)
Note however, that for the executable to work in older macOS versions than the one I build it on, we've found that at least in Lamdu we needed to use
when:
- condition: os(darwin)
ld-options: -mmacosx-version-min=10.9
In the package.yaml
file.
That is - the executable I currently have built might only work on macOS >= 12
I think the macOS minimum version being 12 is okay. If those dynamically linked libs are present on macOS systems by default, I think it should be fine as well. Can you upload the (zipped) executable here?
Sure!
Preferring to skip the struggle of making nix work on my mac (last time I tried, admittedly a while ago, I gave up), I updated the
stack
configuration so building with stack will work.