1{ fetchurl, unzip, stdenv, makeWrapper, qtbase, yajl, libzip, hunspell
2, boost, lua5_1, luafilesystem, luazip, lrexlib, luasqlite3, qmake }:
3
4stdenv.mkDerivation rec {
5 name = "mudlet-${version}";
6 version = "3.0.0-delta";
7
8 src = fetchurl {
9 url = "https://github.com/Mudlet/Mudlet/archive/Mudlet-${version}.tar.gz";
10 sha256 = "08fhqd323kgz5s17ac5z9dhkjxcmwvcmvhzy0x1vw4rayhijfrd7";
11 };
12
13 nativeBuildInputs = [ makeWrapper qmake ];
14 buildInputs = [
15 unzip qtbase lua5_1 hunspell libzip yajl boost
16 luafilesystem luazip lrexlib luasqlite3
17 ];
18
19 preConfigure = "cd src";
20
21 installPhase = let
22 luaZipPath = "${luazip}/lib/lua/5.1/?.so";
23 luaFileSystemPath = "${luafilesystem}/lib/lua/5.1/?.so";
24 lrexlibPath = "${lrexlib}/lib/lua/5.1/?.so";
25 luasqlitePath = "${luasqlite3}/lib/lua/5.1/?.so";
26 in ''
27 mkdir -pv $out/bin
28 cp mudlet $out
29 cp -r mudlet-lua $out
30
31 makeWrapper $out/mudlet $out/bin/mudlet \
32 --set LUA_CPATH "${luaFileSystemPath};${luaZipPath};${lrexlibPath};${luasqlitePath}" \
33 --run "cd $out";
34 '';
35
36 patches = [ ./libs.patch ];
37
38 meta = {
39 description = "Crossplatform mud client";
40 homepage = http://mudlet.org/;
41 maintainers = [ stdenv.lib.maintainers.wyvie ];
42 platforms = stdenv.lib.platforms.linux;
43 license = stdenv.lib.licenses.gpl2;
44 broken = true;
45 };
46}