override.nix 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. pkgs: attrs: with pkgs;
  2. let
  3. ngtcp2 = pkgs.ngtcp2.overrideAttrs (finalAttrs: previousAttrs: rec {
  4. version = "1.8.1";
  5. src = fetchurl {
  6. url = "https://github.com/ngtcp2/ngtcp2/releases/download/v${version}/ngtcp2-${version}.tar.xz";
  7. hash = "sha256-rIRKees/FT5Mzc/szt9CxXqzUruKuS7IrF00F6ec+xE=";
  8. };
  9. });
  10. in rec {
  11. version = "8.5.0";
  12. versionWithUnderscores = "${lib.replaceStrings ["."] ["_"] version}";
  13. src = fetchurl {
  14. url = "https://github.com/curl/curl/releases/download/curl-${versionWithUnderscores}/curl-${version}.tar.bz2";
  15. hash = "sha256-zktqZlVDEUdiSq9YJjKjb+Gt4mLV+rOFxg94lC3Y2Hs=";
  16. };
  17. patches = [];
  18. buildInputs = [
  19. c-ares
  20. zlib
  21. zstd
  22. quictls
  23. nghttp3
  24. ngtcp2
  25. ];
  26. configureFlags = [
  27. "--build=x86_64-pc-linux-gnu"
  28. "--disable-manual"
  29. "--disable-ldap"
  30. "--disable-ldaps"
  31. "--enable-ares"
  32. "--with-openssl"
  33. "--with-ca-fallback"
  34. "--with-zstd=${zstd.dev}"
  35. "--with-brotli=${brotli.dev}"
  36. "--with-nghttp3"
  37. "--with-ngtcp2"
  38. "--without-gnutls"
  39. "--without-libidn2"
  40. "--without-libpsl"
  41. "--without-librtmp"
  42. "--without-wolfssl"
  43. ];
  44. # WARN:
  45. # _GNU_SOURCE is required in order to detect strerror_r flavor properly
  46. # Removing this setting will remain curl in compilable yet non-functional state.
  47. NIX_CFLAGS_COMPILE = [ "-D_GNU_SOURCE" ];
  48. }