summary refs log tree commit diff
diff options
context:
space:
mode:
authorEdward Tjörnhammar <ed@cflags.cc>2015-01-14 22:07:53 +0100
committerEdward Tjörnhammar <ed@cflags.cc>2015-01-14 22:08:47 +0100
commita512ddbb3e6dc06275af18c7bbb0ba4249f3eae0 (patch)
tree8280b7263b0f784ed94d2b735ae1aeff209df01b
parentee62982af7e8a587692739a4a9cc8c5a65cab037 (diff)
downloadnixpkgs-a512ddbb3e6dc06275af18c7bbb0ba4249f3eae0.tar
nixpkgs-a512ddbb3e6dc06275af18c7bbb0ba4249f3eae0.tar.gz
nixpkgs-a512ddbb3e6dc06275af18c7bbb0ba4249f3eae0.tar.bz2
nixpkgs-a512ddbb3e6dc06275af18c7bbb0ba4249f3eae0.tar.lz
nixpkgs-a512ddbb3e6dc06275af18c7bbb0ba4249f3eae0.tar.xz
nixpkgs-a512ddbb3e6dc06275af18c7bbb0ba4249f3eae0.tar.zst
nixpkgs-a512ddbb3e6dc06275af18c7bbb0ba4249f3eae0.zip
nylon: fix metas and patch configure to use libevent.so not the absent libevent.a
-rw-r--r--pkgs/tools/networking/nylon/configure-use-solib.patch33
-rw-r--r--pkgs/tools/networking/nylon/default.nix10
2 files changed, 40 insertions, 3 deletions
diff --git a/pkgs/tools/networking/nylon/configure-use-solib.patch b/pkgs/tools/networking/nylon/configure-use-solib.patch
new file mode 100644
index 00000000000..02491d7660e
--- /dev/null
+++ b/pkgs/tools/networking/nylon/configure-use-solib.patch
@@ -0,0 +1,33 @@
+--- nylon-1.21/configure	2006-08-20 00:53:31.000000000 +0200
++++ nylon-1.21-patch/configure	2015-01-13 22:23:34.509154220 +0100
+@@ -5174,25 +5174,25 @@
+   *)
+      echo "$as_me:$LINENO: result: $withval" >&5
+ echo "${ECHO_T}$withval" >&6
+-     if test -f $withval/include/event.h -a -f $withval/lib/libevent.a; then
++     if test -f $withval/include/event.h -a -f $withval/lib/libevent.so; then
+         owd=`pwd`
+         if cd $withval; then withval=`pwd`; cd $owd; fi
+         EVENTINC="-I$withval/include"
+         EVENTLIB="-L$withval/lib -levent"
+-     elif test -f $withval/event.h -a -f $withval/libevent.a; then
++     elif test -f $withval/event.h -a -f $withval/libevent.so; then
+         owd=`pwd`
+         if cd $withval; then withval=`pwd`; cd $owd; fi
+         EVENTINC="-I$withval"
+         EVENTLIB="-L$withval -levent"
+      else
+-        { { echo "$as_me:$LINENO: error: event.h or libevent.a not found in $withval" >&5
+-echo "$as_me: error: event.h or libevent.a not found in $withval" >&2;}
++        { { echo "$as_me:$LINENO: error: event.h or libevent.so not found in $withval" >&5
++echo "$as_me: error: event.h or libevent.so not found in $withval" >&2;}
+    { (exit 1); exit 1; }; }
+      fi
+      ;;
+   esac
+ else
+-   if test -f ${prefix}/include/event.h -a -f ${prefix}/lib/libevent.a;
++   if test -f ${prefix}/include/event.h -a -f ${prefix}/lib/libevent.so;
+ then
+      EVENTINC="-I${prefix}/include"
+      EVENTLIB="-L${prefix}/lib -levent"
diff --git a/pkgs/tools/networking/nylon/default.nix b/pkgs/tools/networking/nylon/default.nix
index 9a9d41ed6a4..daeb7ffb57b 100644
--- a/pkgs/tools/networking/nylon/default.nix
+++ b/pkgs/tools/networking/nylon/default.nix
@@ -1,4 +1,4 @@
-{stdenv, fetchurl, libevent} :
+{ stdenv, fetchurl, libevent }:
 
 stdenv.mkDerivation {
   name = "nylon-1.21";
@@ -7,13 +7,17 @@ stdenv.mkDerivation {
     sha256 = "34c132b005c025c1a5079aae9210855c80f50dc51dde719298e1113ad73408a4";
   };
 
+  patches = [ ./configure-use-solib.patch ];
+
   configureFlags = [ "--with-libevent=${libevent}" ];
 
   buildInputs = [ libevent ];
 
-  meta = {
+  meta = with stdenv.lib; {
     homepage = http://monkey.org/~marius/nylon;
     description = "Proxy server, supporting SOCKS 4 and 5, as well as a mirror mode";
-    license = stdenv.lib.licenses.free;
+    license = licenses.bsdOriginal;
+    maintainers = with maintainers; [ edwtjo viric ];
+    platform = platforms.linux;
   };
 }