nixpkgs/pkgs/tools/games/slipstream/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

41 lines
1.2 KiB
Nix
Raw Normal View History

2023-06-13 23:12:10 +00:00
{ lib, fetchFromGitHub, stdenv, makeWrapper, buildMaven, maven, jdk8 }:
let
settings = (buildMaven ./project-info.json).settings;
jdk = jdk8;
in
stdenv.mkDerivation (finalAttrs: {
2023-06-13 23:12:10 +00:00
pname = "slipstream";
version = "1.9.1";
src = fetchFromGitHub {
owner = "Vhati";
repo = "Slipstream-Mod-Manager";
rev = "v${finalAttrs.version}";
hash = "sha256-F+o94Oh9qxVdfgwdmyOv+WZl1BjQuzhQWaVrAgScgIU=";
2023-06-13 23:12:10 +00:00
};
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-${finalAttrs.version}.jar $out/share/java
2023-06-13 23:12:10 +00:00
install -Dm644 target/modman.jar $out/share/java
makeWrapper ${finalAttrs.wrapper} $out/bin/${finalAttrs.pname} \
2023-06-13 23:12:10 +00:00
--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 ];
};
})