From 5c304acd4332e5e582572e1ef12947a563a91877 Mon Sep 17 00:00:00 2001 From: Et7f3 Date: Tue, 3 Jan 2023 02:01:29 +0100 Subject: [PATCH] ocamlPackages.gstreamer: fix build on darwin --- pkgs/development/ocaml-modules/gstreamer/default.nix | 4 ++-- pkgs/top-level/ocaml-packages.nix | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/pkgs/development/ocaml-modules/gstreamer/default.nix b/pkgs/development/ocaml-modules/gstreamer/default.nix index 4ef3e98cb75..34407299914 100644 --- a/pkgs/development/ocaml-modules/gstreamer/default.nix +++ b/pkgs/development/ocaml-modules/gstreamer/default.nix @@ -1,4 +1,4 @@ -{ lib, buildDunePackage, fetchFromGitHub, dune-configurator, pkg-config, glib, gst_all_1 }: +{ lib, stdenv, buildDunePackage, fetchFromGitHub, dune-configurator, AppKit, Foundation, pkg-config, glib, gst_all_1 }: buildDunePackage rec { pname = "gstreamer"; @@ -12,7 +12,7 @@ buildDunePackage rec { }; nativeBuildInputs = [ pkg-config ]; - buildInputs = [ dune-configurator ]; + buildInputs = [ dune-configurator ] ++ lib.optionals stdenv.isDarwin [ AppKit Foundation ]; propagatedBuildInputs = [ glib.dev gst_all_1.gstreamer.dev gst_all_1.gst-plugins-base ]; CFLAGS_COMPILE = [ diff --git a/pkgs/top-level/ocaml-packages.nix b/pkgs/top-level/ocaml-packages.nix index f2816f20cba..5e6ec1a742d 100644 --- a/pkgs/top-level/ocaml-packages.nix +++ b/pkgs/top-level/ocaml-packages.nix @@ -522,7 +522,9 @@ let inherit (pkgs) gsl; }; - gstreamer = callPackage ../development/ocaml-modules/gstreamer { }; + gstreamer = callPackage ../development/ocaml-modules/gstreamer { + inherit (pkgs.darwin.apple_sdk.frameworks) AppKit Foundation; + }; h2 = callPackage ../development/ocaml-modules/h2 { };