Unverified Commit 7ea26cf7 authored by Weijia Wang's avatar Weijia Wang Committed by GitHub
Browse files

Merge pull request #227027 from wegank/lablgl-fix

ocamlPackages.lablgl: unbreak on darwin
parents 17148b8f c2c0c070
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -67,5 +67,6 @@ stdenv.mkDerivation rec {
    homepage = "https://raffalli.eu/~christophe/glsurf/";
    description = "A program to draw implicit surfaces and curves";
    license = lib.licenses.gpl2Plus;
    platforms = lib.platforms.all;
  };
}
+8 −3
Original line number Diff line number Diff line
{ lib, stdenv, fetchFromGitHub, ocaml, findlib, libGLU, libGL, freeglut } :
{ lib, stdenv, fetchFromGitHub, ocaml, findlib, libGLU, libGL, freeglut, darwin } :

if lib.versionOlder ocaml.version "4.03"
then throw "lablgl is not available for OCaml ${ocaml.version}"
@@ -19,7 +19,13 @@ stdenv.mkDerivation rec {

  nativeBuildInputs = [ ocaml findlib ];
  buildInputs = [ freeglut ];
  propagatedBuildInputs = [ libGLU libGL ];
  propagatedBuildInputs = [
    libGLU
    libGL
  ] ++ lib.optionals stdenv.isDarwin [
    darwin.apple_sdk.frameworks.GLUT
    darwin.apple_sdk.libs.Xplugin
  ];

  patches = [ ./Makefile.config.patch ./META.patch ];

@@ -46,6 +52,5 @@ stdenv.mkDerivation rec {
    license = licenses.gpl2;
    maintainers = with maintainers; [ pSub vbgl ];
    mainProgram = "lablglut";
    broken = stdenv.isDarwin;
  };
}