Files
my-pkgs/pkgs/anisette-v3-server/default.nix
T
Hermes 81de36baa2
CI / Build Packages (default) (pull_request) Successful in 1m12s
CI / Nix Flake Check (pull_request) Successful in 1m13s
CI / Build Packages (example-a) (pull_request) Successful in 59s
CI / Build Packages (example-b) (pull_request) Successful in 1m0s
CI / Build Packages (pyzotero) (pull_request) Successful in 1m25s
CI / Build Packages (pyzotero-cli) (pull_request) Successful in 1m25s
Add libplist runtime dep via wrapper (fixes silent provisioning failure)
2026-08-08 12:01:40 +00:00

53 lines
1.4 KiB
Nix

{
lib,
buildDubPackage,
fetchFromGitHub,
makeWrapper,
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;
nativeBuildInputs = [ makeWrapper ];
buildInputs = [ zlib openssl_1_1 ];
# libplist is dlopen'd at runtime by the plist-d C binding via dynamic-loader
# (libplist-2.0.so.3). It is NOT linked, so it does not land in the closure
# via buildInputs. Without it the ADI provisioning step throws
# LibraryLoadingException and the server serves unprovisioned data, so Apple
# rejects the login. Wrap the binary with LD_LIBRARY_PATH so dlopen finds it.
postFixup = ''
wrapProgram $out/bin/anisette-v3-server \
--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [ 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;
};
}