diff --git a/pkgs/by-name/ld/ldmud/libxml2-2.12.0-compat.patch b/pkgs/by-name/ld/ldmud/libxml2-2.12.0-compat.patch deleted file mode 100644 index 372bdc8cafbd..000000000000 --- a/pkgs/by-name/ld/ldmud/libxml2-2.12.0-compat.patch +++ /dev/null @@ -1,18 +0,0 @@ -diff --git src/pkg-xml2.c src/pkg-xml2.c -index 048ca38c..9ea4de35 100644 ---- src/pkg-xml2.c -+++ src/pkg-xml2.c -@@ -507,8 +507,13 @@ f_xml_generate (svalue_t *sp) - return sp; - } - -+#if LIBXML_VERSION >= 21200 -+static void -+xml_pkg_error_handler(void * userData, const xmlError *error) -+#else - static void - xml_pkg_error_handler(void * userData, xmlErrorPtr error) -+#endif - { - if (error) - { diff --git a/pkgs/by-name/ld/ldmud/package.nix b/pkgs/by-name/ld/ldmud/package.nix index fa85bacb6c23..f97923fa4e59 100644 --- a/pkgs/by-name/ld/ldmud/package.nix +++ b/pkgs/by-name/ld/ldmud/package.nix @@ -26,29 +26,29 @@ python310, }: -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "ldmud"; - version = "3.6.7"; + version = "3.6.8"; src = fetchFromGitHub { owner = "ldmud"; repo = "ldmud"; - rev = version; - sha256 = "sha256-PkrjP7tSZMaj61Hsn++7+CumhqFPLbf0+eAI6afP9HA="; + tag = finalAttrs.version; + hash = "sha256-ojOLM1vkuwuF0vXx6lCH0+OlyLkkOOnTJEUiZPpUhzo="; }; patches = [ - ./libxml2-2.12.0-compat.patch ./mysql-compat.patch ]; - sourceRoot = "${src.name}/src"; + sourceRoot = "${finalAttrs.src.name}/src"; nativeBuildInputs = [ autoreconfHook pkg-config bison ]; + buildInputs = [ libgcrypt @@ -86,10 +86,14 @@ stdenv.mkDerivation rec { (lib.enableFeature pythonSupport "use-python") ]; - preConfigure = lib.optionalString mysqlSupport '' - export CPPFLAGS="-I${lib.getDev libmysqlclient}/include/mysql" - export LDFLAGS="-L${libmysqlclient}/lib/mysql" - ''; + preConfigure = + lib.optionalString mysqlSupport '' + export CPPFLAGS="-I${lib.getDev libmysqlclient}/include/mysql" + export LDFLAGS="-L${libmysqlclient}/lib/mysql" + '' + + lib.optionalString stdenv.hostPlatform.isDarwin '' + export LDFLAGS="$LDFLAGS -L${libiconv}/lib -liconv" + ''; installTargets = [ "install-driver" @@ -105,7 +109,7 @@ stdenv.mkDerivation rec { meta = { description = "Gamedriver for LPMuds including a LPC compiler, interpreter and runtime"; homepage = "https://ldmud.eu"; - changelog = "https://github.com/ldmud/ldmud/blob/${version}/HISTORY"; + changelog = "https://github.com/ldmud/ldmud/blob/${finalAttrs.version}/HISTORY"; longDescription = '' LDMud started as a project to clean up and modernize Amylaar's LPMud gamedriver. Primary goals are full documentation, a commented source body @@ -120,4 +124,4 @@ stdenv.mkDerivation rec { platforms = with lib.platforms; linux ++ darwin; maintainers = with lib.maintainers; [ cpu ]; }; -} +})