2022-02-20 05:27:41 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, cmake
|
|
|
|
, git
|
|
|
|
, pkg-config
|
|
|
|
, qttools
|
|
|
|
, which
|
|
|
|
, wrapQtAppsHook
|
|
|
|
, boost
|
|
|
|
, hunspell
|
|
|
|
, libGLU
|
|
|
|
, libsForQt5
|
|
|
|
, libsecret
|
|
|
|
, libzip
|
|
|
|
, lua
|
|
|
|
, pcre
|
|
|
|
, pugixml
|
|
|
|
, qtbase
|
|
|
|
, qtmultimedia
|
2022-11-21 17:40:18 +00:00
|
|
|
, discord-rpc
|
2022-02-20 05:27:41 +00:00
|
|
|
, yajl
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
let
|
2022-11-21 17:40:18 +00:00
|
|
|
overrideLua =
|
|
|
|
let
|
|
|
|
packageOverrides = self: super: {
|
|
|
|
# luasql-sqlite3 master branch broke compatibility with lua 5.1. Pin to
|
|
|
|
# an earlier commit.
|
|
|
|
# https://github.com/lunarmodules/luasql/issues/147
|
|
|
|
luasql-sqlite3 = super.luaLib.overrideLuarocks super.luasql-sqlite3
|
|
|
|
(drv: {
|
|
|
|
version = "2.6.0-1-custom";
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "lunarmodules";
|
|
|
|
repo = "luasql";
|
|
|
|
rev = "8c58fd6ee32faf750daf6e99af015a31402578d1";
|
|
|
|
hash = "sha256-XlTB5O81yWCrx56m0cXQp7EFzeOyfNeqGbuiYqMrTUk=";
|
|
|
|
};
|
|
|
|
});
|
|
|
|
};
|
|
|
|
in
|
|
|
|
lua.override { inherit packageOverrides; };
|
|
|
|
|
|
|
|
luaEnv = overrideLua.withPackages (ps: with ps; [
|
|
|
|
luazip
|
|
|
|
luafilesystem
|
|
|
|
lrexlib-pcre
|
|
|
|
luasql-sqlite3
|
|
|
|
lua-yajl
|
|
|
|
luautf8
|
2021-09-18 10:52:07 +00:00
|
|
|
]);
|
2020-04-24 23:36:52 +00:00
|
|
|
in
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "mudlet";
|
2022-11-21 17:40:18 +00:00
|
|
|
version = "4.16.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Mudlet";
|
|
|
|
repo = "Mudlet";
|
|
|
|
rev = "Mudlet-${version}";
|
|
|
|
fetchSubmodules = true;
|
2022-11-21 17:40:18 +00:00
|
|
|
hash = "sha256-HrrEbcMv35IGmYD1L1zmdcpYdFM2PLBEqPY+jMJioTA=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-02-20 05:27:41 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
cmake
|
|
|
|
git
|
|
|
|
pkg-config
|
|
|
|
qttools
|
|
|
|
which
|
|
|
|
wrapQtAppsHook
|
|
|
|
];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
buildInputs = [
|
2022-02-20 05:27:41 +00:00
|
|
|
boost
|
|
|
|
hunspell
|
|
|
|
libGLU
|
|
|
|
libsForQt5.qtkeychain
|
|
|
|
libsecret
|
|
|
|
libzip
|
|
|
|
luaEnv
|
|
|
|
pcre
|
|
|
|
pugixml
|
|
|
|
qtbase
|
|
|
|
qtmultimedia
|
|
|
|
yajl
|
2022-11-21 17:40:18 +00:00
|
|
|
discord-rpc
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
2022-08-12 12:06:08 +00:00
|
|
|
cmakeFlags = [
|
|
|
|
# RPATH of binary /nix/store/.../bin/... contains a forbidden reference to /build/
|
|
|
|
"-DCMAKE_SKIP_BUILD_RPATH=ON"
|
|
|
|
];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
WITH_FONTS = "NO";
|
|
|
|
WITH_UPDATER = "NO";
|
|
|
|
|
2022-11-21 17:40:18 +00:00
|
|
|
installPhase = ''
|
2022-02-20 05:27:41 +00:00
|
|
|
runHook preInstall
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
mkdir -pv $out/lib
|
|
|
|
cp 3rdparty/edbee-lib/edbee-lib/qslog/lib/libQsLog.so $out/lib
|
|
|
|
mkdir -pv $out/bin
|
|
|
|
cp src/mudlet $out
|
|
|
|
mkdir -pv $out/share/mudlet
|
|
|
|
cp -r ../src/mudlet-lua/lua $out/share/mudlet/
|
|
|
|
|
|
|
|
mkdir -pv $out/share/applications
|
|
|
|
cp ../mudlet.desktop $out/share/applications/
|
|
|
|
|
|
|
|
mkdir -pv $out/share/pixmaps
|
|
|
|
cp -r ../mudlet.png $out/share/pixmaps/
|
|
|
|
|
|
|
|
makeQtWrapper $out/mudlet $out/bin/mudlet \
|
2022-02-20 05:27:41 +00:00
|
|
|
--set LUA_CPATH "${luaEnv}/lib/lua/${lua.luaversion}/?.so" \
|
|
|
|
--prefix LUA_PATH : "$NIX_LUA_PATH" \
|
2022-11-21 17:40:18 +00:00
|
|
|
--prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [ libsForQt5.qtkeychain discord-rpc ]}" \
|
2022-04-27 09:35:20 +00:00
|
|
|
--chdir "$out";
|
2022-02-20 05:27:41 +00:00
|
|
|
|
|
|
|
runHook postInstall
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Crossplatform mud client";
|
2022-02-20 05:27:41 +00:00
|
|
|
homepage = "https://www.mudlet.org/";
|
2022-11-21 17:40:18 +00:00
|
|
|
maintainers = with maintainers; [ wyvie pstn cpu ];
|
2020-04-24 23:36:52 +00:00
|
|
|
platforms = platforms.linux;
|
2022-02-20 05:27:41 +00:00
|
|
|
license = licenses.gpl2Plus;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|