2018-07-21 01:44:44 +01:00
|
|
|
{ stdenv, fetchFromGitHub
|
2018-01-23 10:58:41 +00:00
|
|
|
, boost, zlib, openssl
|
|
|
|
, upnpSupport ? true, miniupnpc ? null
|
2019-05-06 00:40:20 +01:00
|
|
|
, aesniSupport ? builtins.elem (stdenv.hostPlatform.platform.gcc.arch or "default") [ "sandybridge" "ivybridge" "haswell" "broadwell" "skylake" "skylake-avx512" "btver2" "bdver1" "bdver2" "bdver3" "bdver4" "znver1"]
|
|
|
|
, avxSupport ? builtins.elem (stdenv.hostPlatform.platform.gcc.arch or "default") [ "sandybridge" "ivybridge" "haswell" "broadwell" "skylake" "skylake-avx512" "btver2" "bdver1" "bdver2" "bdver3" "bdver4" "znver1"]
|
2018-01-23 10:58:41 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
assert upnpSupport -> miniupnpc != null;
|
2014-11-09 08:44:47 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2015-07-07 08:47:22 +01:00
|
|
|
pname = "i2pd";
|
2020-06-14 18:39:46 +01:00
|
|
|
version = "2.32.1";
|
2014-11-09 08:44:47 +00:00
|
|
|
|
2015-07-07 08:47:22 +01:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "PurpleI2P";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2020-06-14 18:39:46 +01:00
|
|
|
sha256 = "15ng2c7i3jxmhpc2q0dl8arc72qbsq9y9paz5hgln907yy7dqx7c";
|
2014-11-09 08:44:47 +00:00
|
|
|
};
|
|
|
|
|
2018-01-23 10:58:41 +00:00
|
|
|
buildInputs = with stdenv.lib; [ boost zlib openssl ]
|
|
|
|
++ optional upnpSupport miniupnpc;
|
|
|
|
makeFlags =
|
|
|
|
let ynf = a: b: a + "=" + (if b then "yes" else "no"); in
|
|
|
|
[ (ynf "USE_AESNI" aesniSupport)
|
|
|
|
(ynf "USE_AVX" avxSupport)
|
|
|
|
(ynf "USE_UPNP" upnpSupport)
|
|
|
|
];
|
2015-11-22 19:35:11 +00:00
|
|
|
|
2014-11-09 08:44:47 +00:00
|
|
|
installPhase = ''
|
2015-12-29 08:17:06 +00:00
|
|
|
install -D i2pd $out/bin/i2pd
|
2014-11-09 08:44:47 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://i2pd.website";
|
2014-11-09 08:44:47 +00:00
|
|
|
description = "Minimal I2P router written in C++";
|
2017-07-01 01:00:00 +01:00
|
|
|
license = licenses.bsd3;
|
2014-11-09 08:44:47 +00:00
|
|
|
maintainers = with maintainers; [ edwtjo ];
|
2015-03-20 15:52:02 +00:00
|
|
|
platforms = platforms.linux;
|
2014-11-09 08:44:47 +00:00
|
|
|
};
|
2015-03-20 15:52:02 +00:00
|
|
|
}
|