Skip to content

Instantly share code, notes, and snippets.

@niklaskorz
Created March 22, 2025 12:50
Show Gist options
  • Save niklaskorz/cc41d7573192b1934a1d001013a6800b to your computer and use it in GitHub Desktop.
Save niklaskorz/cc41d7573192b1934a1d001013a6800b to your computer and use it in GitHub Desktop.
{
lib,
stdenv,
fetchFromGitHub,
cmake,
pkg-config,
boost,
openssl,
zlib,
readline,
bzip2,
mysql84,
}:
let
modules = {
mod-guildhouse = fetchFromGitHub {
owner = "azerothcore";
repo = "mod-guildhouse";
rev = "23b86dcc78471c50c60b3fc27e07e4cda8a3e200";
hash = "sha256-K1N9iYoQFmhK079JVOsD27xzFH1CmWxKk0DfVegZFJM=";
};
mod-autobalance = fetchFromGitHub {
owner = "azerothcore";
repo = "mod-autobalance";
rev = "2bf60989fc2384d4f92be4e2804aeca0ac6ed077";
hash = "sha256-kgkVlu1d9Dz5T3GD/e37QZHkCZKjut+PFkCo+PRkAUE=";
};
};
linkModules = lib.concatMapAttrsStringSep "\n" (name: source: ''
ln -s ${source} modules/${name}
'') modules;
in
stdenv.mkDerivation (finalAttrs: {
pname = "azerothcore";
version = "4.0.0-unstable-20250322";
src = fetchFromGitHub {
owner = "azerothcore";
repo = "azerothcore-wotlk";
rev = "ae76703b755cbb73efc76c768a8859bf140f78e9";
hash = "sha256-bRcnvNLGQPRnzCRnWoamlS3t4ufLi9/KeiuOt+Dieso=";
};
preConfigure = linkModules;
nativeBuildInputs = [
cmake
pkg-config
];
buildInputs = [
boost
openssl
zlib
readline
bzip2
# Since https://github.com/azerothcore/azerothcore-wotlk/pull/19451, azerothcore
# is not compatible with MariaDB and mariadb-connector-c anymore, which libmysqlclient
# unfortunately is aliased to on nixpkgs.
# However, the MySQL package itself contains the headers and libraries we need.
mysql84
];
cmakeFlags = [
"-DTOOLS_BUILD=all"
"-DSCRIPTS=static"
"-DMODULES=static"
# Git is used to determine the commit hash and date the package was compiled from.
# This makes it fall back to "unknown 1970-01-01 00:00:00 (Archived)".
"-DWITHOUT_GIT=true"
];
meta = {
description = "Complete Open Source and Modular solution for MMO";
homepage = "https://www.azerothcore.org/";
license = lib.licenses.agpl3Only;
maintainers = with lib.maintainers; [ niklaskorz ];
mainProgram = "azerothcore-wotlk";
platforms = lib.platforms.all;
};
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment