diff --git a/pkgs/development/interpreters/hashlink/default.nix b/pkgs/development/interpreters/hashlink/default.nix index 2c8da6002894..f017e1a43c86 100644 --- a/pkgs/development/interpreters/hashlink/default.nix +++ b/pkgs/development/interpreters/hashlink/default.nix @@ -44,6 +44,15 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ getconf ]; + # append default installPhase with library install for haxe + postInstall = let + haxelibPath = "$out/lib/haxe/hashlink/${lib.replaceStrings [ "." ] [ "," ] version}"; + in '' + mkdir -p "${haxelibPath}" + echo -n "${version}" > "${haxelibPath}/../.current" + cp -r other/haxelib/* "${haxelibPath}" + ''; + postFixup = lib.optionalString stdenv.isDarwin '' install_name_tool -change libhl.dylib $out/lib/libhl.dylib $out/bin/hl '';