diff --git a/pkgs/os-specific/linux/gogoclient/config-paths.patch b/pkgs/os-specific/linux/gogoclient/config-paths.patch new file mode 100644 index 000000000000..88358038bc7e --- /dev/null +++ b/pkgs/os-specific/linux/gogoclient/config-paths.patch @@ -0,0 +1,39 @@ +diff -urN gogoc-1_2-RELEASE/gogoc-tsp/conf/gogoc.conf.in gogoc-1_2-RELEASE-fix/gogoc-tsp/conf/gogoc.conf.in +--- gogoc-1_2-RELEASE/gogoc-tsp/conf/gogoc.conf.in 2009-11-20 17:53:12.000000000 +0100 ++++ gogoc-1_2-RELEASE-fix/gogoc-tsp/conf/gogoc.conf.in 2012-02-25 15:16:12.758849219 +0100 +@@ -224,7 +224,7 @@ + # + # broker_list= + # +-broker_list=tsp-broker-list.txt ++broker_list=/var/lib/gogoc/tsp-broker-list.txt + + # + # Last Server Used File Name: +@@ -234,7 +234,7 @@ + # + # last_server= + # +-last_server=tsp-last-server.txt ++last_server=/var/lib/gogoc/tsp-last-server.txt + + # + # Always Use Last Known Working Server: +@@ -294,7 +294,7 @@ + # + # log_filename= + # +-log_filename=gogoc.log ++log_filename=/var/log/gogoc.log + + # + # Log File Rotation: +@@ -313,7 +313,7 @@ + # + # log_rotation= + # +-log_rotation=yes ++log_rotation=no + + # + # Log File Rotation Size: diff --git a/pkgs/os-specific/linux/gogoclient/default.nix b/pkgs/os-specific/linux/gogoclient/default.nix new file mode 100644 index 000000000000..d1a4bf9feb65 --- /dev/null +++ b/pkgs/os-specific/linux/gogoclient/default.nix @@ -0,0 +1,38 @@ +{stdenv, fetchurl, openssl, nettools, iproute, procps}: + +let baseName = "gogoclient"; + version = "1.2"; +in + +stdenv.mkDerivation rec { + name = "${baseName}-${version}"; + + src = fetchurl { + url = http://gogo6.com/downloads/gogoc-1_2-RELEASE.tar.gz; + sha256 = "a0ef45c0bd1fc9964dc8ac059b7d78c12674bf67ef641740554e166fa99a2f49"; + }; + patches = [./gcc46-include-fix.patch ./config-paths.patch ]; + makeFlags = ["target=linux"]; + installFlags = ["installdir=$(out)"]; + + buildInputs = [openssl]; + + preFixup = '' + ensureDir $out/share/${name} + chmod 444 $out/bin/gogoc.conf + mv $out/bin/gogoc.conf $out/share/${name}/gogoc.conf.sample + rm $out/bin/gogoc.conf.sample + + substituteInPlace "$out/template/linux.sh" \ + --replace "/sbin/ifconfig" "${nettools}/sbin/ifconfig" \ + --replace "/sbin/route" "${nettools}/sbin/route" \ + --replace "/sbin/ip" "${iproute}/sbin/ip" \ + --replace "/sbin/sysctl" "${procps}/sbin/sysctl" + ''; + + meta = { + homepage = http://gogonet.gogo6.com; + description = "Client to connect to the Freenet6 IPv6 tunnel broker service"; + maintainers = [stdenv.lib.maintainers.bluescreen303]; + }; +} diff --git a/pkgs/os-specific/linux/gogoclient/gcc46-include-fix.patch b/pkgs/os-specific/linux/gogoclient/gcc46-include-fix.patch new file mode 100644 index 000000000000..22ecad187d62 --- /dev/null +++ b/pkgs/os-specific/linux/gogoclient/gcc46-include-fix.patch @@ -0,0 +1,22 @@ +diff -urN gogoc-1_2-RELEASE/gogoc-messaging/src/clientmsgsender.cc gogoc-1_2-RELEASE-fix/gogoc-messaging/src/clientmsgsender.cc +--- gogoc-1_2-RELEASE/gogoc-messaging/src/clientmsgsender.cc 2009-11-20 17:34:55.000000000 +0100 ++++ gogoc-1_2-RELEASE-fix/gogoc-messaging/src/clientmsgsender.cc 2012-02-25 15:06:20.764698284 +0100 +@@ -15,6 +15,7 @@ + // ************************************************************************** + #include + #include ++#include + + + namespace gogocmessaging +diff -urN gogoc-1_2-RELEASE/gogoc-messaging/src/servermsgsender.cc gogoc-1_2-RELEASE-fix/gogoc-messaging/src/servermsgsender.cc +--- gogoc-1_2-RELEASE/gogoc-messaging/src/servermsgsender.cc 2009-11-20 17:34:56.000000000 +0100 ++++ gogoc-1_2-RELEASE-fix/gogoc-messaging/src/servermsgsender.cc 2012-02-25 15:06:36.722740288 +0100 +@@ -15,6 +15,7 @@ + // ************************************************************************** + #include + #include ++#include + + + namespace gogocmessaging diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 8e5d09c55ed9..e74aba5c27c2 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -5989,6 +5989,8 @@ let numactl = callPackage ../os-specific/linux/numactl { }; + gogoclient = callPackage ../os-specific/linux/gogoclient { }; + gw6c = builderDefsPackage (import ../os-specific/linux/gw6c) { inherit fetchurl stdenv nettools openssl procps iproute; };