Skip to content
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

haskell.nix support for jni and jvm packages #198

Open
user16332 opened this issue Nov 23, 2023 · 4 comments
Open

haskell.nix support for jni and jvm packages #198

user16332 opened this issue Nov 23, 2023 · 4 comments

Comments

@user16332
Copy link

For use with haskell.nix, which relies on cabal, include .cabal and .h files:

user16332@3fa95fd

@user16332
Copy link
Author

the above commit includes fixes for issue 197

@facundominguez
Copy link
Member

Thanks @user16332. Two question about this,

  1. Would it be helpful in any way if I uploaded new versions of jni and jvm packages to hackage?
  2. If jni.h and jni_md.h are included in the jni package, wouldn't this prevent the package from working with jvms and platforms where the header files differ?

@user16332
Copy link
Author

  1. Would it be helpful in any way if I uploaded new versions of jni and jvm packages 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.

  1. If jni.h and jni_md.h are included in the jni package, 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 .pc file for openjdk?

@facundominguez
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants