mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-21 21:21:06 +00:00
New ocaml packages:
- ocaml-cairo - camlimages - dypgen - patoline
This commit is contained in:
parent
43faad8063
commit
270d929089
43
pkgs/development/ocaml-modules/camlimages/default.nix
Normal file
43
pkgs/development/ocaml-modules/camlimages/default.nix
Normal file
|
@ -0,0 +1,43 @@
|
|||
{stdenv, fetchurl, omake, ocaml, omake_rc1, libtiff, libjpeg, libpng_apng, giflib, findlib, libXpm, freetype, graphicsmagick, ghostscript }:
|
||||
|
||||
let
|
||||
ocaml_version = (builtins.parseDrvName ocaml.name).version;
|
||||
pname = "camlimages";
|
||||
version = "4.0.1";
|
||||
in
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "${pname}-${version}";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://bitbucket.org/camlspotter/camlimages/get/v4.0.1.tar.gz";
|
||||
sha256 = "b40237c1505487049799a7af296eb3996b3fa08eab94415546f46d61355747c4";
|
||||
};
|
||||
|
||||
buildInputs = [ocaml omake_rc1 findlib graphicsmagick ghostscript ];
|
||||
|
||||
propagatedbuildInputs = [libtiff libjpeg libpng_apng giflib freetype libXpm ];
|
||||
|
||||
createFindlibDestdir = true;
|
||||
|
||||
preConfigure = ''
|
||||
rm ./configure
|
||||
'';
|
||||
|
||||
buildPhase = ''
|
||||
omake
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
omake install
|
||||
'';
|
||||
|
||||
#makeFlags = "BINDIR=$(out)/bin MANDIR=$(out)/usr/share/man/man1 DYPGENLIBDIR=$(out)/lib/ocaml/${ocaml_version}/site-lib";
|
||||
|
||||
meta = {
|
||||
homepage = http://cristal.inria.fr/camlimages;
|
||||
description = "Image manipulation library";
|
||||
license = "GnuGPLV2";
|
||||
# maintainers = [ stdenv.lib.maintainers.roconnor ];
|
||||
};
|
||||
}
|
33
pkgs/development/ocaml-modules/dypgen/default.nix
Normal file
33
pkgs/development/ocaml-modules/dypgen/default.nix
Normal file
|
@ -0,0 +1,33 @@
|
|||
{stdenv, fetchurl, ocaml, findlib}:
|
||||
|
||||
let
|
||||
ocaml_version = (builtins.parseDrvName ocaml.name).version;
|
||||
pname = "dypgen";
|
||||
version = "20120619-1";
|
||||
in
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "${pname}-${version}";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://dypgen.free.fr/dypgen-20120619-1.tar.bz2";
|
||||
sha256 = "ecb53d6e469e9ec4d57ee6323ff498d45b78883ae13618492488e7c5151fdd97";
|
||||
};
|
||||
|
||||
buildInputs = [ocaml findlib];
|
||||
|
||||
createFindlibDestdir = true;
|
||||
|
||||
buildPhase = ''
|
||||
make
|
||||
'';
|
||||
|
||||
makeFlags = "BINDIR=$(out)/bin MANDIR=$(out)/usr/share/man/man1 DYPGENLIBDIR=$(out)/lib/ocaml/${ocaml_version}/site-lib";
|
||||
|
||||
meta = {
|
||||
homepage = http://dypgen.free.fr;
|
||||
description = "Dypgen GLR self extensible parser generator";
|
||||
license = "CeCILL-B_V1";
|
||||
# maintainers = [ stdenv.lib.maintainers.roconnor ];
|
||||
};
|
||||
}
|
117
pkgs/development/ocaml-modules/lablgl/Makefile.config.patch
Normal file
117
pkgs/development/ocaml-modules/lablgl/Makefile.config.patch
Normal file
|
@ -0,0 +1,117 @@
|
|||
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 -Naur lablGL.ori/META lablGL/META
|
||||
--- lablGL.ori/META 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ lablGL/META 2013-06-02 22:00:59.000000000 +0200
|
||||
@@ -0,0 +1,21 @@
|
||||
+description = "Bindings for OpenGL graphics engines"
|
||||
+version = "1.04-1"
|
||||
+archive(byte) = "lablgl.cma"
|
||||
+archive(native) = "lablgl.cmxa"
|
||||
+
|
||||
+#package "togl" (
|
||||
+# description = "OpenGL widget for labltk"
|
||||
+# version = "1.01"
|
||||
+# requires = "lablgl, labltk"
|
||||
+# archive(byte) = "togl.cma"
|
||||
+# archive(native) = "togl.cmxa"
|
||||
+#)
|
||||
+
|
||||
+package "glut" (
|
||||
+ description = "Platform-independent OpenGL window"
|
||||
+ version = "1.01"
|
||||
+ requires = "lablgl"
|
||||
+ archive(byte) = "lablglut.cma"
|
||||
+ archive(native) = "lablglut.cmxa"
|
||||
+)
|
||||
+
|
||||
diff -Naur lablGL.ori/META~ lablGL/META~
|
||||
--- lablGL.ori/META~ 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ lablGL/META~ 2013-06-02 21:59:17.000000000 +0200
|
||||
@@ -0,0 +1,21 @@
|
||||
+description = "Bindings for OpenGL graphics engines"
|
||||
+version = "1.04-1"
|
||||
+archive(byte) = "lablgl.cma"
|
||||
+archive(native) = "lablgl.cmxa"
|
||||
+
|
||||
+#package "togl" (
|
||||
+# description = "OpenGL widget for labltk"
|
||||
+# version = "1.01"
|
||||
+# requires = "lablGL, labltk"
|
||||
+# archive(byte) = "togl.cma"
|
||||
+# archive(native) = "togl.cmxa"
|
||||
+#)
|
||||
+
|
||||
+package "glut" (
|
||||
+ description = "Platform-independent OpenGL window"
|
||||
+ version = "1.01"
|
||||
+ requires = "lablGL"
|
||||
+ archive(byte) = "lablglut.cma"
|
||||
+ archive(native) = "lablglut.cmxa"
|
||||
+)
|
||||
+
|
45
pkgs/development/ocaml-modules/lablgl/default.nix
Normal file
45
pkgs/development/ocaml-modules/lablgl/default.nix
Normal file
|
@ -0,0 +1,45 @@
|
|||
{stdenv, fetchurl, ocaml, lablgtk, findlib, mesa, freeglut } :
|
||||
|
||||
let
|
||||
ocaml_version = (builtins.parseDrvName ocaml.name).version;
|
||||
pname = "lablgl";
|
||||
version = "1.04-1";
|
||||
in
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "${pname}-${version}";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://wwwfun.kurims.kyoto-u.ac.jp/soft/lsl/dist/lablgl-20120306.tar.gz";
|
||||
sha256 = "1w5di2n38h7fkrf668zphnramygwl7ybjhrmww3pi9jcf9apa09r";
|
||||
};
|
||||
|
||||
buildInputs = [ocaml findlib lablgtk mesa freeglut ];
|
||||
|
||||
patches = [ ./Makefile.config.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/stublibs \
|
||||
--subst-var-by TKINCLUDES "" \
|
||||
--subst-var-by XINCLUDES ""
|
||||
'';
|
||||
|
||||
createFindlibDestdir = true;
|
||||
|
||||
#makeFlags = "BINDIR=$(out)/bin MANDIR=$(out)/usr/share/man/man1 DYPGENLIBDIR=$(out)/lib/ocaml/${ocaml_version}/site-lib";
|
||||
buildFlags = "lib libopt glut glutopt";
|
||||
|
||||
postInstall = ''
|
||||
cp ./META $out/lib/ocaml/${ocaml_version}/site-lib/lablgl
|
||||
'';
|
||||
|
||||
meta = {
|
||||
homepage = http://wwwfun.kurims.kyoto-u.ac.jp/soft/lsl/lablgl.html;
|
||||
description = "OpenGL bindings for ocaml";
|
||||
license = "GnuGPLV2";
|
||||
# maintainers = [ stdenv.lib.maintainers.roconnor ];
|
||||
};
|
||||
}
|
16
pkgs/development/ocaml-modules/ocaml-cairo/META.patch
Normal file
16
pkgs/development/ocaml-modules/ocaml-cairo/META.patch
Normal file
|
@ -0,0 +1,16 @@
|
|||
diff -Naur cairo-ocaml-1.2.0.ori/META cairo-ocaml-1.2.0/META
|
||||
--- cairo-ocaml-1.2.0.ori/META 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ cairo-ocaml-1.2.0/META 2013-06-04 03:31:32.000000000 +0200
|
||||
@@ -0,0 +1,12 @@
|
||||
+name = "cairo-ocaml"
|
||||
+description = "Bindings to the cairo library."
|
||||
+version = "@VERSION@"
|
||||
+archive(byte) = "cairo.cma"
|
||||
+archive(native) = "cairo.cmxa"
|
||||
+requires = "bigarray"
|
||||
+
|
||||
+package "lablgtk2" (
|
||||
+ requires = "cairo lablgtk2"
|
||||
+ archive(byte) = "cairo_lablgtk.cma"
|
||||
+ archive(native) = "cairo_lablgtk.cmxa"
|
||||
+)
|
44
pkgs/development/ocaml-modules/ocaml-cairo/default.nix
Normal file
44
pkgs/development/ocaml-modules/ocaml-cairo/default.nix
Normal file
|
@ -0,0 +1,44 @@
|
|||
{stdenv, fetchurl, automake, ocaml, autoconf, gnum4, pkgconfig, freetype, lablgtk, unzip, cairo, findlib, gdk_pixbuf, glib, gtk, pango }:
|
||||
|
||||
let
|
||||
ocaml_version = (builtins.parseDrvName ocaml.name).version;
|
||||
pname = "ocaml-cairo";
|
||||
version = "1.2.0";
|
||||
in
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "${pname}-${version}";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://cgit.freedesktop.org/cairo-ocaml/snapshot/cairo-ocaml-${version}.zip";
|
||||
sha256 = "2d59678e322c331e3f4bc02a77240fce4a0917acb0d3ae75953a6ac62d70a125";
|
||||
};
|
||||
|
||||
patches = [ ./META.patch ];
|
||||
|
||||
buildInputs = [ocaml automake gnum4 autoconf unzip pkgconfig findlib freetype lablgtk cairo gdk_pixbuf gtk pango ];
|
||||
|
||||
createFindlibDestdir = true;
|
||||
|
||||
preConfigure = ''
|
||||
aclocal -I support
|
||||
autoconf
|
||||
export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE `pkg-config --cflags cairo gdk-pixbuf glib gtk+ pango`"
|
||||
export LABLGTKDIR=${lablgtk}/lib/ocaml/${ocaml_version}/site-lib/lablgtk2
|
||||
cp ${lablgtk}/lib/ocaml/${ocaml_version}/site-lib/lablgtk2/pango.ml ./src
|
||||
cp ${lablgtk}/lib/ocaml/${ocaml_version}/site-lib/lablgtk2/gaux.ml ./src
|
||||
'';
|
||||
|
||||
postInstall = ''
|
||||
cp META $out/lib/ocaml/${ocaml_version}/site-lib/cairo/
|
||||
'';
|
||||
|
||||
makeFlags = "INSTALLDIR=$(out)/lib/ocaml/${ocaml_version}/site-lib/cairo";
|
||||
|
||||
meta = {
|
||||
homepage = http://cairographics.org/cairo-ocaml;
|
||||
description = "ocaml bindings for cairo library";
|
||||
license = "GnuGPLV2";
|
||||
# maintainers = [ stdenv.lib.maintainers.roconnor ];
|
||||
};
|
||||
}
|
51
pkgs/tools/typesetting/patoline/default.nix
Normal file
51
pkgs/tools/typesetting/patoline/default.nix
Normal file
|
@ -0,0 +1,51 @@
|
|||
|
||||
{ stdenv, fetchurl, ncurses, mesa, freeglut, libzip,
|
||||
ocaml, findlib, camomile,
|
||||
dypgen, ocaml_sqlite3, camlzip,
|
||||
lablgtk, camlimages, ocaml_cairo,
|
||||
lablgl, ocamlnet, cryptokit,
|
||||
ocaml_pcre }:
|
||||
|
||||
let
|
||||
ocaml_version = (builtins.parseDrvName ocaml.name).version;
|
||||
in
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "patoline-0.1";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://lama.univ-savoie.fr/patoline/patoline-0.1.tar.bz";
|
||||
sha256 = "c5ac8dcb87ceecaf11876bd0dd425bd0f04d43265adc2cbcb1f1e82a78846d49";
|
||||
};
|
||||
|
||||
createFindlibDestdir = true;
|
||||
|
||||
buildInputs = [ ocaml findlib dypgen camomile ocaml_sqlite3 camlzip
|
||||
lablgtk camlimages ocaml_cairo
|
||||
lablgl ocamlnet cryptokit
|
||||
ocaml_pcre ncurses mesa freeglut libzip ];
|
||||
|
||||
propagatedbuildInputs = [ camomile
|
||||
dypgen ocaml_sqlite3 camlzip
|
||||
lablgtk camlimages ocaml_cairo
|
||||
lablgl ocamlnet cryptokit
|
||||
ocaml_pcre ncurses mesa freeglut libzip ];
|
||||
|
||||
buildPhase = ''
|
||||
ocaml configure.ml \
|
||||
--prefix $out \
|
||||
--ocaml-libs $out/lib/ocaml/${ocaml_version}/site-lib \
|
||||
--ocamlfind-dir $out/lib/ocaml/${ocaml_version}/site-lib \
|
||||
--fonts-dir $out/share/patoline/fonts \
|
||||
--grammars-dir $out/share/patoline/grammars \
|
||||
--hyphen-dir $out/share/patoline/hyphen
|
||||
|
||||
make
|
||||
'';
|
||||
|
||||
|
||||
meta = {
|
||||
homepage = http://patoline.com;
|
||||
description = "Patoline ocaml based typesetting system";
|
||||
};
|
||||
}
|
|
@ -2699,12 +2699,22 @@ let
|
|||
camomile_0_8_2 = callPackage ../development/ocaml-modules/camomile/0.8.2.nix { };
|
||||
camomile = callPackage ../development/ocaml-modules/camomile { };
|
||||
|
||||
camlimages = callPackage ../development/ocaml-modules/camlimages { };
|
||||
|
||||
ocaml_cairo = callPackage ../development/ocaml-modules/ocaml-cairo { };
|
||||
|
||||
cryptokit = callPackage ../development/ocaml-modules/cryptokit { };
|
||||
|
||||
findlib = callPackage ../development/tools/ocaml/findlib { };
|
||||
|
||||
dypgen = callPackage ../development/ocaml-modules/dypgen { };
|
||||
|
||||
patoline = callPackage ../tools/typesetting/patoline { };
|
||||
|
||||
gmetadom = callPackage ../development/ocaml-modules/gmetadom { };
|
||||
|
||||
lablgl = callPackage ../development/ocaml-modules/lablgl { };
|
||||
|
||||
lablgtk = callPackage ../development/ocaml-modules/lablgtk {
|
||||
inherit (gnome) libgnomecanvas libglade gtksourceview;
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue