mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-04 03:53:56 +00:00
4f0dadbf38
After final improvements to the official formatter implementation, this commit now performs the first treewide reformat of Nix files using it. This is part of the implementation of RFC 166. Only "inactive" files are reformatted, meaning only files that aren't being touched by any PR with activity in the past 2 months. This is to avoid conflicts for PRs that might soon be merged. Later we can do a full treewide reformat to get the rest, which should not cause as many conflicts. A CI check has already been running for some time to ensure that new and already-formatted files are formatted, so the files being reformatted here should also stay formatted. This commit was automatically created and can be verified using nix-builda08b3a4d19
.tar.gz \ --argstr baseRevb32a094368
result/bin/apply-formatting $NIXPKGS_PATH
55 lines
1.6 KiB
Nix
55 lines
1.6 KiB
Nix
{
|
|
lib,
|
|
fetchFromGitHub,
|
|
makeWrapper,
|
|
maven,
|
|
jdk,
|
|
}:
|
|
|
|
maven.buildMavenPackage rec {
|
|
pname = "slipstream";
|
|
version = "1.9.1";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "Vhati";
|
|
repo = "Slipstream-Mod-Manager";
|
|
rev = "v${version}";
|
|
hash = "sha256-F+o94Oh9qxVdfgwdmyOv+WZl1BjQuzhQWaVrAgScgIU=";
|
|
};
|
|
|
|
mvnJdk = jdk;
|
|
mvnHash = "sha256-woOSkF5TuzaJ84EndryMoXTMbbK/V/BShM1k+WB8D/c=";
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
installPhase = ''
|
|
runHook preInstall
|
|
|
|
mkdir -p $out/share/java
|
|
install -Dm644 target/ftl-mod-manager-${version}.jar $out/share/java
|
|
install -Dm644 target/modman.jar $out/share/java
|
|
|
|
# slipstream is very finniky about having specific
|
|
# folders at startup, so wrapper creates them for it.
|
|
# this is because slipstream expects to be started from
|
|
# archive it comes from, but we can't do that since
|
|
# we need the mods directory to be writable.
|
|
# see: https://github.com/Vhati/Slipstream-Mod-Manager/blob/85cad4ffbef8583d908b189204d7d22a26be43f8/src/main/java/net/vhati/modmanager/cli/SlipstreamCLI.java#L105
|
|
makeWrapper ${jdk}/bin/java $out/bin/${pname} \
|
|
--run '_dir="''${XDG_DATA_HOME:-$HOME/.local/share}/slipstream"' \
|
|
--run 'mkdir -p $_dir/{mods,backup}' \
|
|
--run 'cd $_dir' \
|
|
--append-flags "-jar $out/share/java/modman.jar"
|
|
|
|
runHook postInstall
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "Mod manager for FTL: Faster Than Light";
|
|
homepage = "https://github.com/Vhati/Slipstream-Mod-Manager";
|
|
license = licenses.gpl2Only;
|
|
maintainers = with maintainers; [ mib ];
|
|
mainProgram = "slipstream";
|
|
};
|
|
}
|