1 { lib, fetchFromGitHub, makeWrapper, maven, jdk }:
3 maven.buildMavenPackage rec {
7 src = fetchFromGitHub {
9 repo = "Slipstream-Mod-Manager";
11 hash = "sha256-F+o94Oh9qxVdfgwdmyOv+WZl1BjQuzhQWaVrAgScgIU=";
15 mvnHash = "sha256-woOSkF5TuzaJ84EndryMoXTMbbK/V/BShM1k+WB8D/c=";
17 nativeBuildInputs = [ makeWrapper ];
22 mkdir -p $out/share/java
23 install -Dm644 target/ftl-mod-manager-${version}.jar $out/share/java
24 install -Dm644 target/modman.jar $out/share/java
26 # slipstream is very finniky about having specific
27 # folders at startup, so wrapper creates them for it.
28 # this is because slipstream expects to be started from
29 # archive it comes from, but we can't do that since
30 # we need the mods directory to be writable.
31 # see: https://github.com/Vhati/Slipstream-Mod-Manager/blob/85cad4ffbef8583d908b189204d7d22a26be43f8/src/main/java/net/vhati/modmanager/cli/SlipstreamCLI.java#L105
32 makeWrapper ${jdk}/bin/java $out/bin/${pname} \
33 --run '_dir="''${XDG_DATA_HOME:-$HOME/.local/share}/slipstream"' \
34 --run 'mkdir -p $_dir/{mods,backup}' \
36 --append-flags "-jar $out/share/java/modman.jar"
42 description = "Mod manager for FTL: Faster Than Light";
43 homepage = "https://github.com/Vhati/Slipstream-Mod-Manager";
44 license = licenses.gpl2Only;
45 maintainers = with maintainers; [ mib ];
46 mainProgram = "slipstream";