summary refs log tree commit diff
path: root/pkgs/tools/networking/aria2/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/tools/networking/aria2/default.nix')
-rw-r--r--pkgs/tools/networking/aria2/default.nix11
1 files changed, 10 insertions, 1 deletions
diff --git a/pkgs/tools/networking/aria2/default.nix b/pkgs/tools/networking/aria2/default.nix
index 29426eef06e..5a534416adb 100644
--- a/pkgs/tools/networking/aria2/default.nix
+++ b/pkgs/tools/networking/aria2/default.nix
@@ -1,4 +1,4 @@
-{ lib, stdenv, fetchFromGitHub, pkg-config, autoreconfHook
+{ lib, stdenv, fetchFromGitHub, fetchpatch, pkg-config, autoreconfHook
 , gnutls, c-ares, libxml2, sqlite, zlib, libssh2
 , cppunit, sphinx
 , Security
@@ -15,6 +15,15 @@ stdenv.mkDerivation rec {
     sha256 = "sha256-xbiNSg/Z+CA0x0DQfMNsWdA+TATyX6dCeW2Nf3L3Kfs=";
   };
 
+  patches = [
+    # Fixes build errors clang 16 because `std::unary_function` and `std::binary_function`
+    # were removed in C++17, which is the default with clang 16.
+    (fetchpatch {
+      url = "https://github.com/aria2/aria2/commit/8956c58d126a4e57e114f69ba6a5961724b7a817.patch";
+      hash = "sha256-bwcR0YHlkxUdz1AKHq1m2bYI9vDVMv4x3WPsR8QEHtk=";
+    })
+  ];
+
   strictDeps = true;
   nativeBuildInputs = [ pkg-config autoreconfHook sphinx ];