Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ocsigen #2930

Closed
wants to merge 19 commits into from
Closed

Ocsigen #2930

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions lib/maintainers.nix
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
falsifian = "James Cook <[email protected]>";
flosse = "Markus Kohlhase <[email protected]>";
fuuzetsu = "Mateusz Kowalczyk <[email protected]>";
gal_bolle = "Florent Becker <[email protected]>";
garbas = "Rok Garbas <[email protected]>";
goibhniu = "Cillian de Róiste <[email protected]>";
guibert = "David Guibert <[email protected]>";
Expand Down
17 changes: 13 additions & 4 deletions pkgs/development/compilers/ocaml/4.01.0.nix
Original file line number Diff line number Diff line change
@@ -1,13 +1,20 @@
{ stdenv, fetchurl, ncurses, x11 }:
{ stdenv, fetchurl, ncurses, buildEnv, libX11, xproto,
useX11 ? (!stdenv.isArm && !stdenv.isMips) }:

let
useX11 = !stdenv.isArm && !stdenv.isMips;
useNativeCompilers = !stdenv.isMips;
inherit (stdenv.lib) optionals optionalString;
x11Ok = if useX11 && (!stdenv.isArm && !stdenv.isMips)
then throw "x11 not available in ocaml with arm or mips arch"
else true;
in

stdenv.mkDerivation rec {

x11env = buildEnv { name = "x11env"; paths = [libX11 xproto]; };
x11lib = x11env + "/lib";
x11inc = x11env + "/include";

name = "ocaml-4.01.0";

src = fetchurl {
Expand All @@ -16,9 +23,11 @@ stdenv.mkDerivation rec {
};

prefixKey = "-prefix ";
configureFlags = ["-no-tk"] ++ optionals useX11 [ "-x11lib" x11 ];
configureFlags = ["-no-tk"] ++ optionals useX11 [ "-x11lib" x11lib
"-x11include" x11inc ];

buildFlags = "world" + optionalString useNativeCompilers " bootstrap world.opt";
buildInputs = [ncurses] ++ optionals useX11 [ x11 ];
buildInputs = [ncurses] ++ optionals useX11 [ libX11 xproto ];
installTargets = "install" + optionalString useNativeCompilers " installopt";
preConfigure = ''
CAT=$(type -tp cat)
Expand Down
23 changes: 23 additions & 0 deletions pkgs/development/ocaml-modules/calendar/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{stdenv, fetchurl, ocaml, findlib}:

stdenv.mkDerivation {
name = "ocaml-calendar-2.03.2";
src = fetchurl {
url = https://forge.ocamlcore.org/frs/download.php/915/calendar-2.03.2.tar.gz;
sha256 = "04pvhwb664g3s644c7v7419a3kvf5s3pynkhmk5j59dvlfm1yf0f";
};

buildInputs = [ocaml findlib];

createFindlibDestdir = true;

meta = {
homepage = https://forge.ocamlcore.org/projects/calendar/;
description = "An Objective Caml library managing dates and times.";
license = "LGPL";
platforms = ocaml.meta.platforms;
maintainers = [
stdenv.lib.maintainers.gal_bolle
];
};
}
29 changes: 29 additions & 0 deletions pkgs/development/ocaml-modules/eliom/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{ stdenv, fetchurl, ocaml, findlib, which, ocsigen_server, ocsigen_deriving,
js_of_ocaml, ocaml_react, ocaml_lwt, calendar, cryptokit, tyxml,
ocaml_ipaddr, ocamlnet, ocaml_ssl, ocaml_pcre, ocaml_optcomp}:

stdenv.mkDerivation
{
name = "eliom-4.0.0";

src = fetchurl {
url = https://github.com/ocsigen/eliom/archive/4.0.0.tar.gz;
sha256 = "1xf2l6lvngxzwaw6lvr6sgi48rz0wxg65q9lz4jzqjarkp0sx206";
};

buildInputs = [ocaml which ocsigen_server findlib ocsigen_deriving
js_of_ocaml ocaml_react ocaml_lwt calendar
cryptokit tyxml ocaml_ipaddr ocamlnet ocaml_ssl
ocaml_pcre ocaml_optcomp];

preConfigure =
''chmod a+x configure
sed s/deriving-ocsigen/deriving/g -i configure
'';

configureFlags = "--root $(out) --prefix /";

dontAddPrefix = true;

createFindlibDestdir = true;
}
24 changes: 15 additions & 9 deletions pkgs/development/ocaml-modules/lwt/default.nix
Original file line number Diff line number Diff line change
@@ -1,29 +1,35 @@
{stdenv, fetchurl, which, cryptopp, ocaml, findlib, ocaml_react, ocaml_ssl}:
{stdenv, fetchgit, which, cryptopp, ocaml, findlib, ocaml_react, ocaml_ssl, libev, pkgconfig, ncurses, ocaml_oasis, ocaml_text, glib}:

let
ocaml_version = (builtins.parseDrvName ocaml.name).version;
version = "2.1.1";
version = "2.4.5";
in

stdenv.mkDerivation {


name = "ocaml-lwt-${version}";

src = fetchurl {
url = "http://ocsigen.org/download/lwt-${version}.tar.gz";
sha256 = "1zjn0sgihryshancn4kna1xslhc8gifliny1qd3a85f72xxxnw0w";
src = fetchgit {
url = git://github.com/ocsigen/lwt;
rev = "refs/tags/${version}";
sha256 = "2bbf4f216dd62eeb765a89413f3b2b6d417a9c289ca49d595bb4d7a0545e343e";
};

buildInputs = [which cryptopp ocaml findlib ocaml_react ocaml_ssl];
buildInputs = [ocaml_oasis pkgconfig which cryptopp ocaml findlib glib libev ncurses];

propagatedBuildInputs = [ ocaml_react ocaml_ssl ocaml_text ];

configureFlags = [ "--enable-all" ];

configurePhase = "true";
createFindlibDestdir = true;

meta = {
homepage = http://ocsigen.org/lwt;
description = "Lightweight thread library for Objective Caml";
license = "LGPL";
platforms = ocaml.meta.platforms;
maintainers = [
stdenv.lib.maintainers.z77z
stdenv.lib.maintainers.z77z stdenv.lib.maintainers.gal_bolle
];
};
}
15 changes: 15 additions & 0 deletions pkgs/development/ocaml-modules/ocaml-ipaddr/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{ocaml, findlib, stdenv, fetchurl}:

stdenv.mkDerivation {
name = "ocaml-ipaddr-2.4.0";

src = fetchurl {
url = https://github.com/mirage/ocaml-ipaddr/archive/2.4.0.tar.gz;
sha256 = "0g7qg35w3vzcg37798rhbx7iia83286md3gj5gdhs1qgizlg56wx";
};

buildInputs = [ocaml findlib];

createFindlibDestdir = true;

}
26 changes: 26 additions & 0 deletions pkgs/development/ocaml-modules/ocaml-text/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{stdenv, fetchurl, libiconv, ocaml, findlib, ncurses}:

stdenv.mkDerivation {
name = "ocaml-text-0.6";

src = fetchurl {
url = https://forge.ocamlcore.org/frs/download.php/937/ocaml-text-0.6.tar.gz;
sha256 = "0j8gaak0ajnlmn8knvfygqwwzs7awjv5rfn5cbj6qxqbxhjd5m6g";
};

buildInputs = [ocaml findlib libiconv ncurses];

configurePhase = "iconv_prefix=${libiconv} ocaml setup.ml -configure";

createFindlibDestdir = true;


meta = {
homepage = "http://ocaml-text.forge.ocamlcore.org/";
description = "OCaml-Text is a library for dealing with ``text'', i.e. sequence of unicode characters, in a convenient way. ";
license = "BSD";
platforms = ocaml.meta.platforms;
maintainers = [
];
};
}
32 changes: 32 additions & 0 deletions pkgs/development/ocaml-modules/ocsigen-deriving/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{stdenv, fetchgit, ocaml, findlib, ocaml_oasis, ocaml_data_notation, ocaml_optcomp}:

stdenv.mkDerivation {
name = "ocsigen-deriving";
src = fetchgit {
url = "git://github.com/ocsigen/deriving";
rev = "refs/tags/0.6.2";
sha256 = "2b3bf3f4972d0e6eaf075f7353ce482b776726e0cd04947a89b7156384ec0662";
};

buildInputs = [ocaml findlib ocaml_oasis ocaml_data_notation ocaml_optcomp];

configurePhase = ''
make setup-dev.exe
./setup-dev.exe -configure --prefix $out
'';

createFindlibDestdir = true;


meta = {
homepage = https://github.com/ocsigen/deriving;
description = "Extension to OCaml for deriving functions from type declarations";
license = "MIT";
platforms = ocaml.meta.platforms;
maintainers = [
stdenv.lib.maintainers.gal_bolle
];
};


}
34 changes: 34 additions & 0 deletions pkgs/development/ocaml-modules/ocsigen-server/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{stdenv, fetchurl, ocaml, findlib, which, ocaml_react, ocaml_ssl, ocaml_lwt, ocamlnet, ocaml_pcre, cryptokit, tyxml, ocaml_ipaddr, zlib, libev, openssl, ocaml_sqlite3, tree}:

stdenv.mkDerivation {
name = "ocsigenserver-2.4.0";

src = fetchurl {
url = https://github.com/ocsigen/ocsigenserver/archive/2.4.0.tar.gz;
sha256 = "1fjj8g6ivyfsa0446w77rjihhbw0gh5pgx7brywql2shk999riby";
};

buildInputs = [ocaml which findlib ocaml_react ocaml_ssl ocaml_lwt ocamlnet ocaml_pcre cryptokit tyxml ocaml_ipaddr zlib libev openssl ocaml_sqlite3 tree];

configureFlags = "--root $(out) --prefix /";

dontAddPrefix = true;

createFindlibDestdir = true;

postFixup =
''
rm -rf $out/var/run
'';

dontPatchShebangs = true;

meta = {
homepage = http://ocsigen.org/ocsigenserver/;
description = "Ocsigen Server is a full featured Web server. It implements most features of the HTTP protocol, and has a very powerful extension mechanism that make very easy to plug your own OCaml modules for generating pages.";
license = stdenv.lib.licenses.lgpl21;
platforms = ocaml.meta.platforms;
maintainers = [ stdenv.lib.maintainers.gal_bolle ];
};

}
25 changes: 25 additions & 0 deletions pkgs/development/ocaml-modules/optcomp/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{stdenv, fetchurl, ocaml, findlib}:

stdenv.mkDerivation {
name = "ocaml-optcomp";
src = fetchurl {
url = https://github.com/diml/optcomp/archive/1.6.tar.gz;
md5 = "d3587244dba1b8b10f24d0b60a8c700d";
};

createFindlibDestdir = true;

buildInputs = [ocaml findlib];


meta = {
homepage = https://github.com/diml/optcomp;
description = "Optional compilation for OCaml with cpp-like directives";
license = "BSD";
platforms = ocaml.meta.platforms;
maintainers = [
stdenv.lib.maintainers.gal_bolle
];
};

}
6 changes: 3 additions & 3 deletions pkgs/development/ocaml-modules/pcre/default.nix
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{stdenv, fetchurl, pcre, ocaml, findlib}:

stdenv.mkDerivation {
name = "ocaml-pcre-7.0.4";
name = "ocaml-pcre-7.1.1";

src = fetchurl {
url = https://bitbucket.org/mmottl/pcre-ocaml/downloads/pcre-ocaml-7.0.4.tar.gz;
sha256 = "0h2qlza7jkzgrglw1k0fydpbil0dgpv526kxyyd1apdbyzhb0mpw";
url = https://github.com/mmottl/pcre-ocaml/releases/download/v7.1.1/pcre-ocaml-7.1.1.tar.gz;
sha256 = "0nj4gb6hjjjmz5gnl9cjrh4w82rw8cvbwnk0hxhfgfd25p9k50n3";
};

buildInputs = [ocaml findlib];
Expand Down
15 changes: 10 additions & 5 deletions pkgs/development/ocaml-modules/react/default.nix
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{stdenv, fetchurl, ocaml, findlib, opam}:

stdenv.mkDerivation {
name = "ocaml-react-1.0.1";
name = "ocaml-react-1.1.0";

src = fetchurl {
url = "http://erratique.ch/software/react/releases/react-1.0.1.tbz";
sha256 = "007c9kzl0i6xvxnqj9jny4hgm28v9a1i079q53vl5hfb5f7h1mda";
url = http://erratique.ch/software/react/releases/react-1.1.0.tbz;
sha256 = "1gymn8hy7ga0l9qymmb1jcnnkqvy7l2zr87xavzqz0dfi9ci8dm7";
};

unpackCmd = "tar xjf $src";
Expand All @@ -15,8 +15,13 @@ stdenv.mkDerivation {

configurePhase = "ocaml pkg/git.ml";
buildPhase = "ocaml pkg/build.ml native=true native-dynlink=true";
installPhase = ''

installPhase =
let ocamlVersion = (builtins.parseDrvName (ocaml.name)).version;
in
''
opam-installer --script --prefix=$out react.install > install.sh
sed -i s!lib/react!lib/ocaml/${ocamlVersion}/site-lib/react! install.sh
sh install.sh
'';

Expand All @@ -25,6 +30,6 @@ stdenv.mkDerivation {
description = "Applicative events and signals for OCaml";
license = licenses.bsd3;
platforms = ocaml.meta.platforms;
maintainers = with maintainers; [ z77z vbmithr ];
maintainers = with maintainers; [ z77z vbmithr gal_bolle];
};
}
30 changes: 30 additions & 0 deletions pkgs/development/ocaml-modules/tyxml/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{stdenv, fetchurl, ocaml, findlib, ocaml_oasis}:

stdenv.mkDerivation {
name = "tyxml-3.0.0";

src = fetchurl {
url = http://ocsigen.org/download/tyxml-3.0.0.tar.gz;
sha256 = "0cvbmyg4g0lg4f23032cjlxqklisccbjgj47117wm6gva8xi7xa3";
};

buildInputs = [ocaml findlib ocaml_oasis];

createFindlibDestdir = true;

configurePhase = ''
make setup-dev.exe
./setup-dev.exe -configure --prefix $out
'';

meta = {
homepage = http://ocsigen.org/tyxml/;
description = "Tyxml is a library that makes it almost impossible for your OCaml programs to generate wrong XML ouput, using static typing.";
license = "LGPL";
platforms = ocaml.meta.platforms;
maintainers = [
stdenv.lib.maintainers.gal_bolle
];
};

}
10 changes: 10 additions & 0 deletions pkgs/development/tools/ocaml/js_of_ocaml/Makefile.conf.diff
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
--- old/Makefile.conf 2014-05-19 16:53:09.263564921 +0200
+++ new/Makefile.conf 2014-05-19 16:53:42.213152994 +0200
@@ -1,6 +1,6 @@

# Where binaries are installed:
-BINDIR := /usr/local/bin
+BINDIR := $(out)/bin

####

Loading