{ lib, buildDubPackage, fetchFromGitHub, zlib, openssl_1_1, libplist, }: buildDubPackage rec { pname = "anisette-v3-server"; version = "unstable-2026-08-01"; src = fetchFromGitHub { owner = "Dadoum"; repo = "anisette-v3-server"; rev = "2ef18d7da2abe3a6d070aa478f774538b947aaa2"; hash = "sha256-G8loi2BTIRKamLeY8DiN4BLSrRxh13BNvs8bC2l9zNo="; }; dubLock = ./dub-lock.json; # libplist is dlopen'd at runtime by the plist-d C binding (libplist-2.0.so.3). # The reference Docker image installs it explicitly (see Dadoum/anisette-v3-server#46: # "Anisette did build but not run with current Dockerfile, I have added the # dependencies"). Without it the ADI provisioning step fails silently and the # server serves unprovisioned data, so Apple rejects the login. buildInputs = [ zlib openssl_1_1 libplist ]; installPhase = '' runHook preInstall mkdir -p $out/bin install -Dm755 anisette-v3-server $out/bin/anisette-v3-server runHook postInstall ''; meta = { description = "Anisette server implementing SideStore's anisette v3 protocol"; homepage = "https://github.com/Dadoum/anisette-v3-server"; license = lib.licenses.agpl3Only; mainProgram = "anisette-v3-server"; platforms = lib.platforms.linux; }; }