2022-10-21 18:38:19 +00:00
|
|
|
{ stdenv
|
|
|
|
, lib
|
|
|
|
, fetchFromGitHub
|
|
|
|
, rustPlatform
|
|
|
|
, pkg-config
|
|
|
|
, alsa-lib
|
|
|
|
, openssl
|
|
|
|
, withTTS ? false
|
|
|
|
, speechd
|
|
|
|
}:
|
2022-01-19 23:45:15 +00:00
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "blightmud";
|
2022-09-09 14:08:57 +00:00
|
|
|
version = "4.0.0";
|
2022-01-19 23:45:15 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = pname;
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2022-09-09 14:08:57 +00:00
|
|
|
sha256 = "sha256-80uTwbZjXoQnfP0VWM/CnvaHyRsPA1puASJwBm3GqJk=";
|
2022-01-19 23:45:15 +00:00
|
|
|
};
|
|
|
|
|
2022-09-09 14:08:57 +00:00
|
|
|
cargoSha256 = "sha256-uXr/5G0TH3EKqPwUKTwOguBExBEYB1D3/hr8nzOwCcM=";
|
2022-01-19 23:45:15 +00:00
|
|
|
|
|
|
|
buildFeatures = lib.optional withTTS "tts";
|
|
|
|
|
2022-10-21 18:38:19 +00:00
|
|
|
nativeBuildInputs = [ pkg-config rustPlatform.bindgenHook ];
|
2022-01-19 23:45:15 +00:00
|
|
|
|
2022-10-30 15:09:59 +00:00
|
|
|
buildInputs = [ alsa-lib openssl ] ++ lib.optionals withTTS [ speechd ];
|
2022-01-19 23:45:15 +00:00
|
|
|
|
2022-10-21 18:38:19 +00:00
|
|
|
checkFlags =
|
|
|
|
let
|
|
|
|
# Most of Blightmud's unit tests pass without trouble in the isolated
|
|
|
|
# Nixpkgs build env. The following tests need to be skipped.
|
|
|
|
skipList = [
|
|
|
|
"test_connect"
|
|
|
|
"test_gmcp_negotiation"
|
|
|
|
"test_ttype_negotiation"
|
|
|
|
"test_reconnect"
|
|
|
|
"test_is_connected"
|
|
|
|
"test_mud"
|
|
|
|
"test_server"
|
|
|
|
"test_lua_script"
|
|
|
|
"timer_test"
|
|
|
|
"validate_assertion_fail"
|
|
|
|
];
|
|
|
|
skipFlag = test: "--skip " + test;
|
|
|
|
in
|
|
|
|
builtins.concatStringsSep " " (builtins.map skipFlag skipList);
|
2022-01-19 23:45:15 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "A terminal MUD client written in Rust";
|
|
|
|
longDescription = ''
|
|
|
|
Blightmud is a terminal client for connecting to Multi User Dungeon (MUD)
|
|
|
|
games. It is written in Rust and supports TLS, GMCP, MSDP, MCCP2, tab
|
|
|
|
completion, text searching and a split view for scrolling. Blightmud can
|
|
|
|
be customized with Lua scripting for aliases, triggers, timers, customized
|
|
|
|
status bars, and more. Blightmud supports several accessibility features
|
|
|
|
including an optional built-in text-to-speech engine and a screen reader
|
|
|
|
friendly mode.
|
|
|
|
'';
|
|
|
|
homepage = "https://github.com/Blightmud/Blightmud";
|
|
|
|
license = licenses.gpl3Plus;
|
|
|
|
maintainers = with maintainers; [ cpu ];
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|