2015-08-22 01:06:50 +02:00
|
|
|
{ stdenv, fetchurl, openssl, lzo, zlib, gcc, iproute }:
|
2015-04-05 08:46:14 +02:00
|
|
|
|
|
|
|
with stdenv.lib;
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2016-02-20 00:01:30 +01:00
|
|
|
version = "1.1.4";
|
2015-04-05 08:46:14 +02:00
|
|
|
name = "zerotierone";
|
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://github.com/zerotier/ZeroTierOne/archive/${version}.tar.gz";
|
2016-02-20 00:01:30 +01:00
|
|
|
sha256 = "10aw0dlkmprdvph3aqkqximxqkryf0l4jcnv2bbm7f1qvclqihva";
|
2015-04-05 08:46:14 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
preConfigure = ''
|
|
|
|
substituteInPlace ./make-linux.mk \
|
|
|
|
--replace 'CC=$(shell which clang gcc cc 2>/dev/null | head -n 1)' "CC=${gcc}/bin/gcc";
|
|
|
|
substituteInPlace ./make-linux.mk \
|
|
|
|
--replace 'CXX=$(shell which clang++ g++ c++ 2>/dev/null | head -n 1)' "CC=${gcc}/bin/g++";
|
2015-08-22 01:06:50 +02:00
|
|
|
substituteInPlace ./osdep/LinuxEthernetTap.cpp \
|
2016-02-28 04:13:30 +01:00
|
|
|
--replace 'execlp("ip",' 'execlp("${iproute}/bin/ip",'
|
2015-04-05 08:46:14 +02:00
|
|
|
'';
|
|
|
|
|
2015-08-22 01:06:50 +02:00
|
|
|
buildInputs = [ openssl lzo zlib gcc iproute ];
|
2015-04-05 08:46:14 +02:00
|
|
|
|
|
|
|
installPhase = ''
|
2015-12-05 13:59:05 +01:00
|
|
|
install -Dt "$out/bin/" zerotier-one
|
2015-08-22 01:06:50 +02:00
|
|
|
ln -s $out/bin/zerotier-one $out/bin/zerotier-idtool
|
|
|
|
ln -s $out/bin/zerotier-one $out/bin/zerotier-cli
|
2015-04-05 08:46:14 +02:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "Create flat virtual Ethernet networks of almost unlimited size";
|
|
|
|
homepage = https://www.zerotier.com;
|
|
|
|
license = stdenv.lib.licenses.gpl3;
|
|
|
|
maintainers = [ stdenv.lib.maintainers.sjmackenzie ];
|
2015-07-22 20:27:39 +02:00
|
|
|
platforms = with stdenv.lib; platforms.allBut [ "i686-linux" ];
|
2015-04-05 08:46:14 +02:00
|
|
|
};
|
|
|
|
}
|