I’m a new NixOS user, currently trying to get all the software up an running on a NixOS system (currently inside a VM, but hopefully on my laptop soon).
I was amazed to find packages for almost any software I wished for - great work!
Now there is one application for which no package exists and I am trying to find a configuration that installs it to my NixOS: JAlbum.
I’d appreciate if someone could help me find my way around the NixOS configuration to package this.
What I know about this software:
- name:
jalbum
- version:
37.7
- There is a ZIP download to execute it with any Java interpreter: https://download.jalbum.net/download/37.7/jAlbum.zip
- sha256:
QGy8agZ88Q0npcodnP6S/BF4lQEGbUMlQa8v7T2kNWU=
- contains a folder
jAlbum
with many things, includingJAlbum.jar
icons/JalbumApp48.png
- sha256:
- On my Linux Mint system Java is started with these arguments to run it:
-Xmx8000m --add-exports=java.desktop/sun.awt.shell=ALL-UNNAMED -XX:+UseParallelGC -DmaxSubsampling=2 -DuseDesktop=true -jar /usr/lib/jalbum/JAlbum.jar
- On NixOS I can start the application using
java -jar /path/to/JAlbum.jar
with this in my configuration:
programs.java = {
enable = true;
package = pkgs.jdk23.override { enableJavaFX = true; };
};
What I think the package should do:
- Include
pkgs.jdk23
with JavaFX enabled or depend on it. - download the ZIP + check sha256
- extract it to an appropriate location
- create a starter script that calls Java with all the arguments
- Create a
.desktop
launcher to make it show up in the menu (I am using KDE Plasma, in case that matters)
I don’t really know how to start – found some hints on the internet so I have a very vague understanding, but I’m not able to get it to work by myself.
Is the information above everything we need to create a custom package in my configuration?
How to proceed?