nixpkgs/pkgs/tools/networking/i2pd/default.nix

42 lines
987 B
Nix
Raw Normal View History

{ stdenv, fetchFromGitHub
2018-01-23 02:58:41 -08:00
, boost, zlib, openssl
, upnpSupport ? true, miniupnpc ? null
, aesniSupport ? false
, avxSupport ? false
}:
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";
2020-02-25 10:45:51 -08:00
version = "2.30.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;
2020-02-25 10:45:51 -08:00
sha256 = "nGl7c5UY9kJPRaMveMF+aIf8T11WFrB//37oKzREdvM=";
2014-11-09 00:44:47 -08:00
};
2018-01-23 02:58:41 -08: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)
];
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
'';
meta = with stdenv.lib; {
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 ];
platforms = platforms.linux;
2014-11-09 00:44:47 -08:00
};
}