diff options
Diffstat (limited to 'pkgs/development/tools/ocaml/utop/default.nix')
-rw-r--r-- | pkgs/development/tools/ocaml/utop/default.nix | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/pkgs/development/tools/ocaml/utop/default.nix b/pkgs/development/tools/ocaml/utop/default.nix index 7662041a4882..c0aa1d16374e 100644 --- a/pkgs/development/tools/ocaml/utop/default.nix +++ b/pkgs/development/tools/ocaml/utop/default.nix @@ -1,27 +1,25 @@ { stdenv, fetchurl, ocaml, findlib, dune -, lambdaTerm, cppo, makeWrapper +, lambdaTerm, cppo, makeWrapper, buildDunePackage }: if !stdenv.lib.versionAtLeast ocaml.version "4.03" then throw "utop is not available for OCaml ${ocaml.version}" else -stdenv.mkDerivation rec { +buildDunePackage rec { pname = "utop"; version = "2.4.2"; src = fetchurl { - url = "https://github.com/diml/utop/archive/${version}.tar.gz"; - sha256 = "0fl8524vmxb9yxjwrh5varvfp0ff3sgfp627knwbxxr69w45ad8h"; + url = "https://github.com/ocaml-community/utop/releases/download/${version}/utop-${version}.tbz"; + sha256 = "0y2v8rkfz19nlz8gh0lkh5wx5hyvw5gl4nw1kg8j2pw9jnilq5nb"; }; nativeBuildInputs = [ makeWrapper ]; - buildInputs = [ ocaml findlib cppo dune ]; + buildInputs = [ cppo ]; propagatedBuildInputs = [ lambdaTerm ]; - inherit (dune) installPhase; - postFixup = let path = "etc/utop/env"; @@ -39,6 +37,7 @@ stdenv.mkDerivation rec { installPhase = '' mkdir -p "$out"/${path} for e in OCAMLPATH CAML_LD_LIBRARY_PATH; do + [[ -v "$e" ]] || continue printf %s "''${!e}" > "$out"/${path}/$e done ''; |