summary refs log tree commit diff
path: root/pkgs/applications/misc/HentaiAtHome/default.nix
blob: 8eec91d529d04cfc23641778f1527f4c09b67aa5 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
{ buildGraalvmNativeImage, fetchzip, graalvm17-ce, lib }:

buildGraalvmNativeImage rec {
  pname = "HentaiAtHome";
  version = "1.6.1";
  src = fetchzip {
    url = "https://repo.e-hentai.org/hath/HentaiAtHome_${version}.zip";
    hash =
      "sha512-nGGCuVovj4NJGrihKKYXnh0Ic9YD36o7r6wv9zSivZn22zm8lBYVXP85LnOw2z9DiJARivOctQGl48YFD7vxOQ==";
    stripRoot = false;
  };

  jar = "${src}/HentaiAtHome.jar";
  dontUnpack = true;

  graalvmDrv = graalvm17-ce;
  extraNativeImageBuildArgs = [
    "--enable-url-protocols=http,https"
    "--install-exit-handlers"
    "--no-fallback"
  ];

  doInstallCheck = true;
  installCheckPhase = ''
    pushd $(mktemp -d)
    $out/bin/HentaiAtHome
    popd
  '';

  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";
    sourceProvenance = with sourceTypes; [ binaryBytecode ];
    license = licenses.gpl3;
    maintainers = with maintainers; [ terrorjack ];
  };
}