all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [bug#49970] [PATCH] gnu: Add librealsense.
@ 2021-08-09 20:54 phodina via Guix-patches via
  2021-08-10  8:01 ` [bug#49970] [PATCH v2] " phodina via Guix-patches via
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: phodina via Guix-patches via @ 2021-08-09 20:54 UTC (permalink / raw)
  To: 49970

* gnu/packages/video.scm (librealsense): New variable.

diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm
index 399327741f..1d4a8ad3df 100644
--- a/gnu/packages/video.scm
+++ b/gnu/packages/video.scm
@@ -53,6 +53,7 @@
 ;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
 ;;; Copyright © 2020 Hartmut Goebel <h.goebel@crazy-compilers.com>
 ;;; Copyright © 2021 Raghav Gururajan <rg@raghavgururajan.name>
+;;; Copyright © 2021 Petr Hodina <phodina@protonmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -145,6 +146,7 @@
   #:use-module (gnu packages mp3)
   #:use-module (gnu packages ncurses)
   #:use-module (gnu packages networking)
+  #:use-module (gnu packages ninja)
   #:use-module (gnu packages ocr)
   #:use-module (gnu packages pcre)
   #:use-module (gnu packages perl)
@@ -577,6 +579,53 @@ other software.")
       ;; Library.
       license:lgpl3+))))

+(define-public librealsense
+ (package
+  (name "librealsense")
+  (version "2.45.0")
+  (source (origin
+           (method git-fetch)
+           (uri (git-reference
+                 (url "https://github.com/IntelRealSense/librealsense")
+                 (commit (string-append "v" version))))
+           (patches
+            (search-patches "librealsense-remove-network-connectivity.patch"))
+           (file-name (git-file-name name version))
+           (modules '((guix build utils)))
+            (sha256
+             (base32
+              "0aqf48zl7825v7x8c3x5w4d17m4qq377f1mn6xyqzf9b0dnk4i1j"))))
+  (build-system cmake-build-system)
+  (arguments
+       `(#:tests? #f
+         #:configure-flags (list "-DBUILD_EXAMPLES=ON"
+                                 "-DBUILD_GRAPHICAL_EXAMPLES=ON"
+                                 "-DINTERNET_CONNECTION=OFF"
+                                 "-DCHECK_FOR_UPDATES=OFF")
+         #:phases
+           (modify-phases %standard-phases
+            ;; more convenient than manually invoking setup_udev_rules.sh
+            ;; and substituting the path in the script
+            (add-after 'install 'copy-udev-rules
+              (lambda* (#:key outputs #:allow-other-keys)
+               (let ((out (assoc-ref outputs "out")))
+               (mkdir-p (string-append out "/etc/udev/rules.d"))
+               (copy-file "config/99-realsense-libusb.rules"
+                          (string-append out
+                           "/etc/udev/rules.d/99-realsense-libusb.rules"))))))))
+  (native-inputs `(("pkg-config" ,pkg-config)
+                   ("ninja" ,ninja)))
+  (inputs `(("glfw" ,glfw)
+            ("gtk+" ,gtk+)
+            ("libusb" ,libusb)
+            ("glu" ,glu)))
+  (synopsis "Intel RealSense SDK")
+  (description "Intel RealSense SDK 2.0 is a cross-platform library for
+Intel RealSense depth cameras (D400 & L500 series and the SR300) and the
+T265 tracking camera.")
+  (home-page "https://github.com/IntelRealSense/librealsense")
+  (license license:gpl3)))
+
 (define-public tslib
   (package
     (name "tslib")
--
2.32.0




^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2021-09-18 12:48 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-09 20:54 [bug#49970] [PATCH] gnu: Add librealsense phodina via Guix-patches via
2021-08-10  8:01 ` [bug#49970] [PATCH v2] " phodina via Guix-patches via
2021-09-18  8:05 ` [bug#49970] Patch status phodina via Guix-patches via
2021-09-18 11:12 ` [bug#49970] [PATCH] gnu: Add librealsense Liliana Marie Prikler
2021-09-18 11:47   ` phodina via Guix-patches via
2021-09-18 12:02     ` Liliana Marie Prikler
2021-09-18 12:46       ` phodina via Guix-patches via

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.