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

44 lines
1 KiB
Nix
Raw Normal View History

{ stdenv, fetchFromGitHub
2018-01-23 11:58:41 +01:00
, boost, zlib, openssl
, upnpSupport ? true, miniupnpc ? null
, aesniSupport ? false
, avxSupport ? false
}:
assert upnpSupport -> miniupnpc != null;
2014-11-09 09:44:47 +01:00
stdenv.mkDerivation rec {
2015-07-07 09:47:22 +02:00
name = pname + "-" + version;
pname = "i2pd";
2018-11-11 12:35:43 +01:00
version = "2.22.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;
2018-11-11 12:35:43 +01:00
sha256 = "1c4y5y6a9kssi9qmsyqz5hw29ya1s0i21fklnz48n08b7f4f9vlz";
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)
];
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
'';
meta = with stdenv.lib; {
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 ];
platforms = platforms.linux;
2014-11-09 09:44:47 +01:00
};
}