Silvan Mosberger 374e6bcc40 treewide: Format all Nix files
Format all Nix files using the officially approved formatter,
making the CI check introduced in the previous commit succeed:

  nix-build ci -A fmt.check

This is the next step of the of the [implementation](https://github.com/NixOS/nixfmt/issues/153)
of the accepted [RFC 166](https://github.com/NixOS/rfcs/pull/166).

This commit will lead to merge conflicts for a number of PRs,
up to an estimated ~1100 (~33%) among the PRs with activity in the past 2
months, but that should be lower than what it would be without the previous
[partial treewide format](https://github.com/NixOS/nixpkgs/pull/322537).

Merge conflicts caused by this commit can now automatically be resolved while rebasing using the
[auto-rebase script](8616af08d9/maintainers/scripts/auto-rebase).

If you run into any problems regarding any of this, please reach out to the
[formatting team](https://nixos.org/community/teams/formatting/) by
pinging @NixOS/nix-formatting.
2025-04-01 20:10:43 +02:00

61 lines
1.3 KiB
Nix

{
lib,
stdenv,
fetchurl,
autoreconfHook,
pkg-config,
libzen,
zlib,
# Whether to enable resolving URLs via libcurl
curlSupport ? true,
curl,
}:
stdenv.mkDerivation rec {
pname = "libmediainfo";
version = "25.03";
src = fetchurl {
url = "https://mediaarea.net/download/source/libmediainfo/${version}/libmediainfo_${version}.tar.xz";
hash = "sha256-NfH9q4EjnKNVxt41ioT73gR3/tjrNQ5d/valmBRcUgc=";
};
nativeBuildInputs = [
autoreconfHook
pkg-config
];
buildInputs = [ zlib ] ++ lib.optionals curlSupport [ curl ];
propagatedBuildInputs = [ libzen ];
sourceRoot = "MediaInfoLib/Project/GNU/Library";
postPatch = lib.optionalString (stdenv.cc.targetPrefix != "") ''
substituteInPlace configure.ac \
--replace "pkg-config " "${stdenv.cc.targetPrefix}pkg-config "
'';
configureFlags =
[
"--enable-shared"
]
++ lib.optionals curlSupport [
"--with-libcurl"
];
enableParallelBuilding = true;
postInstall = ''
install -vD -m 644 libmediainfo.pc "$out/lib/pkgconfig/libmediainfo.pc"
'';
meta = with lib; {
description = "Shared library for mediainfo";
homepage = "https://mediaarea.net/";
changelog = "https://mediaarea.net/MediaInfo/ChangeLog";
license = licenses.bsd2;
platforms = platforms.unix;
maintainers = [ maintainers.devhell ];
};
}