haskell.nix support for `jni` and `jvm` packages
For use with haskell.nix, which relies on cabal, include .cabal and .h files:
https://github.com/user16332/inline-java/commit/3fa95fde11c9c1731f08b1654d4626b0e1cefabb
the above commit includes fixes for issue 197
Thanks @user16332. Two question about this,
- Would it be helpful in any way if I uploaded new versions of
jniandjvmpackages to hackage? - If
jni.handjni_md.hare included in thejnipackage, wouldn't this prevent the package from working with jvms and platforms where the header files differ?
- Would it be helpful in any way if I uploaded new versions of
jniandjvmpackages to hackage?
Hackage needs .cabal files just like haskell.nix, that's why it wasn't updated on Hackage since v0.8.0 because that's when the cabal support that was there earlier got dropped. Once you have cabal support you can also update Hackage which would mean the packages would eventually automatically end up in haskell.nix but that's a bonus.
- If
jni.handjni_md.hare included in thejnipackage, wouldn't this prevent the package from working with jvms and platforms where the header files differ?
I guess so. The above Works On My Machine (tm). :D
- It appears earlier, pre-bazel versions would just assume these files be present on the build system, provided by the OS?
- The official way would be to use pkg-config, but there is no
.pcfile for openjdk?
I'm thinking of adding the packages back to hackage for jni, jvm, and inline-java, although with no support to deal with java dependencies.
One bit of tooling to make it smooth is to keep the bazel and the cabal configurations in sync with gazelle_cabal.