indi-full: refactor 3rdparty drivers

This splits the 3rdparty drivers into seperate
packages as recommended by upstream. This also
allows to build a indi-full equivalent with only
the needed drivers. Also add indi-full-nonfree
with all the nonfree drivers. And remove them
from indi-full.

+1120 -212
+4
nixos/doc/manual/release-notes/rl-2411.section.md
··· 288 288 289 289 - `programs.vim.defaultEditor` now only works if `programs.vim.enable` is enabled. 290 290 291 + - The `indi-full` package no longer contains non-free drivers. 292 + To get the old collection of drivers use `indi-full-nonfree` or create your own collection of drivers by overriding indi-with-drivers. 293 + E.g.: `pkgs.indi-with-drivers.override {extraDrivers = with pkgs.indi-3rdparty; [indi-gphoto];}` 294 + 291 295 - `/share/vim-plugins` now only gets linked if `programs.vim.enable` is enabled 292 296 293 297 - The `tracy` package no longer works on X11, since it's moved to Wayland
+15
pkgs/by-name/in/indi-full-nonfree/package.nix
··· 1 + { 2 + lib, 3 + stdenv, 4 + indi-3rdparty, 5 + indilib, 6 + indi-with-drivers, 7 + }: 8 + 9 + indi-with-drivers.override { 10 + pname = "indi-full-nonfree"; 11 + inherit (indilib) version; 12 + extraDrivers = builtins.filter (attrs: lib.meta.availableOn stdenv.hostPlatform attrs) ( 13 + builtins.attrValues indi-3rdparty 14 + ); 15 + }
+23
pkgs/by-name/in/indi-full/package.nix
··· 1 + { 2 + lib, 3 + stdenv, 4 + indi-3rdparty, 5 + indi-with-drivers, 6 + indilib, 7 + }: 8 + 9 + let 10 + licenseFree = p: p.meta.license.free or false; 11 + isFree = 12 + p: 13 + (builtins.all licenseFree ((p.buildInputs or [ ]) ++ (p.propagatedBuildInputs or [ ]))) 14 + && licenseFree p; 15 + drivers = builtins.filter ( 16 + attrs: isFree attrs && (lib.meta.availableOn stdenv.hostPlatform attrs) 17 + ) (builtins.attrValues indi-3rdparty); 18 + in 19 + indi-with-drivers.override { 20 + pname = "indi-full"; 21 + inherit (indilib) version; 22 + extraDrivers = drivers; 23 + }
+24
pkgs/by-name/in/indi-with-drivers/package.nix
··· 1 + { 2 + lib, 3 + buildEnv, 4 + makeBinaryWrapper, 5 + indilib ? indilib, 6 + pname ? "indi-with-drivers", 7 + version ? indilib.version, 8 + extraDrivers ? [ ], 9 + }: 10 + 11 + buildEnv { 12 + name = "${pname}-${version}"; 13 + 14 + paths = [ indilib ] ++ extraDrivers; 15 + 16 + nativeBuildInputs = [ makeBinaryWrapper ]; 17 + 18 + postBuild = lib.optionalString (extraDrivers != [ ]) '' 19 + rm $out/bin/indiserver 20 + makeBinaryWrapper ${indilib}/bin/indiserver $out/bin/indiserver --set-default INDIPREFIX $out 21 + ''; 22 + 23 + inherit (indilib) meta; 24 + }
+1 -1
pkgs/development/libraries/science/astronomy/indilib/default.nix
··· 81 81 description = "Implementation of the INDI protocol for POSIX operating systems"; 82 82 changelog = "https://github.com/indilib/indi/releases/tag/v${finalAttrs.version}"; 83 83 license = licenses.lgpl2Plus; 84 - maintainers = with maintainers; [ hjones2199 sheepforce ]; 84 + maintainers = with maintainers; [ hjones2199 sheepforce returntoreality ]; 85 85 platforms = platforms.unix; 86 86 }; 87 87 })
+1052 -81
pkgs/development/libraries/science/astronomy/indilib/indi-3rdparty.nix
··· 1 - { stdenv 2 - , lib 3 - , bash 4 - , cmake 5 - , coreutils 6 - , cfitsio 7 - , libusb1 8 - , zlib 9 - , boost 10 - , libnova 11 - , curl 12 - , libjpeg 13 - , gsl 14 - , fftw 15 - , indilib 16 - , libgphoto2 17 - , libraw 18 - , libftdi1 19 - , libdc1394 20 - , gpsd 21 - , ffmpeg 22 - , limesuite 23 - , pkg-config 24 - , zeromq 25 - , version 26 - , src 27 - , withFirmware ? false 28 - , firmware ? null 1 + { 2 + stdenv, 3 + lib, 4 + autoPatchelfHook, 5 + aravis, 6 + bash, 7 + boost, 8 + cmake, 9 + coreutils, 10 + cfitsio, 11 + fetchFromGitHub, 12 + gtest, 13 + libusb1, 14 + libusb-compat-0_1, 15 + zlib, 16 + libnova, 17 + curl, 18 + libjpeg, 19 + gsl, 20 + indilib, 21 + libcamera, 22 + libdc1394, 23 + libdrm, 24 + libexif, 25 + libftdi1, 26 + libgphoto2, 27 + libpng, 28 + libraw, 29 + ninja, 30 + nut, 31 + glib, 32 + systemd, 33 + urjtag, 34 + gpsd, 35 + ffmpeg-headless, 36 + limesuite, 37 + pkg-config, 38 + zeromq, 29 39 }: 30 40 31 41 let 32 - libusb-with-fxload = libusb1.override { withExamples = true;}; 42 + fxload = libusb1.override { withExamples = true; }; 43 + src-3rdparty = fetchFromGitHub { 44 + owner = "indilib"; 45 + repo = "indi-3rdparty"; 46 + rev = "v${indilib.version}"; 47 + hash = "sha256-0M+k3A2Lw9EU9V5bX9dGztmdcJzc71XQZv8srmY5NmY="; 48 + }; 49 + 50 + buildIndi3rdParty = 51 + args@{ 52 + pname, 53 + nativeBuildInputs ? [ ], 54 + propagatedBuildInputs ? [ ], 55 + cmakeFlags ? [ ], 56 + postInstall ? "", 57 + doCheck ? true, 58 + version ? indilib.version, 59 + src ? src-3rdparty, 60 + meta ? { }, 61 + ... 62 + }: 63 + stdenv.mkDerivation ( 64 + args 65 + // { 66 + pname = "indi-3rdparty-${pname}"; 67 + inherit src version; 68 + 69 + sourceRoot = "source/${pname}"; 70 + 71 + cmakeFlags = 72 + [ 73 + "-DCMAKE_INSTALL_LIBDIR=lib" 74 + "-DUDEVRULES_INSTALL_DIR=lib/udev/rules.d" 75 + "-DRULES_INSTALL_DIR=lib/udev/rules.d" 76 + "-DINDI_DATA_DIR=share/indi/" 77 + ] 78 + ++ lib.optional doCheck [ 79 + "-DINDI_BUILD_UNITTESTS=ON" 80 + "-DINDI_BUILD_INTEGTESTS=ON" 81 + ] 82 + ++ cmakeFlags; 83 + 84 + nativeBuildInputs = [ 85 + cmake 86 + ninja 87 + pkg-config 88 + ] ++ nativeBuildInputs; 89 + 90 + checkInputs = [ gtest ]; 91 + 92 + postInstall = '' 93 + mkdir -p $out/lib/udev/rules.d/ 94 + shopt -s nullglob 95 + for i in $propagatedBuildInputs; do 96 + echo "Adding rules for package $i" 97 + for j in $i/{etc,lib}/udev/rules.d/*; do 98 + echo "Linking $j to $out/lib/udev/rules.d/$(basename $j)" 99 + ln -s $j $out/lib/udev/rules.d/$(basename $j) 100 + done 101 + done 102 + ${postInstall} 103 + ''; 104 + 105 + meta = 106 + with lib; 107 + { 108 + homepage = "https://www.indilib.org/"; 109 + description = "Third party drivers for the INDI astronomical software suite"; 110 + changelog = "https://github.com/indilib/indi-3rdparty/releases/tag/v${version}"; 111 + license = licenses.lgpl2Plus; 112 + maintainers = with maintainers; [ 113 + hjones2199 114 + sheepforce 115 + returntoreality 116 + ]; 117 + platforms = platforms.linux; 118 + } 119 + // meta; 120 + } 121 + ); 122 + 123 + libahp-gt = buildIndi3rdParty { 124 + pname = "libahp-gt"; 125 + meta = with lib; { 126 + license = licenses.unfreeRedistributable; 127 + platforms = with platforms; x86_64 ++ aarch64 ++ i686 ++ arm; 128 + }; 129 + }; 130 + 131 + # broken: needs libdfu 132 + libahp-xc = buildIndi3rdParty { 133 + pname = "libahp-xc"; 134 + buildInputs = [ 135 + libusb-compat-0_1 136 + urjtag 137 + libftdi1 138 + ]; 139 + meta = with lib; { 140 + license = licenses.unfreeRedistributable; 141 + broken = true; 142 + platforms = [ ]; 143 + }; 144 + }; 145 + 146 + libaltaircam = buildIndi3rdParty { 147 + pname = "libaltaircam"; 148 + meta = with lib; { 149 + license = licenses.unfreeRedistributable; 150 + platforms = with platforms; x86_64 ++ aarch64 ++ arm; 151 + }; 152 + }; 153 + 154 + libapogee = buildIndi3rdParty { 155 + pname = "libapogee"; 156 + buildInputs = [ 157 + curl 158 + indilib 159 + libusb1 160 + ]; 161 + nativeBuildInputs = [ autoPatchelfHook ]; 162 + cmakeFlags = [ "-DCONF_DIR=etc/" ]; 163 + meta = with lib; { 164 + license = licenses.mpl20; 165 + platforms = platforms.linux; 166 + }; 167 + }; 168 + 169 + libasi = buildIndi3rdParty { 170 + pname = "libasi"; 171 + buildInputs = [ 172 + libusb1 173 + stdenv.cc.cc.lib 174 + ]; 175 + nativeBuildInputs = [ autoPatchelfHook ]; 176 + meta = with lib; { 177 + license = licenses.unfreeRedistributable; 178 + platforms = with platforms; x86_64 ++ aarch64 ++ i686 ++ arm; 179 + }; 180 + }; 181 + 182 + libastroasis = buildIndi3rdParty { 183 + pname = "libastroasis"; 184 + buildInputs = [ stdenv.cc.cc.lib ]; 185 + nativeBuildInputs = [ autoPatchelfHook ]; 186 + meta = with lib; { 187 + license = licenses.unfreeRedistributable; 188 + platforms = with platforms; x86_64 ++ aarch64 ++ arm; 189 + }; 190 + }; 191 + 192 + libatik = buildIndi3rdParty { 193 + pname = "libatik"; 194 + buildInputs = [ 195 + stdenv.cc.cc.lib 196 + libusb1 197 + systemd 198 + libdc1394 199 + ]; 200 + nativeBuildInputs = [ autoPatchelfHook ]; 201 + meta = with lib; { 202 + license = licenses.unfreeRedistributable; 203 + platforms = with platforms; x86_64 ++ aarch64 ++ i686 ++ arm; 204 + }; 205 + }; 206 + 207 + libbressercam = buildIndi3rdParty { 208 + pname = "libbressercam"; 209 + nativeBuildInputs = [ autoPatchelfHook ]; 210 + meta = with lib; { 211 + license = licenses.unfreeRedistributable; 212 + platforms = with platforms; x86_64 ++ aarch64 ++ arm; 213 + }; 214 + }; 215 + 216 + libfishcamp = buildIndi3rdParty { 217 + pname = "libfishcamp"; 218 + 219 + postPatch = '' 220 + substituteInPlace CMakeLists.txt --replace "/lib/firmware" "lib/firmware" 221 + ''; 222 + 223 + buildInputs = [ 224 + indilib 225 + libusb1 226 + ]; 227 + 228 + meta = with lib; { 229 + license = licenses.bsd2; 230 + platforms = platforms.linux; 231 + }; 232 + }; 233 + 234 + libfli = buildIndi3rdParty { 235 + pname = "libfli"; 236 + buildInputs = [ 237 + indilib 238 + libusb1 239 + ]; 240 + meta = with lib; { 241 + license = licenses.bsd2; 242 + platforms = platforms.linux; 243 + }; 244 + }; 245 + 246 + libinovasdk = buildIndi3rdParty { 247 + pname = "libinovasdk"; 248 + buildInputs = [ 249 + stdenv.cc.cc.lib 250 + libusb1 251 + ]; 252 + nativeBuildInputs = [ autoPatchelfHook ]; 253 + meta = with lib; { 254 + license = lib.licenses.unfreeRedistributable; 255 + platforms = with platforms; x86_64 ++ aarch64 ++ arm ++ i686; 256 + }; 257 + }; 258 + 259 + libmallincam = buildIndi3rdParty { 260 + pname = "libmallincam"; 261 + nativeBuildInputs = [ autoPatchelfHook ]; 262 + meta = with lib; { 263 + license = lib.licenses.unfreeRedistributable; 264 + platforms = with platforms; x86_64 ++ aarch64 ++ arm; 265 + }; 266 + }; 267 + 268 + libmeadecam = buildIndi3rdParty { 269 + pname = "libmeadecam"; 270 + buildInputs = [ libusb1 ]; 271 + meta = with lib; { 272 + license = lib.licenses.lgpl21Only; 273 + platforms = platforms.linux; 274 + }; 275 + }; 276 + 277 + libmicam = buildIndi3rdParty { 278 + pname = "libmicam"; 279 + buildInputs = [ libusb1 ]; 280 + nativeBuildInputs = [ autoPatchelfHook ]; 281 + meta = with lib; { 282 + license = lib.licenses.unfreeRedistributable; 283 + platforms = with platforms; x86_64 ++ aarch64 ++ arm ++ i686; 284 + }; 285 + }; 286 + 287 + libnncam = buildIndi3rdParty { 288 + pname = "libnncam"; 289 + nativeBuildInputs = [ autoPatchelfHook ]; 290 + meta = with lib; { 291 + license = lib.licenses.unfreeRedistributable; 292 + platforms = with platforms; x86_64 ++ aarch64 ++ arm; 293 + }; 294 + }; 295 + 296 + libogmacam = buildIndi3rdParty { 297 + pname = "libogmacam"; 298 + nativeBuildInputs = [ autoPatchelfHook ]; 299 + meta = with lib; { 300 + license = lib.licenses.unfreeRedistributable; 301 + platforms = with platforms; x86_64 ++ aarch64 ++ arm; 302 + }; 303 + }; 304 + 305 + libomegonprocam = buildIndi3rdParty { 306 + pname = "libomegonprocam"; 307 + nativeBuildInputs = [ autoPatchelfHook ]; 308 + meta = with lib; { 309 + license = lib.licenses.unfreeRedistributable; 310 + platforms = with platforms; x86_64 ++ aarch64 ++ arm; 311 + }; 312 + }; 313 + 314 + # broken: needs pigpio library 315 + libpigpiod = buildIndi3rdParty { 316 + pname = "libpigpiod"; 317 + buildInputs = [ indilib ]; 318 + meta = with lib; { 319 + license = licenses.unlicense; 320 + broken = true; 321 + platforms = [ ]; 322 + }; 323 + }; 324 + 325 + libpktriggercord = buildIndi3rdParty { 326 + pname = "libpktriggercord"; 327 + 328 + postPatch = '' 329 + substituteInPlace CMakeLists.txt \ 330 + --replace "set (PK_DATADIR /usr/share/pktriggercord)" "set (PK_DATADIR $out/share/pkgtriggercord)" 331 + ''; 332 + 333 + buildInputs = [ indilib ]; 334 + 335 + meta = with lib; { 336 + license = licenses.lgpl3Plus; 337 + platforms = platforms.linux; 338 + }; 339 + }; 340 + 341 + libplayerone = buildIndi3rdParty { 342 + pname = "libplayerone"; 343 + postPatch = '' 344 + substituteInPlace 99-player_one_astronomy.rules \ 345 + --replace "/bin/echo" "${coreutils}/bin/echo" \ 346 + --replace "/bin/sh" "${bash}/bin/sh" 347 + ''; 348 + 349 + buildInputs = [ 350 + stdenv.cc.cc.lib 351 + libusb1 352 + systemd 353 + ]; 354 + nativeBuildInputs = [ autoPatchelfHook ]; 355 + meta = with lib; { 356 + license = lib.licenses.unfreeRedistributable; 357 + platforms = with platforms; x86_64 ++ aarch64 ++ arm; 358 + }; 359 + }; 360 + 361 + libqhy = buildIndi3rdParty { 362 + pname = "libqhy"; 363 + 364 + postPatch = '' 365 + sed -ie 's/LIBQHY_SOVERSION "24"/LIBQHY_SOVERSION "20"/' CMakeLists.txt 366 + substituteInPlace CMakeLists.txt \ 367 + --replace "/lib/firmware" "lib/firmware" 368 + 369 + substituteInPlace 85-qhyccd.rules \ 370 + --replace "/sbin/fxload" "${fxload}/sbin/fxload" \ 371 + --replace "/lib/firmware" "$out/lib/firmware" \ 372 + --replace "/bin/sleep" "${coreutils}/bin/sleep" 373 + 374 + sed -e 's|-D $env{DEVNAME}|-p $env{BUSNUM},$env{DEVNUM}|' -i 85-qhyccd.rules 375 + ''; 376 + 377 + cmakeFlags = [ "-DQHY_FIRMWARE_INSTALL_DIR=\${CMAKE_INSTALL_PREFIX}/lib/firmware/qhy" ]; 378 + 379 + buildInputs = [ 380 + stdenv.cc.cc.lib 381 + libusb1 382 + ]; 383 + nativeBuildInputs = [ autoPatchelfHook ]; 384 + 385 + meta = with lib; { 386 + license = lib.licenses.unfreeRedistributable; 387 + platforms = with platforms; x86_64 ++ aarch64 ++ arm; 388 + }; 389 + }; 390 + 391 + libqsi = buildIndi3rdParty { 392 + pname = "libqsi"; 393 + buildInputs = [ 394 + libftdi1 395 + indilib 396 + ]; 397 + nativeBuildInputs = [ autoPatchelfHook ]; 398 + meta = with lib; { 399 + license = lib.licenses.unfreeRedistributable; 400 + platforms = platforms.linux; 401 + }; 402 + }; 403 + 404 + libricohcamerasdk = buildIndi3rdParty { 405 + pname = "libricohcamerasdk"; 406 + buildInputs = [ 407 + stdenv.cc.cc.lib 408 + libusb1 409 + ]; 410 + nativeBuildInputs = [ autoPatchelfHook ]; 411 + meta = with lib; { 412 + license = lib.licenses.unfreeRedistributable; 413 + platforms = with platforms; x86_64 ++ i686 ++ arm; 414 + }; 415 + }; 416 + 417 + libsbig = buildIndi3rdParty { 418 + pname = "libsbig"; 419 + 420 + postPatch = '' 421 + substituteInPlace CMakeLists.txt --replace "/lib/firmware" "lib/firmware" 422 + substituteInPlace 51-sbig-debian.rules \ 423 + --replace "/sbin/fxload" "${fxload}/sbin/fxload" \ 424 + --replace "/lib/firmware" "$out/lib/firmware" 425 + 426 + sed -e 's|-D $env{DEVNAME}|-p $env{BUSNUM},$env{DEVNUM}|' -i 51-sbig-debian.rules 427 + ''; 428 + 429 + buildInputs = [ libusb1 ]; 430 + nativeBuildInputs = [ autoPatchelfHook ]; 431 + 432 + meta = with lib; { 433 + license = lib.licenses.unfreeRedistributable; 434 + platforms = with platforms; x86_64 ++ aarch64 ++ arm; 435 + }; 436 + }; 437 + 438 + libstarshootg = buildIndi3rdParty { 439 + pname = "libstarshootg"; 440 + nativeBuildInputs = [ autoPatchelfHook ]; 441 + meta = with lib; { 442 + license = lib.licenses.unfreeRedistributable; 443 + platforms = with platforms; x86_64 ++ aarch64 ++ arm; 444 + }; 445 + }; 446 + 447 + libsvbony = buildIndi3rdParty { 448 + pname = "libsvbony"; 449 + buildInputs = [ 450 + stdenv.cc.cc.lib 451 + libusb1 452 + ]; 453 + nativeBuildInputs = [ autoPatchelfHook ]; 454 + meta = with lib; { 455 + license = lib.licenses.unfreeRedistributable; 456 + platforms = with platforms; x86_64 ++ aarch64 ++ arm ++ i686; 457 + }; 458 + }; 459 + 460 + libtoupcam = buildIndi3rdParty { 461 + pname = "libtoupcam"; 462 + nativeBuildInputs = [ autoPatchelfHook ]; 463 + meta = with lib; { 464 + license = lib.licenses.unfreeRedistributable; 465 + platforms = with platforms; x86_64 ++ aarch64 ++ arm; 466 + }; 467 + }; 468 + 469 + libtscam = buildIndi3rdParty { 470 + pname = "libtscam"; 471 + nativeBuildInputs = [ autoPatchelfHook ]; 472 + meta = with lib; { 473 + license = lib.licenses.unfreeRedistributable; 474 + platforms = with platforms; x86_64 ++ aarch64 ++ arm; 475 + }; 476 + }; 477 + 33 478 in 479 + { 34 480 35 - stdenv.mkDerivation rec { 36 - pname = "indi-3rdparty"; 481 + indi-aagcloudwatcher-ng = buildIndi3rdParty { 482 + pname = "indi-aagcloudwatcher-ng"; 483 + buildInputs = [ indilib ]; 484 + }; 485 + 486 + # libahc-xc needs libdfu, which is not packaged 487 + # indi-ahp-xc = buildIndi3rdParty { 488 + # pname = "indi-ahp-xc"; 489 + # buildInputs = [ cfitsio indilib libahp-xc libnova zlib ]; 490 + # meta.platforms = libahp-xc.meta.platforms; 491 + # }; 492 + 493 + indi-aok = buildIndi3rdParty { 494 + pname = "indi-aok"; 495 + buildInputs = [ 496 + indilib 497 + libnova 498 + ]; 499 + }; 500 + 501 + indi-apogee = buildIndi3rdParty { 502 + pname = "indi-apogee"; 503 + buildInputs = [ 504 + cfitsio 505 + indilib 506 + libapogee 507 + zlib 508 + ]; 509 + meta.platforms = libapogee.meta.platforms; 510 + }; 511 + 512 + indi-armadillo-platypus = buildIndi3rdParty { 513 + pname = "indi-armadillo-platypus"; 514 + buildInputs = [ 515 + indilib 516 + libnova 517 + ]; 518 + postPatch = '' 519 + substituteInPlace CMakeLists.txt --replace "/lib/udev/rules.d" "lib/udev/rules.d" 520 + ''; 521 + }; 522 + 523 + indi-asi = buildIndi3rdParty { 524 + pname = "indi-asi"; 525 + buildInputs = [ 526 + cfitsio 527 + indilib 528 + libasi 529 + libusb1 530 + zlib 531 + ]; 532 + meta.platforms = libasi.meta.platforms; 533 + }; 534 + 535 + # broken needs pigpio 536 + indi-asi-power = buildIndi3rdParty { 537 + pname = "indi-asi-power"; 538 + buildInputs = [ indilib ]; 539 + meta.platforms = [ ]; 540 + meta.broken = true; 541 + }; 542 + 543 + indi-astroasis = buildIndi3rdParty { 544 + pname = "indi-astroasis"; 545 + buildInputs = [ 546 + cfitsio 547 + indilib 548 + libastroasis 549 + libusb1 550 + zlib 551 + ]; 552 + meta.platforms = libastroasis.meta.platforms; 553 + }; 554 + 555 + indi-astrolink4 = buildIndi3rdParty { 556 + pname = "indi-astrolink4"; 557 + buildInputs = [ indilib ]; 558 + }; 559 + 560 + indi-astromechfoc = buildIndi3rdParty { 561 + pname = "indi-astromechfoc"; 562 + buildInputs = [ 563 + indilib 564 + zlib 565 + ]; 566 + }; 567 + 568 + indi-atik = buildIndi3rdParty { 569 + pname = "indi-atik"; 570 + buildInputs = [ 571 + cfitsio 572 + indilib 573 + libusb1 574 + zlib 575 + ]; 576 + propagatedBuildInputs = [ libatik ]; 577 + meta.platforms = libatik.meta.platforms; 578 + }; 37 579 38 - inherit version src; 580 + indi-avalon = buildIndi3rdParty { 581 + pname = "indi-avalon"; 582 + buildInputs = [ 583 + indilib 584 + libnova 585 + ]; 586 + }; 39 587 40 - nativeBuildInputs = [ cmake pkg-config ]; 588 + indi-avalonud = buildIndi3rdParty { 589 + pname = "indi-avalonud"; 590 + buildInputs = [ 591 + indilib 592 + libnova 593 + zeromq 594 + ]; 595 + }; 41 596 42 - buildInputs = [ 43 - indilib libnova curl cfitsio libusb1 zlib boost gsl gpsd 44 - libjpeg libgphoto2 libraw libftdi1 libdc1394 ffmpeg fftw 45 - limesuite zeromq 46 - ] ++ lib.optionals withFirmware [ 47 - firmware 48 - ]; 597 + indi-beefocus = buildIndi3rdParty { 598 + pname = "indi-beefocus"; 599 + buildInputs = [ 600 + gtest 601 + indilib 602 + ]; 603 + }; 49 604 50 - postPatch = '' 51 - for f in $(find . -name "CMakeLists.txt"); do 52 - substituteInPlace $f \ 605 + indi-bresserexos2 = buildIndi3rdParty { 606 + pname = "indi-bresserexos2"; 607 + buildInputs = [ 608 + indilib 609 + libnova 610 + ]; 611 + }; 612 + 613 + indi-celestronaux = buildIndi3rdParty { 614 + pname = "indi-celestronaux"; 615 + buildInputs = [ 616 + indilib 617 + gsl 618 + libnova 619 + zlib 620 + ]; 621 + }; 622 + 623 + indi-dreamfocuser = buildIndi3rdParty { 624 + pname = "indi-dreamfocuser"; 625 + buildInputs = [ indilib ]; 626 + }; 627 + 628 + indi-dsi = buildIndi3rdParty { 629 + pname = "indi-dsi"; 630 + buildInputs = [ 631 + gtest 632 + cfitsio 633 + indilib 634 + libusb1 635 + zlib 636 + ]; 637 + 638 + postPatch = '' 639 + substituteInPlace CMakeLists.txt \ 53 640 --replace "/lib/udev/rules.d" "lib/udev/rules.d" \ 54 - --replace "/etc/udev/rules.d" "lib/udev/rules.d" \ 55 641 --replace "/lib/firmware" "lib/firmware" 56 - done 642 + substituteInPlace 99-meadedsi.rules \ 643 + --replace "/sbin/fxload" "${fxload}/sbin/fxload" \ 644 + --replace "/lib/firmware" "$out/lib/firmware" 645 + 646 + sed -e 's|-D $env{DEVNAME}|-p $env{BUSNUM},$env{DEVNUM}|' -i 99-meadedsi.rules 647 + ''; 648 + }; 649 + 650 + indi-duino = buildIndi3rdParty { 651 + pname = "indi-duino"; 652 + buildInputs = [ 653 + curl 654 + indilib 655 + ]; 656 + }; 657 + 658 + indi-eqmod = buildIndi3rdParty { 659 + pname = "indi-eqmod"; 660 + buildInputs = [ 661 + indilib 662 + gsl 663 + gtest 664 + libahp-gt 665 + libnova 666 + zlib 667 + ]; 668 + meta.platforms = libahp-gt.meta.platforms; 669 + }; 670 + 671 + indi-ffmv = buildIndi3rdParty { 672 + pname = "indi-ffmv"; 673 + buildInputs = [ 674 + cfitsio 675 + indilib 676 + libdc1394 677 + zlib 678 + ]; 679 + }; 680 + 681 + indi-fishcamp = buildIndi3rdParty { 682 + pname = "indi-fishcamp"; 683 + buildInputs = [ 684 + cfitsio 685 + indilib 686 + libusb1 687 + zlib 688 + ]; 689 + propagatedBuildInputs = [ libfishcamp ]; 690 + meta.platforms = libfishcamp.meta.platforms; 691 + }; 692 + 693 + indi-fli = buildIndi3rdParty { 694 + pname = "indi-fli"; 695 + buildInputs = [ 696 + cfitsio 697 + indilib 698 + zlib 699 + ]; 700 + propagatedBuildInputs = [ libfli ]; 701 + meta.platforms = libfli.meta.platforms; 702 + }; 703 + 704 + indi-gige = buildIndi3rdParty { 705 + pname = "indi-gige"; 706 + buildInputs = [ 707 + aravis 708 + cfitsio 709 + indilib 710 + glib 711 + zlib 712 + ]; 713 + }; 57 714 58 - substituteInPlace libpktriggercord/CMakeLists.txt \ 59 - --replace "set (PK_DATADIR /usr/share/pktriggercord)" "set (PK_DATADIR $out/share/pkgtriggercord)" 715 + indi-gphoto = buildIndi3rdParty { 716 + pname = "indi-gphoto"; 717 + buildInputs = [ 718 + cfitsio 719 + libjpeg 720 + libraw 721 + libusb1 722 + indilib 723 + zlib 724 + ]; 725 + propagatedBuildInputs = [ libgphoto2 ]; 726 + }; 60 727 61 - sed '1i#include <ctime>' -i indi-duino/libfirmata/src/firmata.cpp # gcc12 62 - ''; 728 + indi-gpsd = buildIndi3rdParty { 729 + pname = "indi-gpsd"; 730 + buildInputs = [ 731 + indilib 732 + gpsd 733 + libnova 734 + zlib 735 + ]; 736 + }; 63 737 64 - cmakeFlags = [ 65 - "-DINDI_DATA_DIR=share/indi" 66 - "-DCMAKE_INSTALL_LIBDIR=lib" 67 - "-DUDEVRULES_INSTALL_DIR=lib/udev/rules.d" 68 - "-DRULES_INSTALL_DIR=lib/udev/rules.d" 69 - ] ++ lib.optionals (!withFirmware) [ 70 - "-DWITH_ATIK=off" 71 - "-DWITH_APOGEE=off" 72 - "-DWITH_DSI=off" 73 - "-DWITH_QHY=off" 74 - "-DWITH_ARMADILLO=off" 75 - "-DWITH_FISHCAMP=off" 76 - "-DWITH_SBIG=off" 77 - ]; 738 + indi-gpsnmea = buildIndi3rdParty { 739 + pname = "indi-gpsnmea"; 740 + buildInputs = [ 741 + indilib 742 + libnova 743 + zlib 744 + ]; 745 + }; 78 746 79 - postFixup = lib.optionalString stdenv.isLinux '' 80 - for f in $out/lib/udev/rules.d/*.rules 81 - do 82 - substituteInPlace $f --replace "/sbin/fxload" "${libusb-with-fxload}/sbin/fxload" \ 83 - --replace "/lib/firmware/" "$out/lib/firmware/" \ 84 - --replace "/bin/sleep" "${coreutils}/bin/sleep" \ 85 - --replace "/bin/cat" "${coreutils}/bin/cat" \ 86 - --replace "/bin/echo" "${coreutils}/bin/echo" \ 87 - --replace "/bin/sh" "${bash}/bin/sh" 88 - done 89 - ''; 747 + indi-inovaplx = buildIndi3rdParty { 748 + pname = "indi-inovaplx"; 749 + buildInputs = [ 750 + cfitsio 751 + indilib 752 + zlib 753 + ]; 754 + propagatedBuildInputs = [ libinovasdk ]; 755 + meta.platforms = libinovasdk.meta.platforms; 756 + }; 90 757 758 + # broken, wants rpicam-apps 759 + indi-libcamera = buildIndi3rdParty { 760 + pname = "indi-libcamera"; 761 + buildInputs = [ 762 + boost 763 + cfitsio 764 + indilib 765 + libcamera 766 + libexif 767 + libdrm 768 + libpng 769 + libusb1 770 + libraw 771 + zlib 772 + ]; 773 + meta.platforms = [ ]; 774 + meta.broken = true; 775 + }; 91 776 92 - meta = with lib; { 93 - homepage = "https://www.indilib.org/"; 94 - description = "Third party drivers for the INDI astronomical software suite"; 95 - changelog = "https://github.com/indilib/indi-3rdparty/releases/tag/v${version}"; 96 - license = licenses.lgpl2Plus; 97 - maintainers = with maintainers; [ hjones2199 sheepforce ]; 98 - platforms = platforms.linux; 777 + indi-limesdr = buildIndi3rdParty { 778 + pname = "indi-limesdr"; 779 + buildInputs = [ 780 + cfitsio 781 + indilib 782 + limesuite 783 + zlib 784 + ]; 99 785 }; 786 + 787 + indi-maxdomeii = buildIndi3rdParty { 788 + pname = "indi-maxdomeii"; 789 + buildInputs = [ 790 + gtest 791 + indilib 792 + libnova 793 + zlib 794 + ]; 795 + }; 796 + 797 + indi-mgen = buildIndi3rdParty { 798 + pname = "indi-mgen"; 799 + buildInputs = [ 800 + cfitsio 801 + indilib 802 + libftdi1 803 + zlib 804 + ]; 805 + }; 806 + 807 + indi-mi = buildIndi3rdParty { 808 + pname = "indi-mi"; 809 + buildInputs = [ 810 + cfitsio 811 + indilib 812 + libusb1 813 + zlib 814 + ]; 815 + propagatedBuildInputs = [ libmicam ]; 816 + }; 817 + 818 + indi-nexdome = buildIndi3rdParty { 819 + pname = "indi-nexdome"; 820 + buildInputs = [ 821 + indilib 822 + libnova 823 + zlib 824 + ]; 825 + }; 826 + 827 + indi-nightscape = buildIndi3rdParty { 828 + pname = "indi-nightscape"; 829 + buildInputs = [ 830 + cfitsio 831 + indilib 832 + libusb1 833 + libftdi1 834 + zlib 835 + ]; 836 + }; 837 + 838 + indi-nut = buildIndi3rdParty { 839 + pname = "indi-nut"; 840 + buildInputs = [ 841 + indilib 842 + nut 843 + zlib 844 + ]; 845 + }; 846 + 847 + indi-ocs = buildIndi3rdParty { 848 + pname = "indi-ocs"; 849 + buildInputs = [ 850 + indilib 851 + libnova 852 + ]; 853 + }; 854 + 855 + indi-orion-ssg3 = buildIndi3rdParty { 856 + pname = "indi-orion-ssg3"; 857 + buildInputs = [ 858 + cfitsio 859 + indilib 860 + libusb1 861 + zlib 862 + ]; 863 + 864 + postPatch = '' 865 + substituteInPlace CMakeLists.txt --replace "/lib/udev/rules.d" "lib/udev/rules.d" 866 + ''; 867 + }; 868 + 869 + indi-pentax = buildIndi3rdParty { 870 + pname = "indi-pentax"; 871 + buildInputs = [ 872 + cfitsio 873 + indilib 874 + libraw 875 + zlib 876 + ]; 877 + propagatedBuildInputs = [ 878 + libpktriggercord 879 + libricohcamerasdk 880 + ]; 881 + 882 + meta.platforms = libricohcamerasdk.meta.platforms; 883 + }; 884 + 885 + indi-playerone = buildIndi3rdParty { 886 + pname = "indi-playerone"; 887 + buildInputs = [ 888 + cfitsio 889 + indilib 890 + libusb1 891 + zlib 892 + ]; 893 + propagatedBuildInputs = [ libplayerone ]; 894 + meta.platforms = libplayerone.meta.platforms; 895 + }; 896 + 897 + indi-qhy = buildIndi3rdParty { 898 + pname = "indi-qhy"; 899 + buildInputs = [ 900 + libqhy 901 + cfitsio 902 + indilib 903 + libnova 904 + libusb1 905 + zlib 906 + ]; 907 + propagatedBuildInputs = [ libqhy ]; 908 + meta.platforms = libqhy.meta.platforms; 909 + }; 910 + 911 + indi-qsi = buildIndi3rdParty { 912 + pname = "indi-qsi"; 913 + buildInputs = [ 914 + cfitsio 915 + indilib 916 + libqsi 917 + zlib 918 + ]; 919 + 920 + postPatch = '' 921 + substituteInPlace CMakeLists.txt --replace "/lib/udev/rules.d" "lib/udev/rules.d" 922 + ''; 923 + 924 + meta.platforms = libqsi.meta.platforms; 925 + }; 926 + 927 + indi-rolloffino = buildIndi3rdParty { 928 + pname = "indi-rolloffino"; 929 + buildInputs = [ 930 + indilib 931 + libnova 932 + zlib 933 + ]; 934 + }; 935 + 936 + indi-rpi-gpio = buildIndi3rdParty { 937 + pname = "indi-rpi-gpio"; 938 + buildInputs = [ 939 + indilib 940 + libpigpiod 941 + ]; 942 + meta.platforms = libpigpiod.meta.platforms; 943 + }; 944 + 945 + indi-rtklib = buildIndi3rdParty { 946 + pname = "indi-rtklib"; 947 + buildInputs = [ 948 + indilib 949 + libnova 950 + libpng 951 + zlib 952 + ]; 953 + }; 954 + 955 + indi-sbig = buildIndi3rdParty { 956 + pname = "indi-sbig"; 957 + buildInputs = [ 958 + cfitsio 959 + indilib 960 + libusb1 961 + zlib 962 + ]; 963 + propagatedBuildInputs = [ libsbig ]; 964 + }; 965 + 966 + indi-shelyak = buildIndi3rdParty { 967 + pname = "indi-shelyak"; 968 + buildInputs = [ indilib ]; 969 + }; 970 + 971 + indi-spectracyber = buildIndi3rdParty { 972 + pname = "indi-spectracyber"; 973 + buildInputs = [ 974 + indilib 975 + libnova 976 + zlib 977 + ]; 978 + }; 979 + 980 + indi-starbook = buildIndi3rdParty { 981 + pname = "indi-starbook"; 982 + buildInputs = [ 983 + curl 984 + indilib 985 + gtest 986 + libnova 987 + ]; 988 + }; 989 + 990 + indi-starbook-ten = buildIndi3rdParty { 991 + pname = "indi-starbook-ten"; 992 + buildInputs = [ 993 + indilib 994 + libnova 995 + ]; 996 + }; 997 + 998 + indi-svbony = buildIndi3rdParty { 999 + pname = "indi-svbony"; 1000 + buildInputs = [ 1001 + cfitsio 1002 + indilib 1003 + zlib 1004 + ]; 1005 + propagatedBuildInputs = [ libsvbony ]; 1006 + 1007 + meta.platforms = libsvbony.meta.platforms; 1008 + }; 1009 + 1010 + indi-sx = buildIndi3rdParty { 1011 + pname = "indi-sx"; 1012 + buildInputs = [ 1013 + cfitsio 1014 + indilib 1015 + libusb1 1016 + ]; 1017 + postPatch = '' 1018 + substituteInPlace CMakeLists.txt --replace "/lib/udev/rules.d" "lib/udev/rules.d" 1019 + ''; 1020 + }; 1021 + 1022 + indi-talon6 = buildIndi3rdParty { 1023 + pname = "indi-talon6"; 1024 + buildInputs = [ 1025 + indilib 1026 + libnova 1027 + ]; 1028 + }; 1029 + 1030 + indi-toupbase = buildIndi3rdParty { 1031 + pname = "indi-toupbase"; 1032 + buildInputs = [ 1033 + cfitsio 1034 + indilib 1035 + zlib 1036 + ]; 1037 + propagatedBuildInputs = [ 1038 + libaltaircam 1039 + libbressercam 1040 + libmallincam 1041 + libmeadecam 1042 + libnncam 1043 + libogmacam 1044 + libomegonprocam 1045 + libstarshootg 1046 + libtoupcam 1047 + libtscam 1048 + ]; 1049 + 1050 + meta.platforms = with lib.platforms; aarch64 ++ x86_64; 1051 + }; 1052 + 1053 + indi-webcam = buildIndi3rdParty { 1054 + pname = "indi-webcam"; 1055 + buildInputs = [ 1056 + cfitsio 1057 + indilib 1058 + ffmpeg-headless 1059 + zlib 1060 + ]; 1061 + }; 1062 + 1063 + indi-weewx-json = buildIndi3rdParty { 1064 + pname = "indi-weewx-json"; 1065 + buildInputs = [ 1066 + curl 1067 + indilib 1068 + ]; 1069 + }; 1070 + 100 1071 }
-82
pkgs/development/libraries/science/astronomy/indilib/indi-firmware.nix
··· 1 - { stdenv 2 - , lib 3 - , bash 4 - , cmake 5 - , cfitsio 6 - , coreutils 7 - , libusb1 8 - , zlib 9 - , boost 10 - , libnova 11 - , curl 12 - , libjpeg 13 - , gsl 14 - , fftw 15 - , indilib 16 - , libgphoto2 17 - , libraw 18 - , libftdi1 19 - , libdc1394 20 - , gpsd 21 - , ffmpeg 22 - , version 23 - , src 24 - , autoPatchelfHook 25 - }: 26 - let 27 - libusb-with-fxload = libusb1.override { withExamples = true;}; 28 - in 29 - stdenv.mkDerivation rec { 30 - pname = "indi-firmware"; 31 - 32 - inherit version src; 33 - 34 - nativeBuildInputs = [ cmake autoPatchelfHook ]; 35 - 36 - buildInputs = [ 37 - indilib libnova curl cfitsio libusb1 zlib boost gsl gpsd 38 - libjpeg libgphoto2 libraw libftdi1 libdc1394 ffmpeg fftw 39 - ]; 40 - 41 - cmakeFlags = [ 42 - "-DINDI_DATA_DIR=\${CMAKE_INSTALL_PREFIX}/share/indi" 43 - "-DCMAKE_INSTALL_LIBDIR=lib" 44 - "-DUDEVRULES_INSTALL_DIR=lib/udev/rules.d" 45 - "-DRULES_INSTALL_DIR=lib/udev/rules.d" 46 - "-DFIRMWARE_INSTALL_DIR=lib/firmware" 47 - "-DQHY_FIRMWARE_INSTALL_DIR=\${CMAKE_INSTALL_PREFIX}/lib/firmware/qhy" 48 - "-DCONF_DIR=etc" 49 - "-DBUILD_LIBS=1" 50 - "-DWITH_PENTAX=off" 51 - "-DWITH_AHP_XC=off" 52 - ]; 53 - 54 - postPatch = '' 55 - for f in {libfishcamp,libsbig,libqhy}/CMakeLists.txt 56 - do 57 - substituteInPlace $f --replace "/lib/firmware" "lib/firmware" 58 - done 59 - ''; 60 - 61 - postFixup = lib.optionalString stdenv.isLinux '' 62 - for f in $out/lib/udev/rules.d/*.rules 63 - do 64 - substituteInPlace "$f" --replace "/sbin/fxload" "${libusb-with-fxload}/sbin/fxload" \ 65 - --replace "/bin/sleep" "${coreutils}/bin/sleep" \ 66 - --replace "/bin/cat" "${coreutils}/bin/cat" \ 67 - --replace "/bin/echo" "${coreutils}/bin/echo" \ 68 - --replace "/bin/sh" "${bash}/bin/sh" \ 69 - --replace "/lib/firmware/" "$out/lib/firmware/" 70 - sed -e 's|-D $env{DEVNAME}|-p $env{BUSNUM},$env{DEVNUM}|' -i "$f" 71 - done 72 - ''; 73 - 74 - meta = with lib; { 75 - homepage = "https://www.indilib.org/"; 76 - description = "Third party firmware for the INDI astronomical software suite"; 77 - changelog = "https://github.com/indilib/indi-3rdparty/releases/tag/v${version}"; 78 - license = licenses.lgpl2Plus; 79 - maintainers = with maintainers; [ hjones2199 sheepforce ]; 80 - platforms = platforms.linux; 81 - }; 82 - }
-29
pkgs/development/libraries/science/astronomy/indilib/indi-full.nix
··· 1 - { stdenv, lib, callPackage, fetchFromGitHub, indilib }: 2 - 3 - let 4 - inherit (indilib) version; 5 - indi-3rdparty-src = fetchFromGitHub { 6 - owner = "indilib"; 7 - repo = "indi-3rdparty"; 8 - rev = "v${version}"; 9 - hash = "sha256-0M+k3A2Lw9EU9V5bX9dGztmdcJzc71XQZv8srmY5NmY="; 10 - }; 11 - indi-firmware = callPackage ./indi-firmware.nix { 12 - inherit version; 13 - src = indi-3rdparty-src; 14 - }; 15 - indi-3rdparty = callPackage ./indi-3rdparty.nix { 16 - inherit version; 17 - src = indi-3rdparty-src; 18 - withFirmware = stdenv.isx86_64 || stdenv.isAarch64; 19 - firmware = indi-firmware; 20 - }; 21 - in 22 - callPackage ./indi-with-drivers.nix { 23 - pname = "indi-full"; 24 - inherit version; 25 - extraDrivers = [ 26 - indi-3rdparty 27 - ] ++ lib.optional (stdenv.isx86_64 || stdenv.isAarch64) indi-firmware 28 - ; 29 - }
-18
pkgs/development/libraries/science/astronomy/indilib/indi-with-drivers.nix
··· 1 - { buildEnv, makeBinaryWrapper, indilib ? indilib, pname ? "indi-with-drivers", version ? null, extraDrivers ? null }: 2 - 3 - buildEnv { 4 - name = "${pname}-${version}"; 5 - paths = [ 6 - indilib 7 - ] 8 - ++ extraDrivers; 9 - 10 - nativeBuildInputs = [ makeBinaryWrapper ]; 11 - 12 - postBuild = '' 13 - makeBinaryWrapper ${indilib}/bin/indiserver $out/bin/indiserver --set-default INDIPREFIX $out 14 - ''; 15 - 16 - 17 - inherit (indilib) meta; 18 - }
+1 -1
pkgs/top-level/all-packages.nix
··· 20942 20942 indicator-sound-switcher = callPackage ../applications/audio/indicator-sound-switcher { }; 20943 20943 20944 20944 indilib = darwin.apple_sdk_11_0.callPackage ../development/libraries/science/astronomy/indilib { }; 20945 - indi-full = callPackage ../development/libraries/science/astronomy/indilib/indi-full.nix { }; 20945 + indi-3rdparty = recurseIntoAttrs (callPackages ../development/libraries/science/astronomy/indilib/indi-3rdparty.nix { }); 20946 20946 20947 20947 inih = callPackage ../development/libraries/inih { }; 20948 20948