slipstream: implement finalAttrs pattern

This commit is contained in:
mib 2023-06-20 01:53:17 +02:00
parent 0020bf2ff0
commit 8ce763b65c
No known key found for this signature in database
GPG Key ID: CF6E67DED6DC1E3F

View File

@ -3,14 +3,14 @@ let
settings = (buildMaven ./project-info.json).settings;
jdk = jdk8;
in
stdenv.mkDerivation rec {
stdenv.mkDerivation (finalAttrs: {
pname = "slipstream";
version = "1.9.1";
src = fetchFromGitHub {
owner = "Vhati";
repo = "Slipstream-Mod-Manager";
rev = "v${version}";
rev = "v${finalAttrs.version}";
hash = "sha256-F+o94Oh9qxVdfgwdmyOv+WZl1BjQuzhQWaVrAgScgIU=";
};
@ -21,10 +21,10 @@ stdenv.mkDerivation rec {
installPhase = ''
mkdir -p $out/share/java
install -Dm644 target/ftl-mod-manager-${version}.jar $out/share/java
install -Dm644 target/ftl-mod-manager-${finalAttrs.version}.jar $out/share/java
install -Dm644 target/modman.jar $out/share/java
makeWrapper ${wrapper} $out/bin/${pname} \
makeWrapper ${finalAttrs.wrapper} $out/bin/${finalAttrs.pname} \
--suffix PATH : ${lib.makeBinPath [ jdk ]} \
--set jar_file "$out/share/java/modman.jar"
'';
@ -37,4 +37,4 @@ stdenv.mkDerivation rec {
license = licenses.gpl2;
maintainers = with maintainers; [ mib ];
};
}
})