diff options
| author | Efraim Flashner <efraim@flashner.co.il> | 2026-03-16 18:42:57 +0200 |
|---|---|---|
| committer | Efraim Flashner <efraim@flashner.co.il> | 2026-03-30 10:36:22 +0300 |
| commit | 93318a0e10ff514b0a97b7a6595bb2da1e5f6da6 (patch) | |
| tree | dfd676c57a1fbb65a75f03e049d64a6ada7d0384 /gnu/packages/networking.scm | |
| parent | be02d52548f243b8022c3c57ba246585675076c8 (diff) | |
gnu: Add libcamera-minimal.
* gnu/packages/networking.scm (libcamera-minimal): New variable.
(libcamera): Inherit from libcamera-minimal.
Change-Id: I3096a615b6a461bdfea4bd26e7cbefd6a1080328
Diffstat (limited to 'gnu/packages/networking.scm')
| -rw-r--r-- | gnu/packages/networking.scm | 81 |
1 files changed, 47 insertions, 34 deletions
diff --git a/gnu/packages/networking.scm b/gnu/packages/networking.scm index bfdb8de2fd1..200209fbb9d 100644 --- a/gnu/packages/networking.scm +++ b/gnu/packages/networking.scm | |||
| @@ -478,9 +478,9 @@ Raspberry Pi ISP (PiSP), consisting of the Frontend and Backend hardware | |||
| 478 | components.") | 478 | components.") |
| 479 | (license license:bsd-2))) | 479 | (license license:bsd-2))) |
| 480 | 480 | ||
| 481 | (define-public libcamera | 481 | (define-public libcamera-minimal |
| 482 | (package | 482 | (package |
| 483 | (name "libcamera") | 483 | (name "libcamera-minimal") |
| 484 | (version "0.6.0") | 484 | (version "0.6.0") |
| 485 | (source | 485 | (source |
| 486 | (origin | 486 | (origin |
| @@ -491,27 +491,18 @@ components.") | |||
| 491 | (commit (string-append "v" version)))) | 491 | (commit (string-append "v" version)))) |
| 492 | (patches (search-patches | 492 | (patches (search-patches |
| 493 | "libcamera-ipa_manager-disable-signature-verification.patch")) | 493 | "libcamera-ipa_manager-disable-signature-verification.patch")) |
| 494 | (file-name | 494 | (file-name (git-file-name "libcamera" version)) |
| 495 | (git-file-name name version)) | ||
| 496 | (sha256 | 495 | (sha256 |
| 497 | (base32 "0g6rphsa1hi9y22l2vw5cj75bf57clq3cggviwd1bnjhpp61nryc")))) | 496 | (base32 "0g6rphsa1hi9y22l2vw5cj75bf57clq3cggviwd1bnjhpp61nryc")))) |
| 498 | (build-system meson-build-system) | 497 | (build-system meson-build-system) |
| 499 | (outputs '("out" "doc" "gst" "tools")) | ||
| 500 | (arguments | 498 | (arguments |
| 501 | (list #:glib-or-gtk? #t ; To wrap binaries and/or compile schemas | 499 | (list #:glib-or-gtk? #t ; To wrap binaries and/or compile schemas |
| 502 | #:configure-flags | 500 | #:configure-flags |
| 503 | #~(list (string-append "-Dbindir=" #$output:tools "/bin") | 501 | #~(list "-Dudev=enabled" |
| 504 | "-Dudev=enabled" | 502 | "-Dv4l2=enabled" |
| 505 | "-Dv4l2=true" | ||
| 506 | "-Dtest=true") | 503 | "-Dtest=true") |
| 507 | #:phases | 504 | #:phases |
| 508 | #~(modify-phases %standard-phases | 505 | #~(modify-phases %standard-phases |
| 509 | (add-after 'unpack 'set-sphinx-theme | ||
| 510 | ;; sphinx_book_theme requires node for packaging | ||
| 511 | ;; use the default sphinx theme instead | ||
| 512 | (lambda _ | ||
| 513 | (substitute* "Documentation/conf.py.in" | ||
| 514 | (("sphinx_book_theme") "alabaster")))) | ||
| 515 | (add-after 'unpack 'disable-gstreamer-tests | 506 | (add-after 'unpack 'disable-gstreamer-tests |
| 516 | ;; these require /dev/udmabuf | 507 | ;; these require /dev/udmabuf |
| 517 | (lambda _ | 508 | (lambda _ |
| @@ -530,24 +521,10 @@ components.") | |||
| 530 | (substitute* "test/meson.build" | 521 | (substitute* "test/meson.build" |
| 531 | ((".*'name': 'file'.*") | 522 | ((".*'name': 'file'.*") |
| 532 | ""))))) | 523 | ""))))) |
| 533 | #~()) | 524 | #~())))) |
| 534 | (add-after 'install 'move-doc-and-gst | ||
| 535 | (lambda _ | ||
| 536 | (mkdir-p (string-append #$output:doc "/share")) | ||
| 537 | (rename-file (string-append #$output "/share/doc") | ||
| 538 | (string-append #$output:doc "/share/doc")) | ||
| 539 | (mkdir-p (string-append #$output:gst "/lib")) | ||
| 540 | (rename-file | ||
| 541 | (string-append #$output "/lib/gstreamer-1.0") | ||
| 542 | (string-append #$output:gst "/lib/gstreamer-1.0"))))))) | ||
| 543 | (native-inputs | 525 | (native-inputs |
| 544 | (list googletest | 526 | (list pkg-config |
| 545 | graphviz ;for 'dot' | ||
| 546 | doxygen | ||
| 547 | pkg-config | ||
| 548 | python-wrapper | 527 | python-wrapper |
| 549 | python-sphinx | ||
| 550 | python-sphinxcontrib-doxylink | ||
| 551 | python-pyyaml | 528 | python-pyyaml |
| 552 | python-packaging)) | 529 | python-packaging)) |
| 553 | (inputs | 530 | (inputs |
| @@ -556,15 +533,12 @@ components.") | |||
| 556 | glib | 533 | glib |
| 557 | gstreamer | 534 | gstreamer |
| 558 | gst-plugins-base | 535 | gst-plugins-base |
| 559 | libevent | ||
| 560 | libjpeg-turbo | 536 | libjpeg-turbo |
| 561 | libtiff | ||
| 562 | libyaml | 537 | libyaml |
| 563 | libyuv | 538 | libyuv |
| 564 | pybind11-2 | 539 | pybind11-2 |
| 565 | python-jinja2 | 540 | python-jinja2 |
| 566 | python-ply | 541 | python-ply) |
| 567 | qtbase) | ||
| 568 | ;; libpisp is only needed for the rpi/pisp pipeline on ARM. | 542 | ;; libpisp is only needed for the rpi/pisp pipeline on ARM. |
| 569 | (if (target-arm?) | 543 | (if (target-arm?) |
| 570 | (list libpisp) | 544 | (list libpisp) |
| @@ -575,6 +549,45 @@ Android, and ChromeOS.") | |||
| 575 | (home-page "https://libcamera.org/") | 549 | (home-page "https://libcamera.org/") |
| 576 | (license license:lgpl2.1+))) | 550 | (license license:lgpl2.1+))) |
| 577 | 551 | ||
| 552 | ;; Drop the documentation and the sample utilities. | ||
| 553 | ;; The README.rst gives a nice list of what packages are required. | ||
| 554 | (define-public libcamera | ||
| 555 | (package/inherit libcamera-minimal | ||
| 556 | (name "libcamera") | ||
| 557 | (outputs '("out" "doc" "gst" "tools")) | ||
| 558 | (arguments | ||
| 559 | (substitute-keyword-arguments (package-arguments libcamera-minimal) | ||
| 560 | ((#:configure-flags flags #~'()) | ||
| 561 | #~(cons (string-append "-Dbindir=" #$output:tools "/bin") | ||
| 562 | #$flags)) | ||
| 563 | ((#:phases phases #~%standard-phases) | ||
| 564 | #~(modify-phases #$phases | ||
| 565 | (add-after 'unpack 'set-sphinx-theme | ||
| 566 | ;; sphinx_book_theme requires node for packaging | ||
| 567 | ;; use the default sphinx theme instead | ||
| 568 | (lambda _ | ||
| 569 | (substitute* "Documentation/conf.py.in" | ||
| 570 | (("sphinx_book_theme") "alabaster")))) | ||
| 571 | (add-after 'install 'move-doc-and-gst | ||
| 572 | (lambda _ | ||
| 573 | (mkdir-p (string-append #$output:doc "/share")) | ||
| 574 | (rename-file (string-append #$output "/share/doc") | ||
| 575 | (string-append #$output:doc "/share/doc")) | ||
| 576 | (mkdir-p (string-append #$output:gst "/lib")) | ||
| 577 | (rename-file | ||
| 578 | (string-append #$output "/lib/gstreamer-1.0") | ||
| 579 | (string-append #$output:gst "/lib/gstreamer-1.0")))))))) | ||
| 580 | (native-inputs | ||
| 581 | (modify-inputs (package-native-inputs libcamera-minimal) | ||
| 582 | (append googletest | ||
| 583 | doxygen | ||
| 584 | graphviz | ||
| 585 | python-sphinx | ||
| 586 | python-sphinxcontrib-doxylink))) | ||
| 587 | (inputs | ||
| 588 | (modify-inputs (package-inputs libcamera-minimal) | ||
| 589 | (append libevent libtiff qtbase))))) | ||
| 590 | |||
| 578 | (define-public libnice | 591 | (define-public libnice |
| 579 | (package | 592 | (package |
| 580 | (name "libnice") | 593 | (name "libnice") |
