lol
fork

Configure Feed

Select the types of activity you want to include in your feed.

at 23.05-pre 102 lines 3.1 kB view raw
1{ lib 2, fetchFromGitHub 3, stdenv 4, autoreconfHook 5, pkg-config 6, bison 7, libiconv 8, pcre 9, libgcrypt 10, libxcrypt 11, json_c 12, libxml2 13, ipv6Support ? false 14, mccpSupport ? false 15, zlib 16, mysqlSupport ? false 17, libmysqlclient 18, postgresSupport ? false 19, postgresql 20, sqliteSupport ? false 21, sqlite 22, tlsSupport ? false 23, openssl 24, pythonSupport ? false 25, python310 26, ... 27}: 28 29stdenv.mkDerivation rec { 30 pname = "ldmud"; 31 version = "3.6.6"; 32 33 src = fetchFromGitHub { 34 owner = pname; 35 repo = pname; 36 rev = version; 37 sha256 = "sha256-2TaFt+T9B5Df6KWRQcbhY1E1D6NISb0oqLgyX47f5lI="; 38 }; 39 40 sourceRoot = "${src.name}/src"; 41 42 nativeBuildInputs = 43 [ autoreconfHook pkg-config bison ]; 44 buildInputs = [ libgcrypt libxcrypt pcre json_c libxml2 ] 45 ++ lib.optional mccpSupport zlib ++ lib.optional mysqlSupport libmysqlclient 46 ++ lib.optional postgresSupport postgresql 47 ++ lib.optional sqliteSupport sqlite ++ lib.optional tlsSupport openssl 48 ++ lib.optional pythonSupport python310 49 ++ lib.optionals stdenv.isDarwin [ libiconv ]; 50 51 # To support systems without autoconf LD puts its configure.ac in a non-default 52 # location and uses a helper script. We skip that script and symlink the .ac 53 # file to where the autoreconfHook find it. 54 preAutoreconf = '' 55 ln -fs ./autoconf/configure.ac ./ 56 ''; 57 58 configureFlags = [ 59 "--enable-erq=xerq" 60 "--enable-filename-spaces" 61 "--enable-use-json" 62 "--enable-use-xml=xml2" 63 (lib.enableFeature ipv6Support "use-ipv6") 64 (lib.enableFeature mccpSupport "use-mccp") 65 (lib.enableFeature mysqlSupport "use-mysql") 66 (lib.enableFeature postgresSupport "use-pgsql") 67 (lib.enableFeature sqliteSupport "use-sqlite") 68 (lib.enableFeatureAs tlsSupport "use-tls" "ssl") 69 (lib.enableFeature pythonSupport "use-python") 70 ]; 71 72 preConfigure = lib.optionalString mysqlSupport '' 73 export CPPFLAGS="-I${lib.getDev libmysqlclient}/include/mysql" 74 export LDFLAGS="-L${libmysqlclient}/lib/mysql" 75 ''; 76 77 installTargets = [ "install-driver" "install-utils" "install-headers" ]; 78 79 postInstall = '' 80 mkdir -p "$out/share/" 81 cp -v ../COPYRIGHT $out/share/ 82 ''; 83 84 meta = with lib; { 85 description = "A gamedriver for LPMuds including a LPC compiler, interpreter and runtime"; 86 homepage = "https://ldmud.eu"; 87 changelog = "https://github.com/ldmud/ldmud/blob/${version}/HISTORY"; 88 longDescription = '' 89 LDMud started as a project to clean up and modernize Amylaar's LPMud 90 gamedriver. Primary goals are full documentation, a commented source body 91 and out-of-the-box support for the major mudlibs, of which the commented 92 source body has been pretty much completed. During the course of work 93 a lot of bug fixes and improvements found their way into the driver - much 94 more than originally expected, and definitely enough to make LDMud 95 a driver in its own right. 96 ''; 97 # See https://github.com/ldmud/ldmud/blob/master/COPYRIGHT 98 license = licenses.unfreeRedistributable; 99 platforms = with platforms; linux ++ darwin; 100 maintainers = with maintainers; [ cpu ]; 101 }; 102}