Merge pull request #127547 from prusnak/librealsense

librealsense: enable build on aarch64-darwin and aarch64-linux

authored by

Sandro and committed by
GitHub
6567f8e5 67745e9c

+20 -4
+20 -4
pkgs/development/libraries/librealsense/default.nix
··· 1 - { stdenv, config, lib, fetchFromGitHub, cmake, libusb1, ninja, pkg-config, gcc 1 + { stdenv 2 + , config 3 + , lib 4 + , fetchFromGitHub 5 + , fetchpatch 6 + , cmake 7 + , libusb1 8 + , ninja 9 + , pkg-config 10 + , gcc 2 11 , cudaSupport ? config.cudaSupport or false, cudatoolkit 3 - , enablePython ? false, pythonPackages ? null }: 12 + , enablePython ? false, pythonPackages ? null 13 + }: 4 14 5 15 assert cudaSupport -> cudatoolkit != null; 6 16 assert enablePython -> pythonPackages != null; ··· 24 34 ] ++ lib.optional cudaSupport cudatoolkit 25 35 ++ lib.optionals enablePython (with pythonPackages; [python pybind11 ]); 26 36 27 - patches = lib.optionals enablePython [ 37 + patches = [ 38 + # fix build on aarch64-darwin 39 + # https://github.com/IntelRealSense/librealsense/pull/9253 40 + (fetchpatch { 41 + url = "https://github.com/IntelRealSense/librealsense/commit/beb4c44debc8336de991c983274cad841eb5c323.patch"; 42 + sha256 = "05mxsd2pz3xrvywdqyxkwdvxx8hjfxzcgl51897avz4v2j89pyq8"; 43 + }) 28 44 ./py_sitepackage_dir.patch 29 45 ./py_pybind11_no_external_download.patch 30 46 ]; ··· 57 73 homepage = "https://github.com/IntelRealSense/librealsense"; 58 74 license = licenses.asl20; 59 75 maintainers = with maintainers; [ brian-dawn ]; 60 - platforms = [ "i686-linux" "x86_64-linux" "x86_64-darwin" ]; 76 + platforms = platforms.unix; 61 77 }; 62 78 }