2021-01-11 07:54:33 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub
|
2022-01-25 16:42:56 +00:00
|
|
|
, installShellFiles
|
2018-01-23 10:58:41 +00:00
|
|
|
, boost, zlib, openssl
|
|
|
|
, upnpSupport ? true, miniupnpc ? null
|
2020-08-05 02:32:41 +00:00
|
|
|
, aesniSupport ? stdenv.hostPlatform.aesSupport
|
|
|
|
, avxSupport ? stdenv.hostPlatform.avxSupport
|
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 07:47:22 +00:00
|
|
|
pname = "i2pd";
|
2022-08-22 12:03:21 +00:00
|
|
|
version = "2.43.0";
|
2014-11-09 08:44:47 +00:00
|
|
|
|
2015-07-07 07:47:22 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "PurpleI2P";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2022-08-22 12:03:21 +00:00
|
|
|
sha256 = "sha256-JIO1Zm7me/SX0W7sVHOesERnqvC7jy0Fu1vfKFePFd0=";
|
2014-11-09 08:44:47 +00:00
|
|
|
};
|
|
|
|
|
2021-01-15 09:19:50 +00:00
|
|
|
buildInputs = with lib; [ boost zlib openssl ]
|
2018-01-23 10:58:41 +00:00
|
|
|
++ optional upnpSupport miniupnpc;
|
2021-02-13 17:35:41 +00:00
|
|
|
|
2022-01-25 16:42:56 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
installShellFiles
|
|
|
|
];
|
|
|
|
|
2018-01-23 10:58:41 +00: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 19:35:11 +00:00
|
|
|
|
2021-02-13 17:35:41 +00:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2014-11-09 08:44:47 +00:00
|
|
|
installPhase = ''
|
2015-12-29 08:17:06 +00:00
|
|
|
install -D i2pd $out/bin/i2pd
|
2022-01-25 16:42:56 +00:00
|
|
|
install --mode=444 -D 'contrib/i2pd.service' "$out/etc/systemd/system/i2pd.service"
|
|
|
|
installManPage 'debian/i2pd.1'
|
2014-11-09 08:44:47 +00:00
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://i2pd.website";
|
2014-11-09 08:44:47 +00:00
|
|
|
description = "Minimal I2P router written in C++";
|
2017-07-01 00:00:00 +00:00
|
|
|
license = licenses.bsd3;
|
2014-11-09 08:44:47 +00:00
|
|
|
maintainers = with maintainers; [ edwtjo ];
|
2021-02-13 17:35:41 +00:00
|
|
|
platforms = platforms.unix;
|
2014-11-09 08:44:47 +00:00
|
|
|
};
|
2015-03-20 15:52:02 +00:00
|
|
|
}
|