summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorFlorent Becker <florent.becker@ens-lyon.org>2014-10-19 18:47:18 +0200
committerFlorent Becker <florent.becker@ens-lyon.org>2014-10-19 18:47:18 +0200
commit8c9bbe00ac67a17a4b7801a38a5df90ca47cab70 (patch)
tree1e912286dab57f14c46585df7dc3f6727c29a923 /pkgs
parentcfeb42b8eb61bb016741bc06885662c35af287d3 (diff)
downloadnixlib-8c9bbe00ac67a17a4b7801a38a5df90ca47cab70.tar
nixlib-8c9bbe00ac67a17a4b7801a38a5df90ca47cab70.tar.gz
nixlib-8c9bbe00ac67a17a4b7801a38a5df90ca47cab70.tar.bz2
nixlib-8c9bbe00ac67a17a4b7801a38a5df90ca47cab70.tar.lz
nixlib-8c9bbe00ac67a17a4b7801a38a5df90ca47cab70.tar.xz
nixlib-8c9bbe00ac67a17a4b7801a38a5df90ca47cab70.tar.zst
nixlib-8c9bbe00ac67a17a4b7801a38a5df90ca47cab70.zip
Use opam to actually install eliom
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/development/ocaml-modules/eliom/default.nix18
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 2e23a5fa86d2..9f0427738f71 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;