diff options
author | Alyssa Ross <hi@alyssa.is> | 2019-01-07 02:18:36 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2019-01-07 02:18:47 +0000 |
commit | 36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2 (patch) | |
tree | b3faaf573407b32aa645237a4d16b82778a39a92 /nixpkgs/pkgs/development/ocaml-modules/lablgl | |
parent | 4e31070265257dc67d120c27e0f75c2344fdfa9a (diff) | |
parent | abf060725d7614bd3b9f96764262dfbc2f9c2199 (diff) | |
download | nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.gz nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.bz2 nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.lz nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.xz nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.zst nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.zip |
Add 'nixpkgs/' from commit 'abf060725d7614bd3b9f96764262dfbc2f9c2199'
git-subtree-dir: nixpkgs git-subtree-mainline: 4e31070265257dc67d120c27e0f75c2344fdfa9a git-subtree-split: abf060725d7614bd3b9f96764262dfbc2f9c2199
Diffstat (limited to 'nixpkgs/pkgs/development/ocaml-modules/lablgl')
3 files changed, 130 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/ocaml-modules/lablgl/META.patch b/nixpkgs/pkgs/development/ocaml-modules/lablgl/META.patch new file mode 100644 index 000000000000..bf5b2184ac0a --- /dev/null +++ b/nixpkgs/pkgs/development/ocaml-modules/lablgl/META.patch @@ -0,0 +1,18 @@ +diff -r 562eb6ecb8ca META +--- a/META Wed Oct 01 20:09:24 2014 +0100 ++++ b/META Wed Oct 01 20:22:15 2014 +0100 +@@ -1,6 +1,5 @@ +-description "Bindings for OpenGL" ++description="Bindings for OpenGL" + version="1.05" +-directory="+lablGL" + archive(byte) = "lablgl.cma" + archive(native) = "lablgl.cmxa" + +@@ -16,4 +15,4 @@ + requires = "lablgl" + archive(byte) = "lablglut.cma" + archive(native) = "lablglut.cmxa" +-) +\ No newline at end of file ++) diff --git a/nixpkgs/pkgs/development/ocaml-modules/lablgl/Makefile.config.patch b/nixpkgs/pkgs/development/ocaml-modules/lablgl/Makefile.config.patch new file mode 100644 index 000000000000..3d880c00947e --- /dev/null +++ b/nixpkgs/pkgs/development/ocaml-modules/lablgl/Makefile.config.patch @@ -0,0 +1,67 @@ +diff -Naur lablGL.ori/Makefile.config lablGL/Makefile.config +--- lablGL.ori/Makefile.config 1970-01-01 01:00:00.000000000 +0100 ++++ lablGL/Makefile.config 2013-06-02 08:13:10.000000000 +0200 +@@ -0,0 +1,63 @@ ++# LablGL and Togl configuration file ++# ++# Please have a look at the config/Makefile in the Objective Caml distribution, ++# or at the labltklink script to get the information needed here ++# ++ ++##### Adjust these always ++ ++# Uncomment if you have the fast ".opt" compilers ++#CAMLC = ocamlc.opt ++#CAMLOPT = ocamlopt.opt ++ ++# Where to put the lablgl script ++BINDIR = @BINDIR@ ++ ++# Where to find X headers ++XINCLUDES = @XINCLUDES@ ++# X libs (for broken RTLD_GLOBAL: e.g. FreeBSD 4.0) ++#XLIBS = -L/usr/X11R6/lib -lXext -lXmu -lX11 -lXi ++ ++# Where to find Tcl/Tk headers ++# This must the same version as for LablTk ++TKINCLUDES = @TKINCLUDES@ ++# Tcl/Tk libs (for broken RTLD_GLOBAL: e.g. FreeBSD 4.0) ++#TKLIBS = -L/usr/local/lib -ltk84 -ltcl84 ++ ++# Where to find OpenGL/Mesa/Glut headers and libraries ++GLINCLUDES = ++GLLIBS = -lGL -lGLU ++GLUTLIBS = -lglut ++# The following libraries may be required (try to add them one at a time) ++#GLLIBS = -lGL -lGLU -lXmu -lXext -lXi -lcipher -lpthread ++ ++# How to index a library after installing (ranlib required on MacOSX) ++RANLIB = : ++#RANLIB = ranlib ++ ++##### Uncomment these for windows ++#TKLIBS = tk83.lib tcl83.lib gdi32.lib user32.lib ++#GLLIBS = opengl32.lib glu32.lib ++#TOOLCHAIN = msvc ++#XA = .lib ++#XB = .bat ++#XE = .exe ++#XO = .obj ++#XS = .dll ++ ++##### Adjust these if non standard ++ ++# The Objective Caml library directory ++#LIBDIR = `ocamlc -where` ++ ++# Where to put dlls (if dynamic loading available) ++DLLDIR = @DLLDIR@ ++ ++# Where to put LablGL (standard) ++INSTALLDIR = @INSTALLDIR@ ++ ++# Where is Togl (default) ++#TOGLDIR = Togl ++ ++# C Compiler options ++#COPTS = -c -O diff --git a/nixpkgs/pkgs/development/ocaml-modules/lablgl/default.nix b/nixpkgs/pkgs/development/ocaml-modules/lablgl/default.nix new file mode 100644 index 000000000000..427d0d5a0e14 --- /dev/null +++ b/nixpkgs/pkgs/development/ocaml-modules/lablgl/default.nix @@ -0,0 +1,45 @@ +{stdenv, fetchurl, ocaml, lablgtk, findlib, libGLU_combined, freeglut, camlp4 } : + +let + pname = "lablgl"; +in + +stdenv.mkDerivation rec { + name = "${pname}-${version}"; + version = "1.05"; + + src = fetchurl { + url = "http://wwwfun.kurims.kyoto-u.ac.jp/soft/lsl/dist/lablgl-${version}.tar.gz"; + sha256 = "0qabydd219i4ak7hxgc67496qnnscpnydya2m4ijn3cpbgih7zyq"; + }; + + buildInputs = [ocaml findlib lablgtk freeglut camlp4]; + propagatedBuildInputs = [ libGLU_combined ]; + + patches = [ ./Makefile.config.patch ./META.patch ]; + + preConfigure = '' + substituteInPlace Makefile.config \ + --subst-var-by BINDIR $out/bin \ + --subst-var-by INSTALLDIR $out/lib/ocaml/${ocaml.version}/site-lib/lablgl \ + --subst-var-by DLLDIR $out/lib/ocaml/${ocaml.version}/site-lib/lablgl \ + --subst-var-by TKINCLUDES "" \ + --subst-var-by XINCLUDES "" + ''; + + createFindlibDestdir = true; + + buildFlags = "lib libopt glut glutopt"; + + postInstall = '' + cp ./META $out/lib/ocaml/${ocaml.version}/site-lib/lablgl + ''; + + meta = with stdenv.lib; { + homepage = http://wwwfun.kurims.kyoto-u.ac.jp/soft/lsl/lablgl.html; + description = "OpenGL bindings for ocaml"; + license = licenses.gpl2; + maintainers = with maintainers; [ pSub vbgl ]; + broken = stdenv.isDarwin; + }; +} |