@@ -0,0 +1,37 @@
1+{ buildGraalvmNativeImage, fetchzip, graalvm17-ce, lib }:
2+
3+buildGraalvmNativeImage rec {
4+ pname = "HentaiAtHome";
5+ version = "1.6.1";
6+ src = fetchzip {
7+ url = "https://repo.e-hentai.org/hath/HentaiAtHome_${version}.zip";
8+ hash =
9+ "sha512-nGGCuVovj4NJGrihKKYXnh0Ic9YD36o7r6wv9zSivZn22zm8lBYVXP85LnOw2z9DiJARivOctQGl48YFD7vxOQ==";
10+ stripRoot = false;
11+ };
12+
13+ jar = "${src}/HentaiAtHome.jar";
14+ dontUnpack = true;
15+
16+ graalvm = graalvm17-ce;
17+ extraNativeImageBuildArgs = [
18+ "--enable-url-protocols=http,https"
19+ "--install-exit-handlers"
20+ "--no-fallback"
21+ ];
22+
23+ doInstallCheck = true;
24+ installCheckPhase = ''
25+ pushd $(mktemp -d)
26+ $out/bin/HentaiAtHome
27+ popd
28+ '';
29+
30+ meta = with lib; {
31+ homepage = "https://ehwiki.org/wiki/Hentai@Home";
32+ description =
33+ "Hentai@Home is an open-source P2P gallery distribution system which reduces the load on the E-Hentai Galleries";
34+ license = licenses.gpl3;
35+ maintainers = with maintainers; [ terrorjack ];
36+ };
37+}