about summary refs log tree commit diff
path: root/nixpkgs/pkgs/servers/networking
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/servers/networking')
-rw-r--r--nixpkgs/pkgs/servers/networking/exabgp/default.nix45
-rw-r--r--nixpkgs/pkgs/servers/networking/rustus/default.nix72
2 files changed, 117 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/servers/networking/exabgp/default.nix b/nixpkgs/pkgs/servers/networking/exabgp/default.nix
new file mode 100644
index 000000000000..fa1b032a3c5e
--- /dev/null
+++ b/nixpkgs/pkgs/servers/networking/exabgp/default.nix
@@ -0,0 +1,45 @@
+{ lib
+, python3
+, fetchFromGitHub
+, exabgp
+, testers
+}:
+
+python3.pkgs.buildPythonApplication rec {
+  pname = "exabgp";
+  version = "4.2.21";
+  format = "pyproject";
+
+  src = fetchFromGitHub {
+    owner = "Exa-Networks";
+    repo = "exabgp";
+    rev = "refs/tags/${version}";
+    hash = "sha256-NlGE3yHUXPdxAMGhSaXMT2P1e7P+4AWg4lReP3f6Zx8=";
+  };
+
+  nativeBuildInputs = with python3.pkgs; [
+    setuptools
+  ];
+
+  pythonImportsCheck = [
+    "exabgp"
+  ];
+
+  nativeCheckInputs = with python3.pkgs; [
+    pytestCheckHook
+  ];
+
+  passthru.tests = {
+    version = testers.testVersion {
+      package = exabgp;
+    };
+  };
+
+  meta = with lib; {
+    description = "The BGP swiss army knife of networking";
+    homepage = "https://github.com/Exa-Networks/exabgp";
+    changelog = "https://github.com/Exa-Networks/exabgp/blob/${src.rev}/CHANGELOG.rst";
+    license = licenses.bsd3;
+    maintainers = with maintainers; [ hexa raitobezarius ];
+  };
+}
diff --git a/nixpkgs/pkgs/servers/networking/rustus/default.nix b/nixpkgs/pkgs/servers/networking/rustus/default.nix
new file mode 100644
index 000000000000..53c76184a8b8
--- /dev/null
+++ b/nixpkgs/pkgs/servers/networking/rustus/default.nix
@@ -0,0 +1,72 @@
+{ stdenv
+, lib
+, fetchFromGitHub
+, rustPlatform
+, nix-update-script
+, pkg-config
+, openssl
+, Security
+}:
+
+let
+  pname = "rustus";
+  version = "0.7.6";
+in
+rustPlatform.buildRustPackage {
+  inherit pname version;
+
+  src = fetchFromGitHub {
+    owner = "s3rius";
+    repo = pname;
+    rev = version;
+    hash = "sha256-osxdqwNUONCScFarpQV48C7CR1DVR/mCttaglqiAKPo=";
+  };
+
+  cargoHash = "sha256-M0mJ+9VznzHDmdKAsT3YamyG/P0JF8oPeVHaX44NWM4=";
+
+  env.OPENSSL_NO_VENDOR = 1;
+
+  nativeBuildInputs = [
+    pkg-config
+  ];
+
+  buildInputs = [
+    openssl
+  ] ++ lib.optionals stdenv.isDarwin [
+    Security
+  ];
+
+  passthru.updateScript = nix-update-script { };
+
+  # too many tests fail for now
+  # doCheck = false;
+  # checkFlags = [
+  #   # tries to make a network access
+  #   "--skip=tests::curl_http_ockam"
+  #   "--skip=medium_file_transfer"
+  #   "--skip=medium_file_transfer_large_chunks"
+  #   "--skip=medium_file_transfer_small_chunks"
+  #   "--skip=tiny_file_transfer"
+  #   "--skip=tiny_file_transfer_small_chunks"
+  #   # tries to do IO
+  #   "--skip=cli_state::tests::integration"
+  #   "--skip=cli_state::tests::test_create_default_identity_state"
+  #   "--skip=cli_state::tests::test_create_named_identity_state"
+  #   "--skip=kafka::integration_test::test::producer__flow_with_mock_kafka__content_encryption_and_decryption"
+  #   "--skip=kafka::portal_worker::test::kafka_portal_worker__metadata_exchange__response_changed"
+  #   "--skip=full_flow"
+  #   "--skip=run::parser::tests::detect_circular_dependency"
+  #   "--skip=run::parser::tests::test_parse_config_with_depends_on"
+  #   "--skip=util::tests::test_process_multi_addr"
+  # ];
+
+
+  meta = with lib; {
+    description = "TUS protocol implementation in Rust.";
+    mainProgram = "rustus";
+    homepage = "https://s3rius.github.io/rustus/";
+    license = licenses.asl20;
+    maintainers = with maintainers; [ happysalada ];
+    platforms = platforms.all;
+  };
+}