From 0e7f27aa1921b172187c839627e205d821486a7b Mon Sep 17 00:00:00 2001 From: Linus Karl Date: Sat, 1 Feb 2025 15:28:24 +0100 Subject: [PATCH] indilib, indi-3rdparty: 2.1.1 -> 2.1.2.1 --- .../science/astronomy/indilib/default.nix | 63 ++++++++++--------- .../astronomy/indilib/indi-3rdparty.nix | 47 ++++++++++---- 2 files changed, 69 insertions(+), 41 deletions(-) diff --git a/pkgs/development/libraries/science/astronomy/indilib/default.nix b/pkgs/development/libraries/science/astronomy/indilib/default.nix index e318aa231345..405f12dc34b0 100644 --- a/pkgs/development/libraries/science/astronomy/indilib/default.nix +++ b/pkgs/development/libraries/science/astronomy/indilib/default.nix @@ -1,32 +1,33 @@ -{ stdenv -, lib -, fetchFromGitHub -, bash -, cmake -, cfitsio -, libusb1 -, kmod -, zlib -, boost -, libev -, libnova -, curl -, libjpeg -, gsl -, fftw -, gtest -, indi-full +{ + stdenv, + lib, + fetchFromGitHub, + bash, + cmake, + cfitsio, + libusb1, + kmod, + zlib, + boost, + libev, + libnova, + curl, + libjpeg, + gsl, + fftw, + gtest, + indi-full, }: stdenv.mkDerivation (finalAttrs: { pname = "indilib"; - version = "2.1.1"; + version = "2.1.2.1"; src = fetchFromGitHub { owner = "indilib"; repo = "indi"; rev = "v${finalAttrs.version}"; - hash = "sha256-S9FXa+yBA4IYPOiiFkLUNdEFZPraVV5vjtgwDQ/FbNY="; + hash = "sha256-EaLmwPyoQfdTUURKb6bBhg9kz7wSEzRdH3QQkayJDjA="; }; nativeBuildInputs = [ @@ -46,13 +47,15 @@ stdenv.mkDerivation (finalAttrs: { fftw ]; - cmakeFlags = [ - "-DCMAKE_INSTALL_LIBDIR=lib" - "-DUDEVRULES_INSTALL_DIR=lib/udev/rules.d" - ] ++ lib.optional finalAttrs.finalPackage.doCheck [ - "-DINDI_BUILD_UNITTESTS=ON" - "-DINDI_BUILD_INTEGTESTS=ON" - ]; + cmakeFlags = + [ + "-DCMAKE_INSTALL_LIBDIR=lib" + "-DUDEVRULES_INSTALL_DIR=lib/udev/rules.d" + ] + ++ lib.optional finalAttrs.finalPackage.doCheck [ + "-DINDI_BUILD_UNITTESTS=ON" + "-DINDI_BUILD_INTEGTESTS=ON" + ]; checkInputs = [ gtest ]; @@ -81,7 +84,11 @@ stdenv.mkDerivation (finalAttrs: { description = "Implementation of the INDI protocol for POSIX operating systems"; changelog = "https://github.com/indilib/indi/releases/tag/v${finalAttrs.version}"; license = licenses.lgpl2Plus; - maintainers = with maintainers; [ hjones2199 sheepforce returntoreality ]; + maintainers = with maintainers; [ + hjones2199 + sheepforce + returntoreality + ]; platforms = platforms.unix; }; }) diff --git a/pkgs/development/libraries/science/astronomy/indilib/indi-3rdparty.nix b/pkgs/development/libraries/science/astronomy/indilib/indi-3rdparty.nix index f009aef6d5d4..91cf70ffc4ab 100644 --- a/pkgs/development/libraries/science/astronomy/indilib/indi-3rdparty.nix +++ b/pkgs/development/libraries/science/astronomy/indilib/indi-3rdparty.nix @@ -45,7 +45,7 @@ let owner = "indilib"; repo = "indi-3rdparty"; rev = "v${indilib.version}"; - hash = "sha256-J9WPoaULH6UXL1q1O76+IDW97ydQWkHIID6n7wvOdE4="; + hash = "sha256-WYvinfAbMxgF5Q9iB/itQTMsVmG83lY45JriUo3kzFg="; }; buildIndi3rdParty = @@ -172,8 +172,9 @@ let postPatch = '' substituteInPlace 99-asi.rules \ - --replace-fail "/bin/echo" "${coreutils}/bin/echo" \ - --replace-fail "/bin/sh" "${bash}/bin/sh" + --replace-fail "/bin/echo" "${lib.getBin coreutils}/bin/echo" \ + --replace-fail "/bin/sh" "${lib.getExe bash}" \ + --replace-fail "/bin/chmod" "${lib.getBin coreutils}/bin/chmod" ''; buildInputs = [ @@ -350,8 +351,8 @@ let pname = "libplayerone"; postPatch = '' substituteInPlace 99-player_one_astronomy.rules \ - --replace-fail "/bin/echo" "${coreutils}/bin/echo" \ - --replace-fail "/bin/sh" "${bash}/bin/sh" + --replace-fail "/bin/echo" "${lib.getBin coreutils}/bin/echo" \ + --replace-fail "/bin/sh" "${lib.getExe bash}" ''; buildInputs = [ @@ -376,7 +377,7 @@ let substituteInPlace 85-qhyccd.rules \ --replace-fail "/sbin/fxload" "${fxload}/sbin/fxload" \ --replace-fail "/lib/firmware" "$out/lib/firmware" \ - --replace-fail "/bin/sleep" "${coreutils}/bin/sleep" + --replace-fail "/bin/sleep" "${lib.getBin coreutils}/bin/sleep" sed -e 's|-D $env{DEVNAME}|-p $env{BUSNUM},$env{DEVNUM}|' -i 85-qhyccd.rules ''; @@ -464,6 +465,15 @@ let }; }; + libsvbonycam = buildIndi3rdParty { + pname = "libsvbonycam"; + nativeBuildInputs = [ autoPatchelfHook ]; + meta = with lib; { + license = lib.licenses.unfreeRedistributable; + platforms = with platforms; x86_64 ++ aarch64 ++ arm; + }; + }; + libtoupcam = buildIndi3rdParty { pname = "libtoupcam"; nativeBuildInputs = [ autoPatchelfHook ]; @@ -490,12 +500,21 @@ in buildInputs = [ indilib ]; }; - # libahc-xc needs libdfu, which is not packaged - # indi-ahp-xc = buildIndi3rdParty { - # pname = "indi-ahp-xc"; - # buildInputs = [ cfitsio indilib libahp-xc libnova zlib ]; - # meta.platforms = libahp-xc.meta.platforms; - # }; + indi-ahp-xc = buildIndi3rdParty { + pname = "indi-ahp-xc"; + buildInputs = [ + cfitsio + indilib + libahp-xc + libnova + zlib + ]; + meta = { + platforms = libahp-xc.meta.platforms; + # libahc-xc needs libdfu, which is not packaged + broken = true; + }; + }; indi-aok = buildIndi3rdParty { pname = "indi-aok"; @@ -762,7 +781,6 @@ in meta.platforms = libinovasdk.meta.platforms; }; - # broken, wants rpicam-apps indi-libcamera = buildIndi3rdParty { pname = "indi-libcamera"; buildInputs = [ @@ -778,6 +796,7 @@ in zlib ]; meta.platforms = [ ]; + # broken, wants rpicam-apps meta.broken = true; }; @@ -879,6 +898,7 @@ in cfitsio indilib libraw + libjpeg zlib ]; propagatedBuildInputs = [ @@ -1041,6 +1061,7 @@ in libogmacam libomegonprocam libstarshootg + libsvbonycam libtoupcam libtscam ];