nixpkgs/pkgs/applications/misc/HentaiAtHome/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

59 lines
1.4 KiB
Nix
Raw Normal View History

{ buildPackages
, buildPlatform
, fetchzip
, javaOpts ? "-XX:+UseZGC"
, jdk
, jre_headless
, lib
, makeWrapper
, stdenvNoCC
,
}:
stdenvNoCC.mkDerivation rec {
2021-12-31 12:50:06 +00:00
pname = "HentaiAtHome";
version = "1.6.1";
2021-12-31 12:50:06 +00:00
src = fetchzip {
url = "https://repo.e-hentai.org/hath/HentaiAtHome_${version}_src.zip";
2021-12-31 12:50:06 +00:00
hash =
"sha512-j+B0kx6fjUibI3MjVJ5PVTq9xxtSOTTY/XizAJKjeNkpExJF9DIV4VCwf+sfLlg+7W4UBosnyb8hZNNoidRBKA==";
2021-12-31 12:50:06 +00:00
stripRoot = false;
};
nativeBuildInputs = [ jdk makeWrapper ];
LANG = "en_US.UTF-8";
LOCALE_ARCHIVE = lib.optionalString (buildPlatform.libc == "glibc")
"${buildPackages.glibcLocales}/lib/locale/locale-archive";
buildPhase = ''
make all
'';
installPhase = ''
mkdir -p $out/share/java
cp build/HentaiAtHome.jar $out/share/java
2021-12-31 12:50:06 +00:00
mkdir -p $out/bin
makeWrapper ${jre_headless}/bin/java $out/bin/HentaiAtHome \
--add-flags "${javaOpts} -jar $out/share/java/HentaiAtHome.jar"
'';
2021-12-31 12:50:06 +00:00
doInstallCheck = true;
installCheckPhase = ''
pushd $(mktemp -d)
$out/bin/HentaiAtHome
popd
'';
strictDeps = true;
2021-12-31 12:50:06 +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 ];
};
}