diff options
author | Yureka <yuka@yuka.dev> | 2023-03-20 18:22:53 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-20 18:22:53 +0100 |
commit | 2676c648eaa25553d4c89ec4042ce0813d350eb1 (patch) | |
tree | 7ca84aa5dc9bfe5510d3bbeff9d7573fa8672b88 /pkgs/servers/fastnetmon-advanced | |
parent | fb08d62502851a7459638789b35517420cfd7c6a (diff) |
fastnetmon-advanced: init at 2.0.335 (#218609)
Diffstat (limited to 'pkgs/servers/fastnetmon-advanced')
-rw-r--r-- | pkgs/servers/fastnetmon-advanced/default.nix | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/pkgs/servers/fastnetmon-advanced/default.nix b/pkgs/servers/fastnetmon-advanced/default.nix new file mode 100644 index 0000000000000..34e85914e77ac --- /dev/null +++ b/pkgs/servers/fastnetmon-advanced/default.nix @@ -0,0 +1,55 @@ +{ lib, stdenv, fetchurl, autoPatchelfHook, bzip2 }: + +stdenv.mkDerivation rec { + pname = "fastnetmon-advanced"; + version = "2.0.335"; + + src = fetchurl { + url = "https://repo.fastnetmon.com/fastnetmon_ubuntu_jammy/pool/fastnetmon/f/fastnetmon/fastnetmon_${version}_amd64.deb"; + hash = "sha256-2WdCQX0AiLTPGM9flVSXgKMrTGCwSXk9IfyS5SRKroY="; + }; + + nativeBuildInputs = [ + autoPatchelfHook + ]; + + buildInputs = [ + bzip2 + ]; + + unpackPhase = '' + ar xf $src + tar xf data.tar.xz + + # "These binaries are not part of FastNetMon and we shipped them by accident. They will be removed in next stable build" + rm opt/fastnetmon/app/bin/{generate_rsa_keys,license_app,fastnetmon_license_server} + + # ships with both 2_0_0 and 2_3_0 but the shared objects are not versioned and only 2_3_0 has the necessary symbols + rm -rf opt/fastnetmon/libraries/libclickhouse_2_0_0/ + + # unused libraries, which have additional dependencies + rm opt/fastnetmon/libraries/gcc1210/lib/libgccjit.so.0.0.1 + rm opt/fastnetmon/libraries/poco_1_10_0/lib/libPocoCryptod.so.70 + rm opt/fastnetmon/libraries/poco_1_10_0/lib/libPocoCrypto.so.70 + rm opt/fastnetmon/libraries/poco_1_10_0/lib/libPocoJWTd.so.70 + rm opt/fastnetmon/libraries/poco_1_10_0/lib/libPocoJWT.so.70 + rm opt/fastnetmon/libraries/wkhtmltopdf-0.12.3/wkhtmltox/lib/libwkhtmltox.so.0.12.3 + ''; + + installPhase = '' + mkdir -p $out/libexec/fastnetmon + cp -r opt/fastnetmon/app/bin $out/bin + cp -r opt/fastnetmon/libraries $out/libexec/fastnetmon + + addAutoPatchelfSearchPath $out/libexec/fastnetmon/libraries + ''; + + meta = with lib; { + description = "A high performance DDoS detector / sensor - commercial edition"; + homepage = "https://fastnetmon.com"; + sourceProvenance = with sourceTypes; [ binaryNativeCode ]; + maintainers = with maintainers; [ yuka ]; + license = licenses.unfree; + platforms = [ "x86_64-linux" ]; + }; +} |