aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/libs/curl/.yandex_meta/override.nix
blob: c836e6b03f9723062314dee98018b7ec7eb309ae (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
pkgs: attrs: with pkgs; 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
  ];

  configureFlags = [
    "--disable-manual"
    "--disable-ldap"
    "--disable-ldaps"
    "--enable-ares"
    "--with-openssl=${openssl.dev}"
    "--with-ca-fallback"
    "--with-zstd=${zstd.dev}"
    "--with-brotli=${brotli.dev}"
    "--without-gnutls"
    "--without-libidn2"
    "--without-librtmp"
    "--without-nghttp3"
    "--without-ngtcp2"
    "--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" ];
}