diff options
Diffstat (limited to 'pkgs/tools/games/slipstream/default.nix')
-rw-r--r-- | pkgs/tools/games/slipstream/default.nix | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/pkgs/tools/games/slipstream/default.nix b/pkgs/tools/games/slipstream/default.nix new file mode 100644 index 0000000000000..fd805958e7967 --- /dev/null +++ b/pkgs/tools/games/slipstream/default.nix @@ -0,0 +1,41 @@ +{ lib, fetchFromGitHub, stdenv, makeWrapper, buildMaven, maven, jdk8 }: +let + settings = (buildMaven ./project-info.json).settings; + jdk = jdk8; +in +stdenv.mkDerivation rec { + pname = "slipstream"; + version = "1.9.1"; + + src = fetchFromGitHub { + owner = "Vhati"; + repo = "Slipstream-Mod-Manager"; + rev = "v${version}"; + sha256 = "sha256-F+o94Oh9qxVdfgwdmyOv+WZl1BjQuzhQWaVrAgScgIU="; + }; + + nativeBuildInputs = [ makeWrapper ]; + buildInputs = [ (maven.override { inherit jdk; }) ]; + + buildPhase = "mvn --offline --settings=${settings} package"; + + installPhase = '' + mkdir -p $out/share/java + install -Dm644 target/ftl-mod-manager-${version}.jar $out/share/java + install -Dm644 target/modman.jar $out/share/java + + makeWrapper ${wrapper} $out/bin/${pname} \ + --suffix PATH : ${lib.makeBinPath [ jdk ]} \ + --set jar_file "$out/share/java/modman.jar" + ''; + + wrapper = ./wrapper.sh; + + meta = with lib; { + description = "A mod manager for FTL: Faster Than Light"; + homepage = "https://github.com/Vhati/Slipstream-Mod-Manager"; + license = licenses.gpl2; + maintainers = with maintainers; [ mib ]; + platforms = [ "x86_64-linux" ]; + }; +} |