-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Build failure: hashlink #368216
Labels
0.kind: build failure
A package fails to build
Comments
fix-build.diffdiff --git a/pkgs/by-name/ha/hashlink/package.nix b/pkgs/by-name/ha/hashlink/package.nix
index 3e5e4809da86..42b45b119165 100644
--- a/pkgs/by-name/ha/hashlink/package.nix
+++ b/pkgs/by-name/ha/hashlink/package.nix
@@ -1,6 +1,8 @@
{ stdenv
, lib
, fetchFromGitHub
+, cmake
+, ninja
, libGL
, libGLU
, libpng
@@ -12,7 +14,6 @@
, pcre
, SDL2
, sqlite
-, getconf
}:
stdenv.mkDerivation rec {
@@ -26,7 +27,13 @@ stdenv.mkDerivation rec {
sha256 = "sha256-rXw56zoFpLMzz8U3RHWGBF0dUFCUTjXShUEhzp2Qc5g=";
};
- makeFlags = [ "PREFIX=$(out)" ];
+ # incompatible pointer type error: const char ** -> const void **
+ postPatch = ''
+ substituteInPlace libs/sqlite/sqlite.c \
+ --replace-warn \
+ "sqlite3_prepare16_v2(db->db, sql, -1, &r->r, &tl)" \
+ "sqlite3_prepare16_v2(db->db, sql, -1, &r->r, (const void**)&tl)"
+ '';
buildInputs = [
libGL
@@ -42,7 +49,7 @@ stdenv.mkDerivation rec {
sqlite
];
- nativeBuildInputs = [ getconf ];
+ nativeBuildInputs = [ cmake ninja ];
# append default installPhase with library install for haxe
postInstall = let
@@ -50,11 +57,7 @@ stdenv.mkDerivation rec {
in ''
mkdir -p "${haxelibPath}"
echo -n "${version}" > "${haxelibPath}/../.current"
- cp -r other/haxelib/* "${haxelibPath}"
- '';
-
- postFixup = lib.optionalString stdenv.hostPlatform.isDarwin ''
- install_name_tool -change libhl.dylib $out/lib/libhl.dylib $out/bin/hl
+ cp -r ../other/haxelib/* "${haxelibPath}"
'';
meta = with lib; {
|
Has the above patch been tested on MacOS? From a quick glance it could break some stuff... |
I built it on x64 darwin and checked the shared lib with otool -- the current version leaves shared lib without the full path in the name, the diff I posted fixes it.
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Steps To Reproduce
Steps to reproduce the behavior:
Build log
Build Log
Additional context
Metadata
"x86_64-linux"
Linux 6.12.5, NixOS, 25.05 (Warbler), 25.05.20241225.bb881a6
yes
yes
nix-env (Nix) 2.25.3
/nix/store/x5bgci3098gb84dkc1v9cykpby9q7nl1-source
Notify maintainers
@iblech
@locallycompact
@l0go
Note for maintainers: Please tag this issue in your PR.
Add a 👍 reaction to issues you find important.
The text was updated successfully, but these errors were encountered: