aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/libs/curl/.yandex_meta/override.nix
blob: 3fdf2c31e51e3537f5c0bf3b0172235f4317ebdb (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
pkgs: attrs: with pkgs;

let
  ngtcp2 = pkgs.ngtcp2.overrideAttrs (finalAttrs: previousAttrs: rec {
    version = "1.8.1";
    src = fetchurl {
      url = "https://github.com/ngtcp2/ngtcp2/releases/download/v${version}/ngtcp2-${version}.tar.xz";
      hash = "sha256-rIRKees/FT5Mzc/szt9CxXqzUruKuS7IrF00F6ec+xE=";
    };
  });
in rec {
  version = "8.5.0";
  versionWithUnderscores = "${lib.replaceStrings ["."] ["_"] version}";

  src = fetchurl {
    url = "https://github.com/curl/curl/releases/download/curl-${versionWithUnderscores}/curl-${version}.tar.bz2";
    hash = "sha256-zktqZlVDEUdiSq9YJjKjb+Gt4mLV+rOFxg94lC3Y2Hs=";
  };

  patches = [];

  buildInputs = [
    c-ares
    zlib
    zstd
    quictls
    nghttp3
    ngtcp2
  ];

  configureFlags = [
    "--disable-manual"
    "--disable-ldap"
    "--disable-ldaps"
    "--enable-ares"
    "--with-openssl"
    "--with-ca-fallback"
    "--with-zstd=${zstd.dev}"
    "--with-brotli=${brotli.dev}"
    "--with-nghttp3"
    "--with-ngtcp2"
    "--without-gnutls"
    "--without-libidn2"
    "--without-librtmp"
    "--without-wolfssl"
  ];

  # WARN:
  # _GNU_SOURCE is required in order to detect strerror_r flavor properly
  # Removing this setting will remain curl in compilable yet non-functional state.
  NIX_CFLAGS_COMPILE = [ "-D_GNU_SOURCE" ];
}