diff --git a/pkgs/development/ocaml-modules/janestreet/buildOcamlJane.nix b/pkgs/development/ocaml-modules/janestreet/buildOcamlJane.nix index 33397e35aa6d..61b2038bfd29 100644 --- a/pkgs/development/ocaml-modules/janestreet/buildOcamlJane.nix +++ b/pkgs/development/ocaml-modules/janestreet/buildOcamlJane.nix @@ -24,7 +24,12 @@ buildOcaml (args // { installPhase = '' opam-installer -i --prefix $prefix --libdir `ocamlfind printconf destdir` --stubsdir `ocamlfind printconf destdir`/${name} ${name}.install - if [ -d $out/lib/${name} ]; then if [ "$(ls -A $out/lib/${name})" ]; then mv $out/lib/${name}/* `ocamlfind printconf destdir`/${name}; fi; rmdir $out/lib/${name}; fi + if [ -d $out/lib/${name} ] + then if [ "$(ls -A $out/lib/${name})" ] + then mv $out/lib/${name}/* `ocamlfind printconf destdir`/${name} + fi + rmdir $out/lib/${name} + fi ''; })