pakku: init at 1.2.1 (#421153)

This commit is contained in:
Aleksana
2025-07-03 20:56:51 +08:00
committed by GitHub
3 changed files with 1514 additions and 0 deletions
+6
View File
@@ -21138,6 +21138,12 @@
githubId = 77415970;
name = "Redhawk";
};
redlonghead = {
email = "git@beardit.net";
github = "Redlonghead";
githubId = 52263558;
name = "Connor Beard";
};
redvers = {
email = "red@infect.me";
github = "redvers";
+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 ];
};
})