Files
my-pkgs/pkgs/anisette-v3-server/default.nix
T

46 lines
1.2 KiB
Nix

{
lib,
buildDubPackage,
fetchFromGitHub,
zlib,
openssl_1_1,
}:
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;
# The reference Dockerfile builds with `dub build -c "static"` (statically
# linked D runtime). The Android-ELF loader does low-level symbol resolution
# and memory manipulation that is fragile with a dynamically-linked D runtime
# (GC/TLS conflicts), which can make the ADI provisioning step fail silently.
# Match the reference build config.
dubBuildFlags = [ "-c" "static" ];
buildInputs = [ zlib openssl_1_1 ];
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;
};
}