Updated gw6c and cleaned up the expression

svn path=/nixpkgs/trunk/; revision=11614
This commit is contained in:
Michael Raskin 2008-04-13 08:23:58 +00:00
parent 1898afa254
commit d30797b8ac
3 changed files with 42 additions and 32 deletions

View file

@ -0,0 +1,39 @@
args : with args;
rec {
src = fetchurl {
url = http://go6.net/4105/file.asp?file_id=150;
sha256 = "07svw71wad1kwip7vnsdwcvlhhknqlx8v8kmdnrw11f6xg76w2ln";
name = "gateway6-client-5.1.tar.gz";
};
buildInputs = [nettools openssl procps];
configureFlags = [];
makeFlags = ["target=linux"];
installFlags = ["installdir=$out"];
/* doConfigure should be specified separately */
phaseNames = ["preBuild" "doMakeInstall"];
goSrcDir = "cd ../tspc-advanced";
preBuild = FullDepEntry (''
sed -e 's@/dev/net/tun@/dev/tun@' -i platform/linux/tsp_tun.c;
sed -e 's@/sbin/ifconfig@${nettools}/sbin/ifconfig@' -i template/linux.sh
sed -e 's@/sbin/route@${nettools}/sbin/route@' -i template/linux.sh
sed -e 's@/sbin/ip@${iproute}/sbin/ip@' -i template/linux.sh
sed -e 's@/sbin/sysctl@${procps}/sbin/sysctl@' -i template/linux.sh
'') ["minInit" "addInputs" "doUnpack"];
name = "gateway6-client-" + version;
meta = {
description = "Gateway6 client - provides IPv6 tunnel";
longDescription = "
This package provides Gateway6 client (gw6c) daemon,
which connects to so called tunnel broker via IPv4
network, and tunnels IPv6 packets through broker,
thus giving global IPv6 connectivity. You may need
tun, ipv6 and sit modules.
";
homepage = http://go6.net ;
};
}

View file

@ -1,30 +0,0 @@
{stdenv, fetchurl, nettools, openssl, procps}:
stdenv.mkDerivation {
name = "Gateway6-Client";
src = fetchurl {
name = "GateWay6-Client.tar.gz";
url = http://www.go6.net/4105/file.asp?file_id=142;
sha256 = "1578i6j3kq7g5f55gy1nksl4q0lxssdk39ilrgqjc20gb6k5j7j3";
};
setSourceRoot = "sourceRoot=$(echo tspc*/)";
preBuild = "sed -e 's@/dev/net/tun@/dev/tun@' -i platform/linux/tsp_tun.c;
sed -e 's@/sbin/@/var/run/current-system/sw/sbin/@' -i template/linux.sh";
makeFlags = "target=linux";
installFlags = "installdir=\$(out)";
buildInputs = [nettools openssl procps];
meta = {
description = "
Gateway6 client. Provides IPv6 tunnel (by default - using
Freenet6 anonymous server, which means dynamic IPv6 address,
but if you register at any tunnel broker you can easily
enter you data in configuration.nix). You need also to enable
service \"gw6c\". And check that tun, ipv6 and sit are modprobed.
";
};
}

View file

@ -4457,9 +4457,10 @@ let pkgs = rec {
inherit stdenv fetchurl kernel xlibs gtkLibs;
};
gw6c = import ../os-specific/linux/gw6c {
inherit fetchurl stdenv nettools openssl procps;
gw6cFun = builderDefsPackage (selectVersion ../os-specific/linux/gw6c "5.1") {
inherit fetchurl stdenv nettools openssl procps iproute;
};
gw6c = gw6cFun null;
nss_ldap = import ../os-specific/linux/nss_ldap {
inherit fetchurl stdenv openldap;