Unverified Commit b98e8391 authored by rewine's avatar rewine Committed by GitHub
Browse files

libmediainfo: add curl support (#358992)

parents d34ea488 be632e89
Loading
Loading
Loading
Loading
+11 −3
Original line number Diff line number Diff line
{ lib, stdenv, fetchurl, autoreconfHook, pkg-config, libzen, zlib }:
{ lib, stdenv, fetchurl, autoreconfHook, pkg-config, libzen, zlib

# Whether to enable resolving URLs via libcurl
, curlSupport ? true, curl
}:

stdenv.mkDerivation rec {
  pname = "libmediainfo";
@@ -10,7 +14,7 @@ stdenv.mkDerivation rec {
  };

  nativeBuildInputs = [ autoreconfHook pkg-config ];
  buildInputs = [ zlib ];
  buildInputs = [ zlib ] ++ lib.optionals curlSupport [ curl ];
  propagatedBuildInputs = [ libzen ];

  sourceRoot = "MediaInfoLib/Project/GNU/Library";
@@ -20,7 +24,11 @@ stdenv.mkDerivation rec {
      --replace "pkg-config " "${stdenv.cc.targetPrefix}pkg-config "
  '';

  configureFlags = [ "--enable-shared" ];
  configureFlags = [
    "--enable-shared"
  ] ++ lib.optionals curlSupport [
    "--with-libcurl"
  ];

  enableParallelBuilding = true;