2022-06-26 10:26:21 +00:00
|
|
|
{ buildPackages
|
|
|
|
, fetchzip
|
|
|
|
, javaOpts ? "-XX:+UseZGC"
|
|
|
|
, jdk
|
|
|
|
, jre_headless
|
|
|
|
, lib
|
|
|
|
, makeWrapper
|
|
|
|
, stdenvNoCC
|
|
|
|
,
|
|
|
|
}:
|
|
|
|
stdenvNoCC.mkDerivation rec {
|
2022-01-03 16:56:52 +00:00
|
|
|
pname = "HentaiAtHome";
|
2023-10-09 19:29:22 +00:00
|
|
|
version = "1.6.2";
|
2022-06-26 10:26:21 +00:00
|
|
|
|
2022-01-03 16:56:52 +00:00
|
|
|
src = fetchzip {
|
2022-06-26 10:26:21 +00:00
|
|
|
url = "https://repo.e-hentai.org/hath/HentaiAtHome_${version}_src.zip";
|
2023-10-09 19:29:22 +00:00
|
|
|
hash = "sha256-ioL/GcnbYjt1IETH8521d1TcLGtENdFzceJui1ywXTY=";
|
2022-01-03 16:56:52 +00:00
|
|
|
stripRoot = false;
|
|
|
|
};
|
|
|
|
|
2022-06-26 10:26:21 +00:00
|
|
|
nativeBuildInputs = [ jdk makeWrapper ];
|
|
|
|
|
|
|
|
LANG = "en_US.UTF-8";
|
2023-01-11 07:51:40 +00:00
|
|
|
LOCALE_ARCHIVE = lib.optionalString (stdenvNoCC.buildPlatform.libc == "glibc")
|
2022-06-26 10:26:21 +00:00
|
|
|
"${buildPackages.glibcLocales}/lib/locale/locale-archive";
|
|
|
|
|
|
|
|
buildPhase = ''
|
|
|
|
make all
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/share/java
|
|
|
|
cp build/HentaiAtHome.jar $out/share/java
|
2022-01-03 16:56:52 +00:00
|
|
|
|
2022-06-26 10:26:21 +00:00
|
|
|
mkdir -p $out/bin
|
|
|
|
makeWrapper ${jre_headless}/bin/java $out/bin/HentaiAtHome \
|
|
|
|
--add-flags "${javaOpts} -jar $out/share/java/HentaiAtHome.jar"
|
|
|
|
'';
|
2022-01-03 16:56:52 +00:00
|
|
|
|
|
|
|
doInstallCheck = true;
|
|
|
|
installCheckPhase = ''
|
|
|
|
pushd $(mktemp -d)
|
|
|
|
$out/bin/HentaiAtHome
|
|
|
|
popd
|
|
|
|
'';
|
|
|
|
|
2022-06-26 10:26:21 +00:00
|
|
|
strictDeps = true;
|
|
|
|
|
2022-01-03 16:56:52 +00:00
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://ehwiki.org/wiki/Hentai@Home";
|
|
|
|
description =
|
|
|
|
"Hentai@Home is an open-source P2P gallery distribution system which reduces the load on the E-Hentai Galleries";
|
|
|
|
license = licenses.gpl3;
|
|
|
|
maintainers = with maintainers; [ terrorjack ];
|
2024-02-29 20:09:43 +00:00
|
|
|
mainProgram = "HentaiAtHome";
|
2022-01-03 16:56:52 +00:00
|
|
|
};
|
|
|
|
}
|