diff options
author | Marco Maggesi <maggesi@math.unifi.it> | 2010-12-09 15:40:04 +0000 |
---|---|---|
committer | Marco Maggesi <maggesi@math.unifi.it> | 2010-12-09 15:40:04 +0000 |
commit | ac457478e35e56e7370e3e40167e5df75de98363 (patch) | |
tree | fcbfe2bb58b8e32bbb60c0c4e25e069139e73ceb /pkgs/development/tools/ocaml | |
parent | 114fa21c481f0c9b52f4e7a2915bffbdfb61467e (diff) | |
download | nixpkgs-ac457478e35e56e7370e3e40167e5df75de98363.tar nixpkgs-ac457478e35e56e7370e3e40167e5df75de98363.tar.gz nixpkgs-ac457478e35e56e7370e3e40167e5df75de98363.tar.bz2 nixpkgs-ac457478e35e56e7370e3e40167e5df75de98363.tar.lz nixpkgs-ac457478e35e56e7370e3e40167e5df75de98363.tar.xz nixpkgs-ac457478e35e56e7370e3e40167e5df75de98363.tar.zst nixpkgs-ac457478e35e56e7370e3e40167e5df75de98363.zip |
* Add ocaml packages findlib, camlzip, ocaml-ssl, ocaml-batteries, menhir, camomile, ocaml-lwt, cryptokit, ocaml-cryptgps, ounit, ocaml-react
svn path=/nixpkgs/trunk/; revision=25041
Diffstat (limited to 'pkgs/development/tools/ocaml')
-rw-r--r-- | pkgs/development/tools/ocaml/findlib/default.nix | 54 | ||||
-rw-r--r-- | pkgs/development/tools/ocaml/findlib/ldconf.patch | 8 |
2 files changed, 62 insertions, 0 deletions
diff --git a/pkgs/development/tools/ocaml/findlib/default.nix b/pkgs/development/tools/ocaml/findlib/default.nix new file mode 100644 index 00000000000..e1f85f74575 --- /dev/null +++ b/pkgs/development/tools/ocaml/findlib/default.nix @@ -0,0 +1,54 @@ +{stdenv, fetchurl, m4, ncurses, ocaml, writeText}: + +let + ocaml_version = (builtins.parseDrvName ocaml.name).version; + version = "1.2.6"; +in + +stdenv.mkDerivation { + name = "ocaml-findlib-${version}"; + + src = fetchurl { + url = "http://download.camlcity.org/download/findlib-${version}.tar.gz"; + sha256 = "1b6z5lylsjxxaifw2yc21cs0dc84zqi4q57sgwg4j8k3m60ivpxs"; + }; + + buildInputs = [m4 ncurses ocaml]; + + patches = [ ./ldconf.patch ]; + + dontAddPrefix=true; + + preConfigure='' + configureFlagsArray=( + -bindir $out/bin + -mandir $out/share/man + -sitelib $out/lib/ocaml/${ocaml_version}/site-lib + -config $out/etc/findlib.conf + -no-topfind + ) + ''; + + buildPhase = '' + make all + make opt + ''; + + setupHook = writeText "setupHook.sh" '' + addOCamlPath () { + if test -d "''$1/lib/ocaml/${ocaml_version}/site-lib"; then + export OCAMLPATH="''${OCAMLPATH}''${OCAMLPATH:+:}''$1/lib/ocaml/${ocaml_version}/site-lib/" + fi + export OCAMLFIND_DESTDIR="''$out/lib/ocaml/${ocaml_version}/site-lib/" + ensureDir ''$OCAMLFIND_DESTDIR + } + + envHooks=(''${envHooks[@]} addOCamlPath) + ''; + + meta = { + homepage = http://projects.camlcity.org/projects/findlib.html; + description = "O'Caml library manager"; + license = "MIT/X11"; + }; +} diff --git a/pkgs/development/tools/ocaml/findlib/ldconf.patch b/pkgs/development/tools/ocaml/findlib/ldconf.patch new file mode 100644 index 00000000000..7718cb67392 --- /dev/null +++ b/pkgs/development/tools/ocaml/findlib/ldconf.patch @@ -0,0 +1,8 @@ +Setting paths to search for dnynmic libraries isn't very useful in Nix. + +--- findlib-1.2.6/findlib.conf.in 2010-08-17 14:50:28.000000000 -0400 ++++ findlib-1.2.6/findlib.conf.in 2010-11-24 09:46:55.179648354 -0500 +@@ -1,2 +1,3 @@ + destdir="@SITELIB@" + path="@SITELIB@" ++ldconf="ignore" |