!aRKdLCkUeIFjRPZuJT:nixos.org

NixOS JVM

110 Members
24 Servers

Load older messages


SenderMessageTime
1 Jan 2025
@emilazy:matrix.orgemilybut I'm not entirely sure. Java dependency handling is a mess and I don't trust it.18:21:08
@rdfg77:kde.orglinsuiIt unzip the pg binaries into a tmp dir and run it. I'll patch it to run pg from nixpkgs.18:21:45
@emilazy:matrix.orgemily in true Java fashion, the library has an interface PgBinaryResolver. maybe you could patch jabref to implement that interface and use it, and skip patching the library entirely 18:21:53
@rdfg77:kde.orglinsuiAnd this lib will use the implementation provided by jabref?18:26:03
@emilazy:matrix.orgemilyI think it depends on how jabref uses the library :S18:26:51
@emilazy:matrix.orgemily you can pass a PgBinaryResolver to EmbeddedPostgres 18:27:10
@emilazy:matrix.orgemily if it uses EmbeddedPostgresRules.singleInstance() I think you need to do something like new SingleInstancePostgresRule().customize(builder => builder.setPgBinaryResolver(…)) instead 18:28:41
@rdfg77:kde.orglinsuiAh, I understand now. :) Thanks! This is a good idea!18:30:09
@emilazy:matrix.orgemilyideally the library would just let you set an environment variable or something to give it a prebuilt Postgres but I guess this is more Java 😅18:30:54
@rdfg77:kde.orglinsuiI tried to find such a env var but it seems there is no such thing...18:31:39
@emilazy:matrix.orgemilythe closest thing I can find is that it includes the distro name when looking for the tarball which it looks up in some kind of Java classpath resources thing … but I don't know if you can inject into that without patching the library18:32:30
@emilazy:matrix.orgemilyhttps://github.com/zonkyio/embedded-postgres/blob/ed189edde855b25340245b7fac5a7fe6a5a497a6/src/main/java/io/zonky/test/db/postgres/embedded/DefaultPostgresBinaryResolver.java18:32:41
@emilazy:matrix.orgemily
        logger.error("No postgres binaries found, you need to add an appropriate maven dependency " +
                "that meets the following parameters - system: '{}', architecture: '{}' " +
                "[https://github.com/zonkyio/embedded-postgres#additional-architectures]", system, architecture);
18:32:53
@emilazy:matrix.orgemilyit seems like maybe you could construct a fake package just to provide our own PostgreSQL, in a way that this can find18:33:07
@rdfg77:kde.orglinsuiI guess I need to package the pg binaries into a txz file then put it into a jar...18:37:51
@emilazy:matrix.orgemily yes, might be worse than the PgBinaryResolver approach 18:38:52
3 Jan 2025
@gotha:matrix.org@gotha:matrix.org joined the room.09:25:31
4 Jan 2025
@rdfg77:kde.orglinsuiI finally choose this method. Ugly but easy. https://github.com/NixOS/nixpkgs/pull/37083912:04:52
@emilazy:matrix.orgemilywould you like me to have a go at fixing OpenJFX WebKit so you can skip some of the hacks there?14:12:04
@emilazy:matrix.orgemilyI wonder if we should make that bundled Postgres thing a package in case there are other things in the tree that want to use it (but maybe YAGNI)14:12:55
@rdfg77:kde.orglinsuiIf other packages also use it, maybe we can make the java part a package so that it can use the postgresql from nixpkgs directly.14:38:51
@rdfg77:kde.orglinsuiYes, it would be great! :)14:39:20
@rdfg77:kde.orglinsuiIs it possible to make the jdk with jfx reuse the headless package (or it already does this)? it seems if I have a package using headless jdk and a package using jfx, I'll have two jdk installed.14:43:46
@emilazy:matrix.orgemilywe should split OpenJFX out of the JDK entirely14:49:41
@emilazy:matrix.orgemilyAIUI there's no need to bundle it in and upstream are moving to deprecate it14:49:49
@emilazy:matrix.orgemily I believe it can "just" be a normal Java package (something something jlink?) 14:49:57
@emilazy:matrix.orgemilyI don't really know enough about Java to be the right person for the job but I might end up doing it anyway 😅14:50:17
@emilazy:matrix.orgemilyit would simplify the derivations quite a bit14:50:26
@emilazy:matrix.orgemilybut yes, we currently bootstrap a new JDK for it14:50:38
@emilazy:matrix.orgemilysee e.g. https://bugs.openjdk.org/browse/JDK-829409514:50:59

Show newer messages


Back to Room ListRoom Version: 6