3
0
Fork 0
forked from mirrors/nixpkgs

gvpe: reimpleemnt using mkDerivation

This commit is contained in:
Joachim Fasting 2015-06-15 14:10:46 +02:00
parent 34fda4cbe2
commit 6857170916
2 changed files with 20 additions and 23 deletions

View file

@ -1,33 +1,30 @@
a @ { openssl, gmp, nettools, iproute, zlib, ... } :
let
s = import ./src-for-default.nix;
buildInputs = with a; [
openssl gmp zlib
];
in
rec {
src = a.fetchUrlFromSrcInfo s;
{ stdenv, fetchurl, openssl, gmp, zlib, iproute, nettools }:
stdenv.mkDerivation rec {
name = "gvpe-${version}";
version = "2.25";
src = fetchurl {
url = "http://ftp.gnu.org/gnu/gvpe/gvpe-${version}.tar.gz";
sha256 = "1gsipcysvsk80gvyn9jnk9g0xg4ng9yd5zp066jnmpgs52d2vhvk";
};
buildInputs = [ openssl gmp zlib ];
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"];
preBuild = ''
sed -e 's@"/sbin/ifconfig.*"@"${iproute}/sbin/ip link set $IFNAME address $MAC mtu $MTU"@' -i src/device-linux.C
sed -e 's@/sbin/ifconfig@${nettools}/sbin/ifconfig@g' -i src/device-*.C
'';
meta = {
description = "A proteted multinode virtual network";
maintainers = [
a.lib.maintainers.raskin
];
platforms = with a.lib.platforms; linux ++ freebsd;
description = "A protected multinode virtual network";
maintainers = [ stdenv.lib.maintainers.raskin ];
platforms = with stdenv.lib.platforms; linux ++ freebsd;
};
}

View file

@ -1780,7 +1780,7 @@ let
gupnptools = callPackage ../tools/networking/gupnp-tools {};
gvpe = builderDefsPackage (callPackage ../tools/networking/gvpe) {};
gvpe = callPackage ../tools/networking/gvpe { };
gvolicon = callPackage ../tools/audio/gvolicon {};