nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at python-updates 78 lines 1.5 kB view raw
1{ 2 lib, 3 stdenv, 4 fetchFromGitHub, 5 ocaml, 6 findlib, 7 libGLU, 8 libglut, 9 camlp-streams, 10}: 11 12stdenv.mkDerivation rec { 13 pname = "ocaml${ocaml.version}-lablgl"; 14 version = "1.07"; 15 16 src = fetchFromGitHub { 17 owner = "garrigue"; 18 repo = "lablgl"; 19 rev = "v${version}"; 20 hash = "sha256-GiQKHMn5zHyvDrA2ve12X5YTm3/RZp8tukIqifgVaW4="; 21 }; 22 23 strictDeps = true; 24 25 nativeBuildInputs = [ 26 ocaml 27 findlib 28 ]; 29 buildInputs = [ 30 libglut 31 camlp-streams 32 ]; 33 propagatedBuildInputs = [ 34 libGLU 35 ]; 36 37 patches = [ ./META.patch ]; 38 39 preConfigure = '' 40 mkdir -p $out/bin 41 mkdir -p $out/lib/ocaml/${ocaml.version}/site-lib/stublibs 42 cp \ 43 Makefile.config.${if stdenv.hostPlatform.isDarwin then "osx" else "ex"} \ 44 Makefile.config 45 ''; 46 47 makeFlags = [ 48 "BINDIR=${placeholder "out"}/bin/" 49 "INSTALLDIR=${placeholder "out"}/lib/ocaml/${ocaml.version}/site-lib/lablgl/" 50 "DLLDIR=${placeholder "out"}/lib/ocaml/${ocaml.version}/site-lib/stublibs/" 51 "XINCLUDES=" 52 "TKINCLUDES=" 53 "TKLIBS=" 54 ]; 55 56 buildFlags = [ 57 "lib" 58 "libopt" 59 "glut" 60 "glutopt" 61 ]; 62 63 postInstall = '' 64 cp ./META $out/lib/ocaml/${ocaml.version}/site-lib/lablgl 65 ''; 66 67 meta = { 68 description = "OpenGL bindings for ocaml"; 69 homepage = "http://wwwfun.kurims.kyoto-u.ac.jp/soft/lsl/lablgl.html"; 70 license = lib.licenses.gpl2; 71 maintainers = with lib.maintainers; [ 72 pSub 73 vbgl 74 ]; 75 mainProgram = "lablglut"; 76 broken = lib.versionOlder ocaml.version "4.06"; 77 }; 78}