pakku: init at 1.2.1

This commit is contained in:
Redlonghead
2025-06-30 11:03:22 -05:00
parent 66df66ab2d
commit 56457dba07
2 changed files with 1508 additions and 0 deletions
+1415
View File
File diff suppressed because it is too large Load Diff
+93
View File
@@ -0,0 +1,93 @@
{
jre,
lib,
stdenv,
gradle,
makeWrapper,
fetchFromGitHub,
versionCheckHook,
nix-update-script,
installShellFiles,
stripJavaArchivesHook,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "pakku";
version = "1.2.1";
src = fetchFromGitHub {
owner = "juraj-hrivnak";
repo = "Pakku";
tag = "v${finalAttrs.version}";
hash = "sha256-hWQq2awZV07wX4jK9K/QoXekrlZukuDv6CtY1O09ZkQ=";
};
gradleBuildTask = "jvmJar";
nativeBuildInputs = [
gradle
makeWrapper
installShellFiles
stripJavaArchivesHook
];
mitmCache = gradle.fetchDeps {
inherit (finalAttrs) pname;
data = ./deps.json;
};
# this is required for using mitm-cache on Darwin
__darwinAllowLocalNetworking = true;
gradleCheckTask = "jvmTest";
doCheck = true;
installPhase = ''
runHook preInstall
mkdir -p $out/{bin,share/pakku}
cp build/libs/pakku.jar $out/share/pakku
makeWrapper ${jre}/bin/java $out/bin/pakku --add-flags "-jar $out/share/pakku/pakku.jar"
runHook postInstall
'';
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
installShellCompletion --cmd pakku \
--bash <($out/bin/pakku --generate-completion=bash) \
--fish <($out/bin/pakku --generate-completion=fish) \
--zsh <($out/bin/pakku --generate-completion=zsh)
'';
doInstallCheck = true;
nativeInstallCheckInputs = [ versionCheckHook ];
versionCheckProgramArg = "--version";
passthru.updateScript = nix-update-script {
extraArgs = [
"--subpackage"
"mitmCache"
];
};
meta = {
description = "Multiplatform modpack manager for Minecraft: Java Edition";
longDescription = ''
With Pakku, you can create modpacks for CurseForge, Modrinth or both simultaneously.
It's a package manager that significantly simplifies Minecraft modpack development, inspired by package managers like npm and Cargo. In addition to package management itself, it enables support for version control, simplifies collaboration options, and adds support for CI/CD.
'';
homepage = "https://github.com/juraj-hrivnak/Pakku";
downloadPage = "https://github.com/juraj-hrivnak/Pakku/releases/tag/v${finalAttrs.version}";
changelog = "https://github.com/juraj-hrivnak/Pakku/releases/tag/v${finalAttrs.version}";
mainProgram = "pakku";
license = lib.licenses.eupl12;
platforms = jre.meta.platforms;
sourceProvenance = with lib.sourceTypes; [
fromSource
binaryBytecode # mitm cache
];
maintainers = with lib.maintainers; [ redlonghead ];
};
})