summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEfraim Flashner <efraim@flashner.co.il>2026-03-16 18:42:57 +0200
committerEfraim Flashner <efraim@flashner.co.il>2026-03-30 10:36:22 +0300
commit93318a0e10ff514b0a97b7a6595bb2da1e5f6da6 (patch)
treedfd676c57a1fbb65a75f03e049d64a6ada7d0384
parentbe02d52548f243b8022c3c57ba246585675076c8 (diff)
gnu: Add libcamera-minimal.
* gnu/packages/networking.scm (libcamera-minimal): New variable. (libcamera): Inherit from libcamera-minimal. Change-Id: I3096a615b6a461bdfea4bd26e7cbefd6a1080328
-rw-r--r--gnu/packages/networking.scm81
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
components.")
(license license:bsd-2)))
-(define-public libcamera
+(define-public libcamera-minimal
(package
- (name "libcamera")
+ (name "libcamera-minimal")
(version "0.6.0")
(source
(origin
@@ -491,27 +491,18 @@ components.")
(commit (string-append "v" version))))
(patches (search-patches
"libcamera-ipa_manager-disable-signature-verification.patch"))
- (file-name
- (git-file-name name version))
+ (file-name (git-file-name "libcamera" version))
(sha256
(base32 "0g6rphsa1hi9y22l2vw5cj75bf57clq3cggviwd1bnjhpp61nryc"))))
(build-system meson-build-system)
- (outputs '("out" "doc" "gst" "tools"))
(arguments
(list #:glib-or-gtk? #t ; To wrap binaries and/or compile schemas
#:configure-flags
- #~(list (string-append "-Dbindir=" #$output:tools "/bin")
- "-Dudev=enabled"
- "-Dv4l2=true"
+ #~(list "-Dudev=enabled"
+ "-Dv4l2=enabled"
"-Dtest=true")
#:phases
#~(modify-phases %standard-phases
- (add-after 'unpack 'set-sphinx-theme
- ;; sphinx_book_theme requires node for packaging
- ;; use the default sphinx theme instead
- (lambda _
- (substitute* "Documentation/conf.py.in"
- (("sphinx_book_theme") "alabaster"))))
(add-after 'unpack 'disable-gstreamer-tests
;; these require /dev/udmabuf
(lambda _
@@ -530,24 +521,10 @@ components.")
(substitute* "test/meson.build"
((".*'name': 'file'.*")
"")))))
- #~())
- (add-after 'install 'move-doc-and-gst
- (lambda _
- (mkdir-p (string-append #$output:doc "/share"))
- (rename-file (string-append #$output "/share/doc")
- (string-append #$output:doc "/share/doc"))
- (mkdir-p (string-append #$output:gst "/lib"))
- (rename-file
- (string-append #$output "/lib/gstreamer-1.0")
- (string-append #$output:gst "/lib/gstreamer-1.0")))))))
+ #~()))))
(native-inputs
- (list googletest
- graphviz ;for 'dot'
- doxygen
- pkg-config
+ (list pkg-config
python-wrapper
- python-sphinx
- python-sphinxcontrib-doxylink
python-pyyaml
python-packaging))
(inputs
@@ -556,15 +533,12 @@ components.")
glib
gstreamer
gst-plugins-base
- libevent
libjpeg-turbo
- libtiff
libyaml
libyuv
pybind11-2
python-jinja2
- python-ply
- qtbase)
+ python-ply)
;; libpisp is only needed for the rpi/pisp pipeline on ARM.
(if (target-arm?)
(list libpisp)
@@ -575,6 +549,45 @@ Android, and ChromeOS.")
(home-page "https://libcamera.org/")
(license license:lgpl2.1+)))
+;; Drop the documentation and the sample utilities.
+;; The README.rst gives a nice list of what packages are required.
+(define-public libcamera
+ (package/inherit libcamera-minimal
+ (name "libcamera")
+ (outputs '("out" "doc" "gst" "tools"))
+ (arguments
+ (substitute-keyword-arguments (package-arguments libcamera-minimal)
+ ((#:configure-flags flags #~'())
+ #~(cons (string-append "-Dbindir=" #$output:tools "/bin")
+ #$flags))
+ ((#:phases phases #~%standard-phases)
+ #~(modify-phases #$phases
+ (add-after 'unpack 'set-sphinx-theme
+ ;; sphinx_book_theme requires node for packaging
+ ;; use the default sphinx theme instead
+ (lambda _
+ (substitute* "Documentation/conf.py.in"
+ (("sphinx_book_theme") "alabaster"))))
+ (add-after 'install 'move-doc-and-gst
+ (lambda _
+ (mkdir-p (string-append #$output:doc "/share"))
+ (rename-file (string-append #$output "/share/doc")
+ (string-append #$output:doc "/share/doc"))
+ (mkdir-p (string-append #$output:gst "/lib"))
+ (rename-file
+ (string-append #$output "/lib/gstreamer-1.0")
+ (string-append #$output:gst "/lib/gstreamer-1.0"))))))))
+ (native-inputs
+ (modify-inputs (package-native-inputs libcamera-minimal)
+ (append googletest
+ doxygen
+ graphviz
+ python-sphinx
+ python-sphinxcontrib-doxylink)))
+ (inputs
+ (modify-inputs (package-inputs libcamera-minimal)
+ (append libevent libtiff qtbase)))))
+
(define-public libnice
(package
(name "libnice")