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

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

50 lines
1.2 KiB
Nix
Raw Normal View History

{ lib, stdenv, fetchFromGitHub
, installShellFiles
2018-01-23 10:58:41 +00:00
, boost, zlib, openssl
, upnpSupport ? true, miniupnpc
, aesniSupport ? stdenv.hostPlatform.aesSupport
, avxSupport ? stdenv.hostPlatform.avxSupport
2018-01-23 10:58:41 +00:00
}:
2014-11-09 08:44:47 +00:00
stdenv.mkDerivation rec {
2015-07-07 07:47:22 +00:00
pname = "i2pd";
2023-06-23 15:23:17 +00:00
version = "2.48.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;
2023-06-23 15:23:17 +00:00
sha256 = "sha256-MqkpzNUd2FZgt9TZPtEp+jIq7r3sr+EeTpHlqNCgatU=";
2014-11-09 08:44:47 +00:00
};
buildInputs = [ boost zlib openssl ]
++ lib.optional upnpSupport miniupnpc;
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)
];
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
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
'';
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 00:00:00 +00: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
};
}