diff options
author | Florent Becker <florent.becker@ens-lyon.org> | 2014-10-19 18:47:18 +0200 |
---|---|---|
committer | Florent Becker <florent.becker@ens-lyon.org> | 2014-10-19 18:47:18 +0200 |
commit | 8c9bbe00ac67a17a4b7801a38a5df90ca47cab70 (patch) | |
tree | 1e912286dab57f14c46585df7dc3f6727c29a923 /pkgs/development/ocaml-modules/eliom | |
parent | cfeb42b8eb61bb016741bc06885662c35af287d3 (diff) |
Use opam to actually install eliom
Diffstat (limited to 'pkgs/development/ocaml-modules/eliom')
-rw-r--r-- | pkgs/development/ocaml-modules/eliom/default.nix | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/pkgs/development/ocaml-modules/eliom/default.nix b/pkgs/development/ocaml-modules/eliom/default.nix index 2e23a5fa86d23..9f0427738f71b 100644 --- a/pkgs/development/ocaml-modules/eliom/default.nix +++ b/pkgs/development/ocaml-modules/eliom/default.nix @@ -1,11 +1,13 @@ { 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, - reactivedata}: + reactivedata, opam}: -stdenv.mkDerivation +stdenv.mkDerivation rec { - name = "eliom-4.1.0"; + pname = "eliom"; + version = "4.1.0"; + name = "${pname}-${version}"; src = fetchurl { url = https://github.com/ocsigen/eliom/archive/4.1.0.tar.gz; @@ -17,9 +19,15 @@ stdenv.mkDerivation cryptokit tyxml ocaml_ipaddr ocamlnet ocaml_ssl ocaml_pcre ocaml_optcomp reactivedata]; - configureFlags = "--root $(out) --prefix /"; - dontAddPrefix = true; + + installPhase = + let ocamlVersion = (builtins.parseDrvName (ocaml.name)).version; + in + ''opam-installer --script --prefix=$out ${pname}.install > install.sh + sh install.sh + ln -s $out/lib/${pname} $out/lib/ocaml/${ocamlVersion}/site-lib/ + ''; createFindlibDestdir = true; |