{
  lib,
  stdenv,
  boost,
  fetchFromGitHub,
  openssl,
  zlib,
}:

stdenv.mkDerivation {
  pname = "i2pd-tools";
  version = "2.56.0.c7dea1f";

  #tries to access the network during the tests, which fails

  src = fetchFromGitHub {
    owner = "PurpleI2P";
    repo = "i2pd-tools";
    rev = "c7dea1f3ff1aefa62d30dba0e5c57e1322026ee3";
    hash = "sha256-9yD85Z8zND29nYvA4Y58hQElW6Qvcy3bs769sCoTZk0=";
    fetchSubmodules = true;
  };

  buildInputs = [
    zlib
    openssl
    boost
  ];

  installPhase = ''
    runHook preInstall

    mkdir -p $out/bin
    for bin in \
        routerinfo keygen vain keyinfo regaddr \
        regaddr_3ld regaddralias x25519 famtool autoconf;
    do
      install -Dm755 $bin -t $out/bin
    done

    runHook postInstall
  '';

  meta = {
    description = "Toolsuite to work with keys and eepsites";
    homepage = "https://github.com/PurpleI2P/i2pd-tools";
    license = lib.licenses.bsd3;
    maintainers = with lib.maintainers; [ MulliganSecurity ];
    mainProgram = "i2pd-tools";
  };
}
