gpac: add support for darwin

The cctools dependency is needed for libtool[^1], while the Carbon
dependency comes from carbon_hook.c[^2].

[^1]: df8121066c/src/Makefile (L377)
[^2]: df8121066c/applications/gpac/carbon_hook.c (L36).
This commit is contained in:
Alex James
2024-05-23 21:46:48 -05:00
committed by Florian Brandes
parent b5d17fecda
commit dda8c6649d
2 changed files with 16 additions and 5 deletions

View File

@@ -1,4 +1,4 @@
{ lib, stdenv, fetchFromGitHub, pkg-config, zlib }:
{ lib, stdenv, fetchFromGitHub, cctools, pkg-config, Carbon, zlib }:
stdenv.mkDerivation rec {
pname = "gpac";
@@ -13,9 +13,17 @@ stdenv.mkDerivation rec {
# this is the bare minimum configuration, as I'm only interested in MP4Box
# For most other functionality, this should probably be extended
nativeBuildInputs = [ pkg-config ];
nativeBuildInputs = [
pkg-config
] ++ lib.optionals stdenv.isDarwin [
cctools
];
buildInputs = [ zlib ];
buildInputs = [
zlib
] ++ lib.optionals stdenv.isDarwin [
Carbon
];
enableParallelBuilding = true;
@@ -36,6 +44,6 @@ stdenv.mkDerivation rec {
homepage = "https://gpac.wp.imt.fr";
license = licenses.lgpl21;
maintainers = with maintainers; [ bluescreen303 mgdelacroix ];
platforms = platforms.linux;
platforms = platforms.unix;
};
}

View File

@@ -20923,7 +20923,10 @@ with pkgs;
autoconf = buildPackages.autoconf269;
};
gpac = callPackage ../applications/video/gpac { };
gpac = callPackage ../applications/video/gpac {
inherit (darwin) cctools;
inherit (darwin.apple_sdk.frameworks) Carbon;
};
gpgme = callPackage ../development/libraries/gpgme { };