1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-26 23:52:33 +00:00
nixpkgs/pkgs/tools/networking/gvpe/default.nix
Michael Raskin 3d7152db82 Fix /sbin/ reference. On Linux just replace it with an "ip link" reference
svn path=/nixpkgs/trunk/; revision=16918
2009-09-01 22:42:05 +00:00

34 lines
840 B
Nix

a :
let
s = import ./src-for-default.nix;
buildInputs = with a; [
openssl gmp
];
in
rec {
src = a.fetchUrlFromSrcInfo s;
inherit (s) name;
inherit buildInputs;
configureFlags = [
"--enable-tcp"
"--enable-http-proxy"
"--enable-dns"
];
/* doConfigure should be removed if not needed */
phaseNames = ["doConfigure" "preBuild" "doMakeInstall"];
preBuild = a.fullDepEntry (''
sed -e 's@"/sbin/ifconfig.*"@"${a.iproute}/sbin/ip link set $IFNAME address $MAC mtu $MTU"@' -i src/device-linux.C
sed -e 's@/sbin/ifconfig@${a.nettools}/sbin/ifconfig@g' -i src/device-*.C
'') ["minInit" "doUnpack"];
meta = {
description = "A proteted multinode virtual network";
maintainers = [
a.lib.maintainers.raskin
];
platforms = with a.lib.platforms; linux ++ freebsd;
};
}