diff options
author | Alyssa Ross <hi@alyssa.is> | 2022-12-06 19:57:55 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2023-02-08 13:48:30 +0000 |
commit | bf3aadfdd39aa197e18bade671fab6726349ffa4 (patch) | |
tree | 698567af766ed441d757b57a7b21e68d4a342a2b /nixpkgs/pkgs/development/libraries/librealsense | |
parent | f4afc5a01d9539ce09e47494e679c51f80723d07 (diff) | |
parent | 99665eb45f58d959d2cb9e49ddb960c79d596f33 (diff) | |
download | nixlib-bf3aadfdd39aa197e18bade671fab6726349ffa4.tar nixlib-bf3aadfdd39aa197e18bade671fab6726349ffa4.tar.gz nixlib-bf3aadfdd39aa197e18bade671fab6726349ffa4.tar.bz2 nixlib-bf3aadfdd39aa197e18bade671fab6726349ffa4.tar.lz nixlib-bf3aadfdd39aa197e18bade671fab6726349ffa4.tar.xz nixlib-bf3aadfdd39aa197e18bade671fab6726349ffa4.tar.zst nixlib-bf3aadfdd39aa197e18bade671fab6726349ffa4.zip |
Merge commit '99665eb45f58d959d2cb9e49ddb960c79d596f33'
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/librealsense')
-rw-r--r-- | nixpkgs/pkgs/development/libraries/librealsense/default.nix | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/nixpkgs/pkgs/development/libraries/librealsense/default.nix b/nixpkgs/pkgs/development/libraries/librealsense/default.nix index 0011dc2f6e11..135969210d36 100644 --- a/nixpkgs/pkgs/development/libraries/librealsense/default.nix +++ b/nixpkgs/pkgs/development/libraries/librealsense/default.nix @@ -8,11 +8,17 @@ , ninja , pkg-config , gcc -, cudaSupport ? config.cudaSupport or false, cudatoolkit +, mesa +, gtk3 +, glfw +, libGLU +, curl +, cudaSupport ? config.cudaSupport or false, cudaPackages ? {} , enablePython ? false, pythonPackages ? null +, enableGUI ? false, }: -assert cudaSupport -> cudatoolkit != null; +assert cudaSupport -> (cudaPackages?cudatoolkit && cudaPackages.cudatoolkit != null); assert enablePython -> pythonPackages != null; stdenv.mkDerivation rec { @@ -31,8 +37,9 @@ stdenv.mkDerivation rec { buildInputs = [ libusb1 gcc.cc.lib - ] ++ lib.optional cudaSupport cudatoolkit - ++ lib.optionals enablePython (with pythonPackages; [python pybind11 ]); + ] ++ lib.optional cudaSupport cudaPackages.cudatoolkit + ++ lib.optionals enablePython (with pythonPackages; [ python pybind11 ]) + ++ lib.optionals enableGUI [ mesa gtk3 glfw libGLU curl ]; patches = [ # fix build on aarch64-darwin @@ -53,8 +60,9 @@ stdenv.mkDerivation rec { cmakeFlags = [ "-DBUILD_EXAMPLES=ON" - "-DBUILD_GRAPHICAL_EXAMPLES=OFF" - "-DBUILD_GLSL_EXTENSIONS=OFF" + "-DBUILD_GRAPHICAL_EXAMPLES=${lib.boolToString enableGUI}" + "-DBUILD_GLSL_EXTENSIONS=${lib.boolToString enableGUI}" + "-DCHECK_FOR_UPDATES=OFF" # activated by BUILD_GRAPHICAL_EXAMPLES, will make it download and compile libcurl ] ++ lib.optionals enablePython [ "-DBUILD_PYTHON_BINDINGS:bool=true" "-DXXNIX_PYTHON_SITEPACKAGES=${placeholder "out"}/${pythonPackages.python.sitePackages}" @@ -72,7 +80,7 @@ stdenv.mkDerivation rec { description = "A cross-platform library for IntelĀ® RealSenseā¢ depth cameras (D400 series and the SR300)"; homepage = "https://github.com/IntelRealSense/librealsense"; license = licenses.asl20; - maintainers = with maintainers; [ brian-dawn ]; + maintainers = with maintainers; [ brian-dawn pbsds ]; platforms = platforms.unix; }; } |