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

Package request: pkl #286104

Open
nilsherzig opened this issue Feb 3, 2024 · 5 comments · May be fixed by #286658
Open

Package request: pkl #286104

nilsherzig opened this issue Feb 3, 2024 · 5 comments · May be fixed by #286658
Assignees
Labels
0.kind: packaging request Request for a new package to be added 6.topic: java Including JDK, tooling, other languages, other VMs

Comments

@nilsherzig
Copy link

Project description

Pkl — pronounced Pickle — is an embeddable configuration language which provides rich support for data templating and validation. It can be used from the command line, integrated in a build pipeline, or embedded in a program. Pkl scales from small to large, simple to complex, ad-hoc to repetitive configuration tasks.

Metadata

@nilsherzig nilsherzig added the 0.kind: packaging request Request for a new package to be added label Feb 3, 2024
@erikkrieg
Copy link

erikkrieg commented Feb 4, 2024

I'm not a maintainer, but took a look at this out of curiosity. This project is written in Java/Kotlin and built with Gradle. I was messing around with a derivation to build it from source but hit a lot of walls with the gradle build. Made progress on several issues. Reached a point where it seems like Gradle expects JDK version 11 for some tasks, but then claims to need v17.0 for others? GraalVm is installed as one of the tasks and is configured to use v17.0, but since I set JAVA_HOME v17 might not be used by the correct task?

Honestly, since this is the first time I've looked at building Java software I don't know what I'm doing and have gone well past the amount of time I intended to look at this :P

Curious to see someone with actual Java build experience take a crack at it.

@TomaSajt TomaSajt added the 6.topic: java Including JDK, tooling, other languages, other VMs label Feb 4, 2024
@rafaelrc7
Copy link
Member

Some comments when trying to package it. I did manage to easily build jpkl in a nix shell with:

nix shell nixpkgs#gradle_7 nixpkgs#jdk17
gradle build
./pkl-cli/build/executable/jpkl

What seems to indicate that it would not be hard to package it with the available nixpkgs packages.*

However, I was not so lucky with the native build, that I believe would be preferable. It depends on graalvm for jdk 11, while the currently available package in nixpkgs is graalvm for jdk 21. The project tries to download graalvm itself, however it is a dynamic linked binary and thus does not work in NixOS. I just removed the download function from the gradle settings, and used the nixpkgs package from 23.05. Like so:

nix shell nixpkgs#gradle_7 nixpkgs#jdk17 github:nixos/nixpkgs/23.05#graalvm11-ce
gradle nativeBuild
./pkl-cli/build/executable/pkl-linux-amd64

So it is easily buildable, but only if using packages from 23.05, that I believe would not be acceptable... More so because of the reason graalvm11-ce got removed: oracle/graal#5063 . Its support got dropped.

*Now, back to the java version (jpkl). After confirming it was buildable, I tried to make a derivation, but apparently packaging gradle projects is not so straight-forward. I did try looking for examples, but did not got much forward...

@rafaelrc7 rafaelrc7 linked a pull request Feb 6, 2024 that will close this issue
13 tasks
@rafaelrc7
Copy link
Member

I created a draft PR (#286658) with my work in progress derivation. I advanced a lot. However it is still not building. Any help would be welcome.

@rafaelrc7
Copy link
Member

Sadly, I hit a roadblock I'm not being able to solve...

image

It fails to find a dependency. However, this dependency is being downloaded by the deps step. The issues seems that, for some reason, this pkl-cli subproject in gradle refuses to use the local repository and only its default, whatever it is. Thus, it never looks up in deps. I'm not sure how to fix it.

johnallen3d added a commit to johnallen3d/system-config that referenced this issue Feb 11, 2024
NOTE:

- treesitter appears to be broken: apple/pkl-neovim#2
- `nixpkgs` doesn't yet include `pkl`: NixOS/nixpkgs#286104
@rafaelrc7
Copy link
Member

The PR (#286658) is finally building and ready for review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.kind: packaging request Request for a new package to be added 6.topic: java Including JDK, tooling, other languages, other VMs
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants