indi-3rdparty: fix build on darwin

The autopatchelfhook does not work with Mach-O
binaries so remove it on darwin
This commit is contained in:
Linus Karl
2026-02-15 23:48:59 +01:00
parent 3ffa960612
commit 4ec0338fc6
@@ -127,6 +127,11 @@ let
libaltaircam = buildIndi3rdParty {
pname = "libaltaircam";
postPatch = ''
sed -i '/FIX_MACOS_LIBRARIES/d' CMakeLists.txt
'';
meta = {
license = lib.licenses.unfreeRedistributable;
platforms = with lib.platforms; x86_64 ++ aarch64 ++ arm;
@@ -140,7 +145,7 @@ let
indilib
libusb1
];
nativeBuildInputs = [ autoPatchelfHook ];
nativeBuildInputs = lib.optional (!stdenv.hostPlatform.isDarwin) autoPatchelfHook;
cmakeFlags = [ "-DCONF_DIR=etc/" ];
meta = {
license = lib.licenses.mpl20;
@@ -152,6 +157,7 @@ let
pname = "libasi";
postPatch = ''
sed -i '/FIX_MACOS_LIBRARIES/d' CMakeLists.txt
substituteInPlace 99-asi.rules \
--replace-fail "/bin/echo" "${lib.getBin coreutils}/bin/echo" \
--replace-fail "/bin/sh" "${lib.getExe bash}" \
@@ -162,32 +168,55 @@ let
libusb1
(lib.getLib stdenv.cc.cc)
];
nativeBuildInputs = [ autoPatchelfHook ];
nativeBuildInputs = lib.optional (!stdenv.hostPlatform.isDarwin) autoPatchelfHook;
meta = {
license = lib.licenses.unfreeRedistributable;
platforms = with lib.platforms; x86_64 ++ aarch64 ++ i686 ++ arm;
platforms = [
"i686-linux"
"x86_64-linux"
"armv6l-linux"
"armv7l-linux"
"aarch64-linux"
"x86_64-darwin"
];
};
};
libastroasis = buildIndi3rdParty {
pname = "libastroasis";
postPatch = ''
sed -i '/FIX_MACOS_LIBRARIES/d' CMakeLists.txt
'';
buildInputs = [ (lib.getLib stdenv.cc.cc) ];
nativeBuildInputs = [ autoPatchelfHook ];
nativeBuildInputs = lib.optional (!stdenv.hostPlatform.isDarwin) autoPatchelfHook;
meta = {
license = lib.licenses.unfreeRedistributable;
platforms = with lib.platforms; x86_64 ++ aarch64 ++ arm;
platforms = [
"i686-linux"
"x86_64-linux"
"armv6l-linux"
"armv7l-linux"
"x86_64-darwin"
];
};
};
libatik = buildIndi3rdParty {
pname = "libatik";
postPatch = ''
sed -i '/FIX_MACOS_LIBRARIES/d' CMakeLists.txt
'';
buildInputs = [
(lib.getLib stdenv.cc.cc)
libusb1
systemd
libdc1394
];
nativeBuildInputs = [ autoPatchelfHook ];
nativeBuildInputs = lib.optional (!stdenv.hostPlatform.isDarwin) autoPatchelfHook;
meta = {
license = lib.licenses.unfreeRedistributable;
platforms = with lib.platforms; x86_64 ++ aarch64 ++ i686 ++ arm;
@@ -196,7 +225,12 @@ let
libbressercam = buildIndi3rdParty {
pname = "libbressercam";
nativeBuildInputs = [ autoPatchelfHook ];
postPatch = ''
sed -i '/FIX_MACOS_LIBRARIES/d' CMakeLists.txt
'';
nativeBuildInputs = lib.optional (!stdenv.hostPlatform.isDarwin) autoPatchelfHook;
meta = {
license = lib.licenses.unfreeRedistributable;
platforms = with lib.platforms; x86_64 ++ aarch64 ++ arm;
@@ -242,13 +276,24 @@ let
nativeBuildInputs = [ autoPatchelfHook ];
meta = {
license = lib.licenses.unfreeRedistributable;
platforms = with lib.platforms; x86_64 ++ aarch64 ++ arm ++ i686;
platforms = [
"i686-linux"
"x86_64-linux"
"armv6l-linux"
"armv7l-linux"
"aarch64-linux"
];
};
};
libmallincam = buildIndi3rdParty {
pname = "libmallincam";
nativeBuildInputs = [ autoPatchelfHook ];
postPatch = ''
sed -i '/FIX_MACOS_LIBRARIES/d' CMakeLists.txt
'';
nativeBuildInputs = lib.optional (!stdenv.hostPlatform.isDarwin) autoPatchelfHook;
meta = {
license = lib.licenses.unfreeRedistributable;
platforms = with lib.platforms; x86_64 ++ aarch64 ++ arm;
@@ -257,6 +302,11 @@ let
libmeadecam = buildIndi3rdParty {
pname = "libmeadecam";
postPatch = ''
sed -i '/FIX_MACOS_LIBRARIES/d' CMakeLists.txt
'';
buildInputs = [ libusb1 ];
meta = {
license = lib.licenses.lgpl21Only;
@@ -266,8 +316,13 @@ let
libmicam = buildIndi3rdParty {
pname = "libmicam";
postPatch = ''
sed -i '/FIX_MACOS_LIBRARIES/d' CMakeLists.txt
'';
buildInputs = [ libusb1 ];
nativeBuildInputs = [ autoPatchelfHook ];
nativeBuildInputs = lib.optional (!stdenv.hostPlatform.isDarwin) autoPatchelfHook;
meta = {
license = lib.licenses.unfreeRedistributable;
platforms = with lib.platforms; x86_64 ++ aarch64 ++ arm ++ i686;
@@ -276,7 +331,12 @@ let
libnncam = buildIndi3rdParty {
pname = "libnncam";
nativeBuildInputs = [ autoPatchelfHook ];
postPatch = ''
sed -i '/FIX_MACOS_LIBRARIES/d' CMakeLists.txt
'';
nativeBuildInputs = lib.optional (!stdenv.hostPlatform.isDarwin) autoPatchelfHook;
meta = {
license = lib.licenses.unfreeRedistributable;
platforms = with lib.platforms; x86_64 ++ aarch64 ++ arm;
@@ -285,7 +345,12 @@ let
libogmacam = buildIndi3rdParty {
pname = "libogmacam";
nativeBuildInputs = [ autoPatchelfHook ];
postPatch = ''
sed -i '/FIX_MACOS_LIBRARIES/d' CMakeLists.txt
'';
nativeBuildInputs = lib.optional (!stdenv.hostPlatform.isDarwin) autoPatchelfHook;
meta = {
license = lib.licenses.unfreeRedistributable;
platforms = with lib.platforms; x86_64 ++ aarch64 ++ arm;
@@ -294,7 +359,12 @@ let
libomegonprocam = buildIndi3rdParty {
pname = "libomegonprocam";
nativeBuildInputs = [ autoPatchelfHook ];
postPatch = ''
sed -i '/FIX_MACOS_LIBRARIES/d' CMakeLists.txt
'';
nativeBuildInputs = lib.optional (!stdenv.hostPlatform.isDarwin) autoPatchelfHook;
meta = {
license = lib.licenses.unfreeRedistributable;
platforms = with lib.platforms; x86_64 ++ aarch64 ++ arm;
@@ -330,7 +400,9 @@ let
libplayerone = buildIndi3rdParty {
pname = "libplayerone";
postPatch = ''
sed -i '/FIX_MACOS_LIBRARIES/d' CMakeLists.txt
substituteInPlace 99-player_one_astronomy.rules \
--replace-fail "/bin/echo" "${lib.getBin coreutils}/bin/echo" \
--replace-fail "/bin/sh" "${lib.getExe bash}"
@@ -341,7 +413,7 @@ let
libusb1
systemd
];
nativeBuildInputs = [ autoPatchelfHook ];
nativeBuildInputs = lib.optional (!stdenv.hostPlatform.isDarwin) autoPatchelfHook;
meta = {
license = lib.licenses.unfreeRedistributable;
platforms = with lib.platforms; x86_64 ++ aarch64 ++ arm;
@@ -352,6 +424,7 @@ let
pname = "libqhy";
postPatch = ''
sed -i '/FIX_MACOS_LIBRARIES/d' CMakeLists.txt
substituteInPlace CMakeLists.txt \
--replace-fail "/lib/firmware" "lib/firmware"
@@ -369,11 +442,17 @@ let
(lib.getLib stdenv.cc.cc)
libusb1
];
nativeBuildInputs = [ autoPatchelfHook ];
nativeBuildInputs = lib.optional (!stdenv.hostPlatform.isDarwin) autoPatchelfHook;
meta = {
license = lib.licenses.unfreeRedistributable;
platforms = with lib.platforms; x86_64 ++ aarch64 ++ arm;
platforms = [
"x86_64-linux"
"armv6l-linux"
"armv7l-linux"
"aarch64-linux"
"x86_64-darwin"
];
};
};
@@ -383,7 +462,7 @@ let
libftdi1
indilib
];
nativeBuildInputs = [ autoPatchelfHook ];
nativeBuildInputs = lib.optional (!stdenv.hostPlatform.isDarwin) autoPatchelfHook;
meta = {
license = lib.licenses.unfreeRedistributable;
platforms = lib.platforms.linux;
@@ -396,7 +475,7 @@ let
(lib.getLib stdenv.cc.cc)
libusb1
];
nativeBuildInputs = [ autoPatchelfHook ];
nativeBuildInputs = lib.optional (!stdenv.hostPlatform.isDarwin) autoPatchelfHook;
meta = {
license = lib.licenses.unfreeRedistributable;
platforms = with lib.platforms; x86_64 ++ i686 ++ arm;
@@ -407,6 +486,7 @@ let
pname = "libsbig";
postPatch = ''
sed -i '/FIX_MACOS_LIBRARIES/d' CMakeLists.txt
substituteInPlace CMakeLists.txt --replace-fail "/lib/firmware" "lib/firmware"
substituteInPlace 51-sbig-debian.rules \
--replace-fail "/sbin/fxload" "${fxload}/sbin/fxload" \
@@ -416,7 +496,7 @@ let
'';
buildInputs = [ libusb1 ];
nativeBuildInputs = [ autoPatchelfHook ];
nativeBuildInputs = lib.optional (!stdenv.hostPlatform.isDarwin) autoPatchelfHook;
meta = {
license = lib.licenses.unfreeRedistributable;
@@ -426,7 +506,12 @@ let
libstarshootg = buildIndi3rdParty {
pname = "libstarshootg";
nativeBuildInputs = [ autoPatchelfHook ];
postPatch = ''
sed -i '/FIX_MACOS_LIBRARIES/d' CMakeLists.txt
'';
nativeBuildInputs = lib.optional (!stdenv.hostPlatform.isDarwin) autoPatchelfHook;
meta = {
license = lib.licenses.unfreeRedistributable;
platforms = with lib.platforms; x86_64 ++ aarch64 ++ arm;
@@ -435,20 +520,37 @@ let
libsvbony = buildIndi3rdParty {
pname = "libsvbony";
postPatch = ''
sed -i '/FIX_MACOS_LIBRARIES/d' CMakeLists.txt
'';
buildInputs = [
(lib.getLib stdenv.cc.cc)
libusb1
];
nativeBuildInputs = [ autoPatchelfHook ];
nativeBuildInputs = lib.optional (!stdenv.hostPlatform.isDarwin) autoPatchelfHook;
meta = {
license = lib.licenses.unfreeRedistributable;
platforms = with lib.platforms; x86_64 ++ aarch64 ++ arm ++ i686;
platforms = [
"i686-linux"
"x86_64-linux"
"armv6l-linux"
"armv7l-linux"
"aarch64-linux"
"x86_64-darwin"
];
};
};
libsvbonycam = buildIndi3rdParty {
pname = "libsvbonycam";
nativeBuildInputs = [ autoPatchelfHook ];
postPatch = ''
sed -i '/FIX_MACOS_LIBRARIES/d' CMakeLists.txt
'';
nativeBuildInputs = lib.optional (!stdenv.hostPlatform.isDarwin) autoPatchelfHook;
meta = {
license = lib.licenses.unfreeRedistributable;
platforms = with lib.platforms; x86_64 ++ aarch64 ++ arm;
@@ -457,7 +559,12 @@ let
libtoupcam = buildIndi3rdParty {
pname = "libtoupcam";
nativeBuildInputs = [ autoPatchelfHook ];
postPatch = ''
sed -i '/FIX_MACOS_LIBRARIES/d' CMakeLists.txt
'';
nativeBuildInputs = lib.optional (!stdenv.hostPlatform.isDarwin) autoPatchelfHook;
meta = {
license = lib.licenses.unfreeRedistributable;
platforms = with lib.platforms; x86_64 ++ aarch64 ++ arm;
@@ -466,7 +573,12 @@ let
libtscam = buildIndi3rdParty {
pname = "libtscam";
nativeBuildInputs = [ autoPatchelfHook ];
postPatch = ''
sed -i '/FIX_MACOS_LIBRARIES/d' CMakeLists.txt
'';
nativeBuildInputs = lib.optional (!stdenv.hostPlatform.isDarwin) autoPatchelfHook;
meta = {
license = lib.licenses.unfreeRedistributable;
platforms = with lib.platforms; x86_64 ++ aarch64 ++ arm;