Skip to content

Commit

Permalink
libmediainfo: add curl support (NixOS#358992)
Browse files Browse the repository at this point in the history
  • Loading branch information
wineee authored Jan 4, 2025
2 parents d34ea48 + be632e8 commit b98e839
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions pkgs/by-name/li/libmediainfo/package.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
{ 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";
Expand All @@ -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";
Expand All @@ -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;

Expand Down

0 comments on commit b98e839

Please sign in to comment.