From 6e6c1448faaf4d8fd131ac1cde221eeb3813573d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Merlin=20G=C3=B6ttlinger?= Date: Wed, 7 Aug 2019 06:51:36 +0200 Subject: [PATCH] Suggested edits --- pkgs/build-support/ocaml/oasis.nix | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/pkgs/build-support/ocaml/oasis.nix b/pkgs/build-support/ocaml/oasis.nix index ad1ba065ef72..00f75c765978 100644 --- a/pkgs/build-support/ocaml/oasis.nix +++ b/pkgs/build-support/ocaml/oasis.nix @@ -1,11 +1,9 @@ -{ stdenv, ocaml_oasis, ocaml, findlib, ocamlbuild, camlp4 }: +{ stdenv, ocaml_oasis, ocaml, findlib, ocamlbuild }: { name, version, buildInputs ? [], meta ? { platforms = ocaml.meta.platforms or []; }, minimumOcamlVersion ? null, createFindlibDestdir ? true, dontStrip ? true, - hasSharedObjects ? false, - setupHook ? null, ... }@args: @@ -13,9 +11,9 @@ stdenv.lib.versionOlder minimumOcamlVersion ocaml.version; stdenv.mkDerivation (args // { - name = "ocaml-${name}-${version}"; + name = "ocaml${ocaml.version}-${name}-${version}"; - buildInputs = [ ocaml findlib ocamlbuild camlp4 ocaml_oasis ] ++ buildInputs; + buildInputs = [ ocaml findlib ocamlbuild ocaml_oasis ] ++ buildInputs; inherit createFindlibDestdir; inherit dontStrip; @@ -43,10 +41,4 @@ stdenv.mkDerivation (args // { runHook postInstall ''; - setupHook = if setupHook == null && hasSharedObjects - then stdenv.writeText "setupHook.sh" '' - export CAML_LD_LIBRARY_PATH="''${CAML_LD_LIBRARY_PATH}''${CAML_LD_LIBRARY_PATH:+:}''$1/lib/ocaml/${ocaml.version}/site-lib/${name}/" - '' - else setupHook; - })