!aRKdLCkUeIFjRPZuJT:nixos.org

NixOS JVM

131 Members
28 Servers

Load older messages


SenderMessageTime
24 Jun 2021
@dschrempf:matrix.orgdschrempf joined the room.12:06:47
@dschrempf:matrix.orgdschrempfHi! I am referring to the discussion on discourse about packaging a Maven project with mvn2nix. I am slowly moving forward. At the moment, I have the following problem: The Google Ortool Makefile builds two Maven packages in a row, the first being a prerequisite of the other. So essentially, I need to merge the dependencies of two project into a single lock file, so that both projects can be built using the same local Maven repository. Is there an easy way to do this?12:09:17
@dschrempf:matrix.orgdschrempfFYI: https://discourse.nixos.org/t/updating-jugglinglab-packaging-a-maven-repository/1372612:09:37
@dschrempf:matrix.orgdschrempf For your reference, I merged it manually for now jq -s '.[0][] * .[1][]' mvn2nix-ortools-java-lock.json mvn2nix-ortools-linux-x86-64-lock.json > merged.json and then adding the dependency key by hand. 12:40:23
@dschrempf:matrix.orgdschrempf Somehow it still misses a POM: [WARNING] The POM for org.apache.maven.plugins:maven-gpg-plugin:jar:1.6 is missing, no dependency information available 12:53:43
@dschrempf:matrix.orgdschrempfThis POM is in the pom.xml file but not in the json lock file produced by mvn2nix.12:54:01
@dschrempf:matrix.orgdschrempfIt turns out that I also have to merge dependencies from different goals... Now, some goals require the package being built at the moment, and which is not available on the repository, so mvn2nix fails. Sorry for spamming you, feel free to jump in if you can help, I give up now! Cheers.14:03:50
@dschrempf:matrix.orgdschrempfRedacted or Malformed Event15:44:47
@dschrempf:matrix.orgdschrempf

or-tools-jar = fetchurl {
url = "https://repo1.maven.org/maven2/com/google/ortools/ortools-java/9.0.9048/ortools-java-9.0.9048.jar";
hash = "sha256-x8zqeMVjaMGx++sK6641JfzbM9s0D982vi4SCNWKE8o=";
};

15:44:49
@dschrempf:matrix.orgdschrempf *
or-tools-jar = fetchurl {
url = "https://repo1.maven.org/maven2/com/google/ortools/ortools-java/9.0.9048/ortools-java-9.0.9048.jar";
hash = "sha256-x8zqeMVjaMGx++sK6641JfzbM9s0D982vi4SCNWKE8o=";
};
15:45:27
@dschrempf:matrix.orgdschrempf *

OK, so I did something really lame, not sure if this would be accepted on Nixpkgs. I just define the required jar as an external source file, like so:

or-tools-jar = fetchurl {
url = "https://repo1.maven.org/maven2/com/google/ortools/ortools-java/9.0.9048/ortools-java-9.0.9048.jar";
hash = "sha256-x8zqeMVjaMGx++sK6641JfzbM9s0D982vi4SCNWKE8o=";
};
15:46:11
25 Jun 2021
@fzakaria:matrix.orgfzakaria (Old)Hi.02:33:31
@fzakaria:matrix.orgfzakaria (Old) dschrempf: the mvn2nix tool is definitely missing functionality. I've learnt quite a lot since writing it. Frustratingly, maven does not allow the best introspection. 02:34:28
@fzakaria:matrix.orgfzakaria (Old)is this derivation for personal use ?02:37:58
@fzakaria:matrix.orgfzakaria (Old)I have some recommendations you can do to go about it quickly; albeit not pure in it's approach02:38:22
26 Jun 2021
@grahamc:nixos.org@grahamc:nixos.orgchanged room power levels.01:18:14
@grahamc:nixos.org@grahamc:nixos.org invited @mjolnir:nixos.orgNixOS Moderation Bot.01:22:32
@mjolnir:nixos.orgNixOS Moderation Bot joined the room.01:22:33
28 Jun 2021
@dschrempf:matrix.orgdschrempfAt the moment it is personal, but the idea was to update Jugglinglab in Nixpkgs. The fetchurl method works quite well here, but somehow I don't think it is suitable for Nixpkgs.12:16:34
@fzakaria:matrix.orgfzakaria (Old)I've been using _noChroot for personal stuff; it's kind of a lame hack but assigning it only on the Java portion15:25:47
@fzakaria:matrix.orgfzakaria (Old)Doing a separate derivation for Maven repository is also doable; but it's just slow to keep rebuilding when I change my pom.xml. I might need to change up the derivation to use symlinkTrees instead somehow.15:26:40
@fzakaria:matrix.orgfzakaria (Old)so its more granular15:26:43
29 Jun 2021
@nbathum:matrix.orgnbathum joined the room.00:03:15
30 Jun 2021
@tadfisher:matrix.orgtadfisher joined the room.21:14:06
1 Jul 2021
@heartman:matrix.orgThomas Heartman (he/him) joined the room.09:56:51
5 Jul 2021
@spacesbot:nixos.devspacesbot - keeps a log of public NixOS channels joined the room.19:21:33
@spacesbot:nixos.devspacesbot - keeps a log of public NixOS channels 19:49:36
6 Jul 2021
@spacesbot:nixos.devspacesbot - keeps a log of public NixOS channels changed their display name from spacesbot to spacesbot - keeps a log of public NixOS channels.22:11:43
7 Jul 2021
@fzakaria:matrix.orgfzakaria (Old)hi everyone who joined!03:00:12
@fzakaria:matrix.orgfzakaria (Old)if anyone has experience hacking on Maven itself please reach out. I've been thinking about a proper solution to Nix + Java, I think it needs a large fork of maven.03:00:52

Show newer messages


Back to Room ListRoom Version: 6