Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
94 lines
2.5 KiB
Nix
94 lines
2.5 KiB
Nix
{
|
|
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 ];
|
|
};
|
|
})
|