Merge pull request #154058 from cpu/cpu-blightmud-3.5.0

authored by legendofmiracles and committed by GitHub 25a9a2d6 f542129a

+83
+79
pkgs/games/blightmud/default.nix
···
··· 1 + { stdenv, lib, fetchFromGitHub, rustPlatform, pkg-config, alsa-lib, openssl 2 + , withTTS ? false, llvmPackages, speechd }: 3 + 4 + rustPlatform.buildRustPackage rec { 5 + pname = "blightmud"; 6 + version = "3.5.0"; 7 + 8 + src = fetchFromGitHub { 9 + owner = pname; 10 + repo = pname; 11 + rev = "v${version}"; 12 + sha256 = "sha256-DaICzwBew90YstV42wiY0IbvR1W4Hm8dzo3xY2qlMGQ="; 13 + }; 14 + 15 + cargoSha256 = "sha256-BamMTPh+GN9GG4puxyTauPhjCC8heCu1wsgFaw98s9U="; 16 + 17 + buildFeatures = lib.optional withTTS "tts"; 18 + 19 + nativeBuildInputs = [ pkg-config ]; 20 + 21 + buildInputs = [ alsa-lib openssl ] ++ lib.optional withTTS [ speechd ]; 22 + 23 + # Building the speech-dispatcher-sys crate for TTS support requires setting 24 + # LIBCLANG_PATH. 25 + LIBCLANG_PATH = lib.optionalString withTTS "${llvmPackages.libclang.lib}/lib"; 26 + 27 + preBuild = lib.optionalString withTTS '' 28 + # When building w/ TTS the speech-dispatcher-sys crate's build.rs uses 29 + # rust-bindgen with libspeechd. This bypasses the normal nixpkgs CC wrapper 30 + # so we have to adapt the BINDGEN_EXTRA_CLANG_ARGS env var to compensate. See 31 + # this blog post[0] for more information. 32 + # 33 + # [0]: https://hoverbear.org/blog/rust-bindgen-in-nix/ 34 + 35 + export BINDGEN_EXTRA_CLANG_ARGS="$(< ${stdenv.cc}/nix-support/libc-cflags) \ 36 + $(< ${stdenv.cc}/nix-support/cc-cflags) \ 37 + -isystem ${llvmPackages.libclang.lib}/lib/clang/${ 38 + lib.getVersion llvmPackages.clang 39 + }/include \ 40 + -idirafter ${stdenv.cc.cc}/lib/gcc/${stdenv.hostPlatform.config}/${ 41 + lib.getVersion stdenv.cc.cc 42 + }/include \ 43 + -idirafter ${speechd}/include" 44 + ''; 45 + 46 + checkFlags = let 47 + # Most of Blightmud's unit tests pass without trouble in the isolated 48 + # Nixpkgs build env. The following tests need to be skipped. 49 + skipList = [ 50 + "test_connect" 51 + "test_gmcp_negotiation" 52 + "test_ttype_negotiation" 53 + "test_reconnect" 54 + "test_mud" 55 + "test_server" 56 + "test_lua_script" 57 + "timer_test" 58 + "validate_assertion_fail" 59 + ]; 60 + skipFlag = test: "--skip " + test; 61 + in builtins.concatStringsSep " " (builtins.map skipFlag skipList); 62 + 63 + meta = with lib; { 64 + description = "A terminal MUD client written in Rust"; 65 + longDescription = '' 66 + Blightmud is a terminal client for connecting to Multi User Dungeon (MUD) 67 + games. It is written in Rust and supports TLS, GMCP, MSDP, MCCP2, tab 68 + completion, text searching and a split view for scrolling. Blightmud can 69 + be customized with Lua scripting for aliases, triggers, timers, customized 70 + status bars, and more. Blightmud supports several accessibility features 71 + including an optional built-in text-to-speech engine and a screen reader 72 + friendly mode. 73 + ''; 74 + homepage = "https://github.com/Blightmud/Blightmud"; 75 + license = licenses.gpl3Plus; 76 + maintainers = with maintainers; [ cpu ]; 77 + platforms = platforms.linux; 78 + }; 79 + }
+4
pkgs/top-level/all-packages.nix
··· 30861 lua = lua5_1; 30862 }; 30863 30864 n2048 = callPackage ../games/n2048 { }; 30865 30866 naev = callPackage ../games/naev { };
··· 30861 lua = lua5_1; 30862 }; 30863 30864 + blightmud = callPackage ../games/blightmud { }; 30865 + 30866 + blightmud-tts = callPackage ../games/blightmud { withTTS = true; }; 30867 + 30868 n2048 = callPackage ../games/n2048 { }; 30869 30870 naev = callPackage ../games/naev { };