2018-03-27 01:42:46 +02:00
|
|
|
{stdenv, fetchurl, openssl, nettools, iproute, sysctl}:
|
2012-02-28 01:10:05 +01:00
|
|
|
|
|
|
|
let baseName = "gogoclient";
|
|
|
|
version = "1.2";
|
|
|
|
in
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "${baseName}-${version}";
|
|
|
|
|
|
|
|
src = fetchurl {
|
2012-09-01 21:23:38 +02:00
|
|
|
#url = http://gogo6.com/downloads/gogoc-1_2-RELEASE.tar.gz;
|
2018-11-24 23:53:27 +01:00
|
|
|
url = https://src.fedoraproject.org/repo/pkgs/gogoc/gogoc-1_2-RELEASE.tar.gz/41177ed683cf511cc206c7782c37baa9/gogoc-1_2-RELEASE.tar.gz;
|
2012-02-28 01:10:05 +01:00
|
|
|
sha256 = "a0ef45c0bd1fc9964dc8ac059b7d78c12674bf67ef641740554e166fa99a2f49";
|
|
|
|
};
|
|
|
|
patches = [./gcc46-include-fix.patch ./config-paths.patch ];
|
|
|
|
makeFlags = ["target=linux"];
|
|
|
|
installFlags = ["installdir=$(out)"];
|
|
|
|
|
2016-02-26 18:38:15 +01:00
|
|
|
hardeningDisable = [ "format" ];
|
2015-12-23 02:59:47 +01:00
|
|
|
|
2012-02-28 01:10:05 +01:00
|
|
|
buildInputs = [openssl];
|
|
|
|
|
|
|
|
preFixup = ''
|
2014-06-30 14:56:10 +02:00
|
|
|
mkdir -p $out/share/${name}
|
2012-02-28 01:10:05 +01:00
|
|
|
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" \
|
2013-03-19 10:21:04 +01:00
|
|
|
--replace "/sbin/ifconfig" "${nettools}/bin/ifconfig" \
|
|
|
|
--replace "/sbin/route" "${nettools}/bin/route" \
|
2012-02-28 01:10:05 +01:00
|
|
|
--replace "/sbin/ip" "${iproute}/sbin/ip" \
|
2018-03-27 01:42:46 +02:00
|
|
|
--replace "/sbin/sysctl" "${sysctl}/bin/sysctl"
|
2012-09-01 21:23:38 +02:00
|
|
|
sed -i -e 's/^.*Exec \$route -A.*$/& metric 128/' $out/template/linux.sh
|
2012-02-28 01:10:05 +01:00
|
|
|
'';
|
|
|
|
|
2018-08-23 17:57:20 +02:00
|
|
|
meta = with stdenv.lib; {
|
|
|
|
homepage = https://ipv6.ernet.in/Tunnel_broker;
|
2012-02-28 01:10:05 +01:00
|
|
|
description = "Client to connect to the Freenet6 IPv6 tunnel broker service";
|
2018-08-23 17:57:20 +02:00
|
|
|
maintainers = [ maintainers.bluescreen303 ];
|
|
|
|
license = licenses.bsd3;
|
|
|
|
platforms = platforms.linux;
|
2012-02-28 01:10:05 +01:00
|
|
|
};
|
|
|
|
}
|