2021-01-10 23:54:33 -08:00
|
|
|
{ lib, stdenv, fetchFromGitHub
|
2018-01-23 02:58:41 -08:00
|
|
|
, boost, zlib, openssl
|
|
|
|
, upnpSupport ? true, miniupnpc ? null
|
2020-08-04 19:32:41 -07:00
|
|
|
, aesniSupport ? stdenv.hostPlatform.aesSupport
|
|
|
|
, avxSupport ? stdenv.hostPlatform.avxSupport
|
2018-01-23 02:58:41 -08:00
|
|
|
}:
|
|
|
|
|
|
|
|
assert upnpSupport -> miniupnpc != null;
|
2014-11-09 00:44:47 -08:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2015-07-07 00:47:22 -07:00
|
|
|
pname = "i2pd";
|
2021-05-17 21:51:22 -07:00
|
|
|
version = "2.38.0";
|
2014-11-09 00:44:47 -08:00
|
|
|
|
2015-07-07 00:47:22 -07:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "PurpleI2P";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2021-05-17 21:51:22 -07:00
|
|
|
sha256 = "sha256-8wy6Zdnw0JgnHFLa1U3qlzjpDIqi2gykbkkV7lh+Zag=";
|
2014-11-09 00:44:47 -08:00
|
|
|
};
|
|
|
|
|
2021-01-15 01:19:50 -08:00
|
|
|
buildInputs = with lib; [ boost zlib openssl ]
|
2018-01-23 02:58:41 -08:00
|
|
|
++ optional upnpSupport miniupnpc;
|
2021-02-13 09:35:41 -08:00
|
|
|
|
2018-01-23 02:58:41 -08:00
|
|
|
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 11:35:11 -08:00
|
|
|
|
2021-02-13 09:35:41 -08:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2014-11-09 00:44:47 -08:00
|
|
|
installPhase = ''
|
2015-12-29 00:17:06 -08:00
|
|
|
install -D i2pd $out/bin/i2pd
|
2014-11-09 00:44:47 -08:00
|
|
|
'';
|
|
|
|
|
2021-01-10 23:54:33 -08:00
|
|
|
meta = with lib; {
|
2020-03-31 18:11:51 -07:00
|
|
|
homepage = "https://i2pd.website";
|
2014-11-09 00:44:47 -08:00
|
|
|
description = "Minimal I2P router written in C++";
|
2017-06-30 17:00:00 -07:00
|
|
|
license = licenses.bsd3;
|
2014-11-09 00:44:47 -08:00
|
|
|
maintainers = with maintainers; [ edwtjo ];
|
2021-02-13 09:35:41 -08:00
|
|
|
platforms = platforms.unix;
|
2014-11-09 00:44:47 -08:00
|
|
|
};
|
2015-03-20 08:52:02 -07:00
|
|
|
}
|