Skip to content

Commit

Permalink
librealsense: add udev rules
Browse files Browse the repository at this point in the history
  • Loading branch information
pbsds committed Oct 13, 2024
1 parent b1ea4a3 commit 7217cf7
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions pkgs/development/libraries/librealsense/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ stdenv.mkDerivation rec {

src = fetchFromGitHub {
owner = "IntelRealSense";
repo = pname;
repo = "librealsense";
rev = "v${version}";
sha256 = "sha256-1ICSJqr5WRePLIHsD3T2L0Nxdn1LWaHqHDJrfTIRl88=";
};
Expand Down Expand Up @@ -80,8 +80,13 @@ stdenv.mkDerivation rec {
postInstall = ''
substituteInPlace $out/lib/cmake/realsense2/realsense2Targets.cmake \
--replace-fail "\''${_IMPORT_PREFIX}/include" "$dev/include"
'' + lib.optionalString enablePython ''
'' + lib.optionalString enablePython ''
cp ../wrappers/python/pyrealsense2/__init__.py $out/${pythonPackages.python.sitePackages}/pyrealsense2
'' + ''
# install udev rules
# based on scripts/setup_udev_rules.sh
install -Dm644 -t $out/lib/udev/rules.d/ ../config/99-realsense-libusb.rules
install -Dm644 -t $out/lib/udev/rules.d/ ../config/99-realsense-d4xx-mipi-dfu.rules
'';

meta = with lib; {
Expand Down

0 comments on commit 7217cf7

Please sign in to comment.