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
|
2023-06-19 23:53:17 +00:00
|
|
|
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";
|
2023-06-19 23:53:17 +00:00
|
|
|
rev = "v${finalAttrs.version}";
|
2023-06-19 23:40:12 +00:00
|
|
|
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
|
2023-06-19 23:53:17 +00:00
|
|
|
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
|
|
|
|
|
2023-06-19 23:53:17 +00:00
|
|
|
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 ];
|
|
|
|
};
|
2023-06-19 23:53:17 +00:00
|
|
|
})
|