wraith: init at 1.4.6

+96
+46
pkgs/applications/networking/irc/wraith/default.nix
···
··· 1 + { stdenv, fetchurl, openssl }: 2 + 3 + with stdenv; 4 + with stdenv.lib; 5 + 6 + mkDerivation rec { 7 + name = "wraith-${version}"; 8 + version = "1.4.6"; 9 + src = fetchurl { 10 + url = "mirror://sourceforge/wraithbotpack/wraith-v${version}.tar.gz"; 11 + sha256 = "0vb2hbjmwh040f5yhxvwcfxvgxa0q9zdy9vvddydn8zn782d7wl8"; 12 + }; 13 + buildInputs = [ openssl ]; 14 + patches = [ ./dlopen.patch ]; 15 + postPatch = '' 16 + substituteInPlace src/libssl.cc --subst-var-by openssl ${openssl} 17 + substituteInPlace src/libcrypto.cc --subst-var-by openssl ${openssl} 18 + ''; 19 + configureFlags = "--with-openssl=${openssl}"; 20 + installPhase = '' 21 + mkdir -p $out/bin 22 + cp -a wraith $out/bin/wraith 23 + ln -s wraith $out/bin/hub 24 + ''; 25 + 26 + meta = { 27 + description = "An IRC channel management bot written purely in C/C++"; 28 + longDescription = '' 29 + Wraith is an IRC channel management bot written purely in C/C++. It has 30 + been in development since late 2003. It is based on Eggdrop 1.6.12 but has 31 + since evolved into something much different at its core. TCL and loadable 32 + modules are currently not supported. 33 + 34 + Maintainer's Notes: 35 + Copy the binary out of the store before running it with the -C option to 36 + configure it. See https://github.com/wraith/wraith/wiki/GettingStarted . 37 + 38 + The binary will not run when moved onto non-NixOS systems; use patchelf 39 + to fix its runtime dependenices. 40 + ''; 41 + homepage = http://wraith.botpack.net/; 42 + license = licenses.gpl2Plus; 43 + maintainers = with maintainers; [ elitak ]; 44 + platforms = platforms.linux; 45 + }; 46 + }
+48
pkgs/applications/networking/irc/wraith/dlopen.patch
···
··· 1 + diff --git a/src/libcrypto.cc b/src/libcrypto.cc 2 + index 0339258..68746c8 100644 3 + --- a/src/libcrypto.cc 4 + +++ b/src/libcrypto.cc 5 + @@ -95,17 +95,9 @@ int load_libcrypto() { 6 + } 7 + 8 + sdprintf("Loading libcrypto"); 9 + + dlerror(); // Clear Errors 10 + + libcrypto_handle = dlopen("@openssl@/lib/libcrypto.so", RTLD_LAZY|RTLD_GLOBAL); 11 + 12 + - bd::Array<bd::String> libs_list(bd::String("libcrypto.so." SHLIB_VERSION_NUMBER " libcrypto.so libcrypto.so.0.9.8 libcrypto.so.7 libcrypto.so.6").split(' ')); 13 + - 14 + - for (size_t i = 0; i < libs_list.length(); ++i) { 15 + - dlerror(); // Clear Errors 16 + - libcrypto_handle = dlopen(bd::String(libs_list[i]).c_str(), RTLD_LAZY|RTLD_GLOBAL); 17 + - if (libcrypto_handle) { 18 + - sdprintf("Found libcrypto: %s", bd::String(libs_list[i]).c_str()); 19 + - break; 20 + - } 21 + - } 22 + if (!libcrypto_handle) { 23 + fprintf(stderr, STR("Unable to find libcrypto\n")); 24 + return(1); 25 + diff --git a/src/libssl.cc b/src/libssl.cc 26 + index b432c7b..8940998 100644 27 + --- a/src/libssl.cc 28 + +++ b/src/libssl.cc 29 + @@ -68,17 +68,9 @@ int load_libssl() { 30 + } 31 + 32 + sdprintf("Loading libssl"); 33 + + dlerror(); // Clear Errors 34 + + libssl_handle = dlopen("@openssl@/lib/libssl.so", RTLD_LAZY); 35 + 36 + - bd::Array<bd::String> libs_list(bd::String("libssl.so." SHLIB_VERSION_NUMBER " libssl.so libssl.so.0.9.8 libssl.so.7 libssl.so.6").split(' ')); 37 + - 38 + - for (size_t i = 0; i < libs_list.length(); ++i) { 39 + - dlerror(); // Clear Errors 40 + - libssl_handle = dlopen(bd::String(libs_list[i]).c_str(), RTLD_LAZY); 41 + - if (libssl_handle) { 42 + - sdprintf("Found libssl: %s", bd::String(libs_list[i]).c_str()); 43 + - break; 44 + - } 45 + - } 46 + if (!libssl_handle) { 47 + fprintf(stderr, STR("Unable to find libssl\n")); 48 + return(1);
+2
pkgs/top-level/all-packages.nix
··· 16392 16393 wmutils-core = callPackage ../tools/X11/wmutils-core { }; 16394 16395 wxmupen64plus = callPackage ../misc/emulators/wxmupen64plus { }; 16396 16397 x2x = callPackage ../tools/X11/x2x { };
··· 16392 16393 wmutils-core = callPackage ../tools/X11/wmutils-core { }; 16394 16395 + wraith = callPackage ../applications/networking/irc/wraith { }; 16396 + 16397 wxmupen64plus = callPackage ../misc/emulators/wxmupen64plus { }; 16398 16399 x2x = callPackage ../tools/X11/x2x { };