3
0
Fork 0
forked from mirrors/nixpkgs

ocamlPackages.ocaml_libvirt: fix build on darwin

This commit is contained in:
Et7f3 2023-01-02 23:47:52 +01:00
parent e8cccc83cd
commit dea24b6610
2 changed files with 9 additions and 2 deletions

View file

@ -1,4 +1,4 @@
{ lib, stdenv, fetchFromGitLab, libvirt, autoreconfHook, pkg-config, ocaml, findlib, perl }:
{ lib, stdenv, fetchFromGitLab, libvirt, AppKit, Foundation, autoreconfHook, pkg-config, ocaml, findlib, perl }:
lib.throwIfNot (lib.versionAtLeast ocaml.version "4.02")
"libvirt is not available for OCaml ${ocaml.version}"
@ -18,6 +18,11 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ autoreconfHook pkg-config findlib perl ocaml ];
buildInputs = lib.optionals stdenv.isDarwin [
Foundation
AppKit
];
strictDeps = true;
buildFlags = [ "all" "opt" "CPPFLAGS=-Wno-error" ];

View file

@ -994,7 +994,9 @@ let
ocamlgraph = callPackage ../development/ocaml-modules/ocamlgraph { };
ocamlgraph_gtk = callPackage ../development/ocaml-modules/ocamlgraph/gtk.nix { };
ocaml_libvirt = callPackage ../development/ocaml-modules/ocaml-libvirt { };
ocaml_libvirt = callPackage ../development/ocaml-modules/ocaml-libvirt {
inherit (pkgs.darwin.apple_sdk.frameworks) Foundation AppKit;
};
ocamlify = callPackage ../development/tools/ocaml/ocamlify { };