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