Merge pull request #227027 from wegank/lablgl-fix

ocamlPackages.lablgl: unbreak on darwin
This commit is contained in:
Weijia Wang 2023-04-20 10:17:15 +03:00 committed by GitHub
commit 7ea26cf753
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 3 deletions

View File

@ -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;
};
}

View File

@ -1,4 +1,4 @@
{ 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;
};
}