From 3245b97000313f24fd626e2e61084179f358ac89 Mon Sep 17 00:00:00 2001 From: Florent Becker Date: Wed, 28 May 2014 22:04:40 +0200 Subject: [PATCH] Add a derivation for js_of_ocaml --- .../ocaml/js_of_ocaml/Makefile.conf.diff | 10 +++++++ .../tools/ocaml/js_of_ocaml/default.nix | 28 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 3 files changed, 40 insertions(+) create mode 100644 pkgs/development/tools/ocaml/js_of_ocaml/Makefile.conf.diff create mode 100644 pkgs/development/tools/ocaml/js_of_ocaml/default.nix diff --git a/pkgs/development/tools/ocaml/js_of_ocaml/Makefile.conf.diff b/pkgs/development/tools/ocaml/js_of_ocaml/Makefile.conf.diff new file mode 100644 index 000000000000..ee39855fec9d --- /dev/null +++ b/pkgs/development/tools/ocaml/js_of_ocaml/Makefile.conf.diff @@ -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 + + #### + diff --git a/pkgs/development/tools/ocaml/js_of_ocaml/default.nix b/pkgs/development/tools/ocaml/js_of_ocaml/default.nix new file mode 100644 index 000000000000..a7167d0c2262 --- /dev/null +++ b/pkgs/development/tools/ocaml/js_of_ocaml/default.nix @@ -0,0 +1,28 @@ +{stdenv, fetchurl, ocaml, findlib, ocaml_lwt, menhir, ocsigen_deriving}: + +stdenv.mkDerivation { + name = "js_of_ocaml"; + src = fetchurl { + url = https://github.com/ocsigen/js_of_ocaml/archive/2.2.tar.gz; + sha256 = "1cp81gpvyxgvzxg0vzyl8aa2zvcixp6m433w8zjifrg6vb7lhp97"; + }; + + buildInputs = [ocaml findlib ocaml_lwt menhir ocsigen_deriving]; + + patches = [ ./Makefile.conf.diff ]; + + createFindlibDestdir = true; + + + meta = { + homepage = http://ocsigen.org/js_of_ocaml/; + description = "Compiler of OCaml bytecode to Javascript. It makes it possible to run Ocaml programs in a Web browser"; + license = "LGPL"; + platforms = ocaml.meta.platforms; + maintainers = [ + stdenv.lib.maintainers.gal_bolle + ]; + }; + + +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index e29f01ef042e..f0e223b12882 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -3337,6 +3337,8 @@ let gmetadom = callPackage ../development/ocaml-modules/gmetadom { }; + js_of_ocaml = callPackage ../development/tools/ocaml/js_of_ocaml { }; + lablgl = callPackage ../development/ocaml-modules/lablgl { }; lablgtk = callPackage ../development/ocaml-modules/lablgtk {