aboutsummaryrefslogtreecommitdiff
path: root/nixpkgs/pkgs/development/libraries/librealsense/py_sitepackage_dir.patch
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/librealsense/py_sitepackage_dir.patch')
-rw-r--r--nixpkgs/pkgs/development/libraries/librealsense/py_sitepackage_dir.patch15
1 files changed, 15 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/libraries/librealsense/py_sitepackage_dir.patch b/nixpkgs/pkgs/development/libraries/librealsense/py_sitepackage_dir.patch
new file mode 100644
index 00000000000..99b567a429e
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/librealsense/py_sitepackage_dir.patch
@@ -0,0 +1,15 @@
+--- a/wrappers/python/CMakeLists.txt
++++ b/wrappers/python/CMakeLists.txt
+@@ -10,11 +10,11 @@
+ if (CMAKE_VERSION VERSION_LESS 3.12)
+ find_package(PythonInterp REQUIRED)
+ find_package(PythonLibs REQUIRED)
+- set(PYTHON_INSTALL_DIR "${CMAKE_INSTALL_LIBDIR}/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/pyrealsense2" CACHE PATH "Installation directory for Python bindings")
++ set(PYTHON_INSTALL_DIR "${XXNIX_PYTHON_SITEPACKAGES}/pyrealsense2" CACHE PATH "Installation directory for Python bindings")
+ set(CMAKECONFIG_PY_INSTALL_DIR "${CMAKE_INSTALL_LIBDIR}/cmake/pyrealsense2")
+ else()
+ find_package(Python REQUIRED COMPONENTS Interpreter Development)
+- set(PYTHON_INSTALL_DIR "${Python_SITEARCH}/pyrealsense2" CACHE PATH "Installation directory for Python bindings")
++ set(PYTHON_INSTALL_DIR "${XXNIX_PYTHON_SITEPACKAGES}/pyrealsense2" CACHE PATH "Installation directory for Python bindings")
+ set(CMAKECONFIG_PY_INSTALL_DIR "${CMAKE_INSTALL_LIBDIR}/cmake/pyrealsense2")
+ endif()