From 7f43bed3608af5d5b2be4ef9d1990cb5c923ea98 Mon Sep 17 00:00:00 2001 From: "PERARD-G N." Date: Thu, 22 Aug 2024 14:31:22 +0200 Subject: [PATCH] hashlink: add haxelib library to output (#257628) Co-authored-by: Sandro --- pkgs/development/interpreters/hashlink/default.nix | 9 +++++++++ 1 file changed, 9 insertions(+) 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 '';