uboot: (firmwareOdroidC2/C4) don't invoke patch tool, use patches = [] instead
https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L948 this can do it nicely. Signed-off-by: Anton Arapov <anton@deadbeef.mx>
This commit is contained in:
commit
56de2bcd43
30691 changed files with 3076956 additions and 0 deletions
58
pkgs/applications/networking/irc/wraith/configure.patch
Normal file
58
pkgs/applications/networking/irc/wraith/configure.patch
Normal file
|
|
@ -0,0 +1,58 @@
|
|||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -6143,53 +6143,8 @@ rm -f confcache
|
||||
#AC_CHECK_HEADERS(openssl/ssl.h openssl/crypto.h)
|
||||
#AC_CHECK_HEADERS(zlib.h)
|
||||
|
||||
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for path to OpenSSL" >&5
|
||||
-$as_echo_n "checking for path to OpenSSL... " >&6; }
|
||||
-
|
||||
-
|
||||
-# Check whether --with-openssl was given.
|
||||
-if test "${with_openssl+set}" = set; then :
|
||||
- withval=$with_openssl; with_openssl_path=$withval
|
||||
-else
|
||||
- with_openssl_path=auto
|
||||
-fi
|
||||
-
|
||||
-
|
||||
-
|
||||
-cf_openssl_basedir=""
|
||||
-if test "$with_openssl_path" != "auto"; then
|
||||
- cf_openssl_basedir="`echo ${with_openssl_path} | sed 's/\/$//'`"
|
||||
-else
|
||||
- for dirs in /usr/local/ssl /usr/pkg /usr/local /usr/local/openssl; do
|
||||
- if test -f "${dirs}/include/openssl/opensslv.h" && test -f "${dirs}/lib/libssl.so"; then
|
||||
- cf_openssl_basedir="${dirs}"
|
||||
- break
|
||||
- fi
|
||||
- done
|
||||
- unset dirs
|
||||
-fi
|
||||
-if test ! -z "$cf_openssl_basedir"; then
|
||||
- if test -f "${cf_openssl_basedir}/include/openssl/opensslv.h" && test -f "${cf_openssl_basedir}/lib/libssl.so"; then
|
||||
- SSL_INCLUDES="-I${cf_openssl_basedir}/include"
|
||||
- SSL_LIBS="-L${cf_openssl_basedir}/lib"
|
||||
- else
|
||||
- cf_openssl_basedir=""
|
||||
- fi
|
||||
-else
|
||||
- if test -f "/usr/include/openssl/opensslv.h" ; then
|
||||
- cf_openssl_basedir="/usr"
|
||||
- fi
|
||||
-fi
|
||||
-
|
||||
-if test ! -z "$cf_openssl_basedir"; then
|
||||
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cf_openssl_basedir" >&5
|
||||
-$as_echo "$cf_openssl_basedir" >&6; }
|
||||
-else
|
||||
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
|
||||
-$as_echo "not found" >&6; }
|
||||
- as_fn_error 1 "OpenSSL is required." "$LINENO" 5
|
||||
-fi
|
||||
-unset cf_openssl_basedir
|
||||
+SSL_INCLUDES="-I@openssl.dev@/include"
|
||||
+SSL_LIBS="-L@openssl-lib@/lib"
|
||||
|
||||
save_CXX="$CXX"
|
||||
CXX="$CXX $SSL_INCLUDES"
|
||||
46
pkgs/applications/networking/irc/wraith/default.nix
Normal file
46
pkgs/applications/networking/irc/wraith/default.nix
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
{ lib, stdenv, fetchurl, openssl }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "wraith";
|
||||
version = "1.4.10";
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/wraithbotpack/wraith-v${version}.tar.gz";
|
||||
sha256 = "1h8159g6wh1hi69cnhqkgwwwa95fa6z1zrzjl219mynbf6vjjzkw";
|
||||
};
|
||||
hardeningDisable = [ "format" ];
|
||||
buildInputs = [ openssl ];
|
||||
patches = [ ./configure.patch ./dlopen.patch ];
|
||||
postPatch = ''
|
||||
substituteInPlace configure --subst-var-by openssl.dev ${openssl.dev} \
|
||||
--subst-var-by openssl-lib ${lib.getLib openssl}
|
||||
substituteInPlace src/libssl.cc --subst-var-by openssl ${lib.getLib openssl}
|
||||
substituteInPlace src/libcrypto.cc --subst-var-by openssl ${lib.getLib openssl}
|
||||
'';
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
cp -a wraith $out/bin/wraith
|
||||
ln -s wraith $out/bin/hub
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
broken = (stdenv.isLinux && stdenv.isAarch64);
|
||||
description = "An IRC channel management bot written purely in C/C++";
|
||||
longDescription = ''
|
||||
Wraith is an IRC channel management bot written purely in C/C++. It has
|
||||
been in development since late 2003. It is based on Eggdrop 1.6.12 but has
|
||||
since evolved into something much different at its core. TCL and loadable
|
||||
modules are currently not supported.
|
||||
|
||||
Maintainer's Notes:
|
||||
Copy the binary out of the store before running it with the -C option to
|
||||
configure it. See https://github.com/wraith/wraith/wiki/GettingStarted .
|
||||
|
||||
The binary will not run when moved onto non-NixOS systems; use patchelf
|
||||
to fix its runtime dependenices.
|
||||
'';
|
||||
homepage = "https://wraith.botpack.net/";
|
||||
license = licenses.gpl2Plus;
|
||||
maintainers = with maintainers; [ elitak ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
48
pkgs/applications/networking/irc/wraith/dlopen.patch
Normal file
48
pkgs/applications/networking/irc/wraith/dlopen.patch
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
diff --git a/src/libcrypto.cc b/src/libcrypto.cc
|
||||
index 5139f66..517103f 100644
|
||||
--- a/src/libcrypto.cc
|
||||
+++ b/src/libcrypto.cc
|
||||
@@ -100,17 +100,9 @@ int load_libcrypto() {
|
||||
}
|
||||
|
||||
sdprintf("Loading libcrypto");
|
||||
+ dlerror(); // Clear Errors
|
||||
+ libcrypto_handle = dlopen("@openssl@/lib/libcrypto.so", RTLD_LAZY|RTLD_GLOBAL);
|
||||
|
||||
- bd::Array<bd::String> libs_list(bd::String("libcrypto.so." SHLIB_VERSION_NUMBER " libcrypto.so libcrypto.so.1.1 libcrypto.so.1.0.0 libcrypto.so.0.9.8 libcrypto.so.10 libcrypto.so.9 libcrypto.so.8 libcrypto.so.7 libcrypto.so.6").split(' '));
|
||||
-
|
||||
- for (size_t i = 0; i < libs_list.length(); ++i) {
|
||||
- dlerror(); // Clear Errors
|
||||
- libcrypto_handle = dlopen(bd::String(libs_list[i]).c_str(), RTLD_LAZY|RTLD_GLOBAL);
|
||||
- if (libcrypto_handle) {
|
||||
- sdprintf("Found libcrypto: %s", bd::String(libs_list[i]).c_str());
|
||||
- break;
|
||||
- }
|
||||
- }
|
||||
if (!libcrypto_handle) {
|
||||
fprintf(stderr, STR("Unable to find libcrypto\n"));
|
||||
return(1);
|
||||
diff --git a/src/libssl.cc b/src/libssl.cc
|
||||
index 6010abc..86e29fc 100644
|
||||
--- a/src/libssl.cc
|
||||
+++ b/src/libssl.cc
|
||||
@@ -78,17 +78,9 @@ int load_libssl() {
|
||||
}
|
||||
|
||||
sdprintf("Loading libssl");
|
||||
+ dlerror(); // Clear Errors
|
||||
+ libssl_handle = dlopen("@openssl@/lib/libssl.so", RTLD_LAZY);
|
||||
|
||||
- bd::Array<bd::String> libs_list(bd::String("libssl.so." SHLIB_VERSION_NUMBER " libssl.so libssl.so.1.1 libssl.so.1.0.0 libssl.so.0.9.8 libssl.so.10 libssl.so.9 libssl.so.8 libssl.so.7 libssl.so.6").split(' '));
|
||||
-
|
||||
- for (size_t i = 0; i < libs_list.length(); ++i) {
|
||||
- dlerror(); // Clear Errors
|
||||
- libssl_handle = dlopen(bd::String(libs_list[i]).c_str(), RTLD_LAZY);
|
||||
- if (libssl_handle) {
|
||||
- sdprintf("Found libssl: %s", bd::String(libs_list[i]).c_str());
|
||||
- break;
|
||||
- }
|
||||
- }
|
||||
if (!libssl_handle) {
|
||||
fprintf(stderr, STR("Unable to find libssl\n"));
|
||||
return(1);
|
||||
Loading…
Add table
Add a link
Reference in a new issue