1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-01 01:51:24 +00:00
nixpkgs/pkgs/tools/networking/i2pd/default.nix

45 lines
1 KiB
Nix
Raw Normal View History

{ lib, stdenv, fetchFromGitHub
2018-01-23 10:58:41 +00:00
, boost, zlib, openssl
, upnpSupport ? true, miniupnpc ? null
, 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 08:47:22 +01:00
pname = "i2pd";
2021-08-24 07:36:52 +01:00
version = "2.39.0";
2014-11-09 08:44:47 +00:00
2015-07-07 08:47:22 +01:00
src = fetchFromGitHub {
owner = "PurpleI2P";
repo = pname;
rev = version;
2021-08-24 07:36:52 +01:00
sha256 = "sha256-j8kHuX5Ca90ODjmF94HpGvjSpocDSuSxfVmvbIYRAKo=";
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;
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)
];
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
2014-11-09 08:44:47 +00:00
'';
meta = with lib; {
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 ];
platforms = platforms.unix;
2014-11-09 08:44:47 +00:00
};
}