diff options
author | Vincent Laporte <Vincent.Laporte@gmail.com> | 2014-10-23 23:45:58 +0100 |
---|---|---|
committer | Vincent Laporte <Vincent.Laporte@gmail.com> | 2014-11-02 21:41:24 +0000 |
commit | 16150e1f1efbd6df345bd30fb5a66e28d991c595 (patch) | |
tree | 4b799e58e08b4bd7561ee46c8b5a8e7c51b15973 /pkgs/development/tools/ocaml/ocamlscript | |
parent | 38b46ffceb3d68cf0dc4e7ffdc536618a58dc2b3 (diff) | |
download | nixpkgs-16150e1f1efbd6df345bd30fb5a66e28d991c595.tar nixpkgs-16150e1f1efbd6df345bd30fb5a66e28d991c595.tar.gz nixpkgs-16150e1f1efbd6df345bd30fb5a66e28d991c595.tar.bz2 nixpkgs-16150e1f1efbd6df345bd30fb5a66e28d991c595.tar.lz nixpkgs-16150e1f1efbd6df345bd30fb5a66e28d991c595.tar.xz nixpkgs-16150e1f1efbd6df345bd30fb5a66e28d991c595.tar.zst nixpkgs-16150e1f1efbd6df345bd30fb5a66e28d991c595.zip |
ocamlscript: new derivation
Ocamlscript compiles scripts, i.e. one-file programs, into natively-compiled binaries, and executes them. Homepage: http://mjambon.com/ocamlscript.html
Diffstat (limited to 'pkgs/development/tools/ocaml/ocamlscript')
-rw-r--r-- | pkgs/development/tools/ocaml/ocamlscript/Makefile.patch | 25 | ||||
-rw-r--r-- | pkgs/development/tools/ocaml/ocamlscript/default.nix | 26 |
2 files changed, 51 insertions, 0 deletions
diff --git a/pkgs/development/tools/ocaml/ocamlscript/Makefile.patch b/pkgs/development/tools/ocaml/ocamlscript/Makefile.patch new file mode 100644 index 00000000000..1a4a6a225a4 --- /dev/null +++ b/pkgs/development/tools/ocaml/ocamlscript/Makefile.patch @@ -0,0 +1,25 @@ +--- a/Makefile 2012-02-04 01:24:21.000000000 +0000 ++++ b/Makefile 2014-10-29 14:42:08.690188302 +0000 +@@ -4,6 +4,8 @@ + version.ml pipeline.mli pipeline.ml common.mli common.ml \ + utils.mli utils.ml ocaml.mli ocaml.ml + ++CAMLP4 := $(shell ocamlfind query camlp4) ++ + STDBIN = $(shell dirname `which ocamlfind`) + ifndef PREFIX + PREFIX = $(shell dirname $(STDBIN)) +@@ -36,11 +38,11 @@ + + common: version.ml + ocamlc -pp 'camlp4orf -loc _loc' -c \ +- -I +camlp4 pa_opt310.ml && \ ++ -I $(CAMLP4) pa_opt310.ml && \ + cp pa_opt310.cmo pa_opt.cmo && \ + cp pa_opt310.cmi pa_opt.cmi + ocamlc -pp 'camlp4orf -loc _loc' -c \ +- -I +camlp4 pa_tryfinally310.ml && \ ++ -I $(CAMLP4) pa_tryfinally310.ml && \ + cp pa_tryfinally310.cmo pa_tryfinally.cmo && \ + cp pa_tryfinally310.cmi pa_tryfinally.cmi + diff --git a/pkgs/development/tools/ocaml/ocamlscript/default.nix b/pkgs/development/tools/ocaml/ocamlscript/default.nix new file mode 100644 index 00000000000..50b9c496aba --- /dev/null +++ b/pkgs/development/tools/ocaml/ocamlscript/default.nix @@ -0,0 +1,26 @@ +{stdenv, fetchurl, ocaml, findlib, camlp4}: +stdenv.mkDerivation { + name = "ocamlscript-2.0.3"; + src = fetchurl { + url = http://mjambon.com/releases/ocamlscript/ocamlscript-2.0.3.tar.gz; + sha256 = "1v1i24gijxwris8w4hi95r9swld6dm7jbry0zp72767a3g5ivlrd"; + }; + + buildInputs = [ ocaml findlib camlp4 ]; + + patches = [ ./Makefile.patch ]; + + buildFlags = "PREFIX=$(out)"; + installFlags = "PREFIX=$(out)"; + + preInstall = "mkdir $out/bin"; + createFindlibDestdir = true; + + meta = with stdenv.lib; { + homepage = http://martin.jambon.free.fr/ocamlscript.html; + license = licenses.boost; + platforms = ocaml.meta.platforms; + description = "Natively-compiled OCaml scripts"; + maintainers = [ maintainers.vbgl ]; + }; +} |