aria2: fix build with clang 16

Cherry-pick a commit from upstream, which removes usage of
`std::unary_function` and `std::binary_function`. These were dropped in
C++17, which is the default with clang 16.
This commit is contained in:
Randy Eckenrode 2023-10-27 09:03:51 -04:00
parent d73f0a1175
commit 09bad324a9
No known key found for this signature in database
GPG Key ID: 64C1CD4EC2A600D9

View File

@ -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-ErjFfSJDIgZq0qy0Zn5uZ9bZS2AtJq4FuBVuUuQgPTI=";
};
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 ];