gpac: add support for darwin

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

[^1]: https://github.com/gpac/gpac/blob/df8121066cf8fb25cc70adf7ca8b35bda82fe216/src/Makefile#L377
[^2]: https://github.com/gpac/gpac/blob/df8121066cf8fb25cc70adf7ca8b35bda82fe216/applications/gpac/carbon_hook.c#L36.
This commit is contained in:
Alex James
2024-07-07 12:48:08 -05:00
parent 6701c2c867
commit d721607e4b
2 changed files with 16 additions and 5 deletions
+12 -4
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;
};
}
+4 -1
View File
@@ -20963,7 +20963,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 { };