mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-28 09:53:10 +00:00
meson: add support for NIXPKGS_CMAKE_PREFIX_PATH
nixpkgs cmake uses NIXPKGS_CMAKE_PREFIX_PATH rather than CMAKE_PREFIX_PATH env to specify module search paths. Add the env variable to meson to allow finding modules via cmake to work.
This commit is contained in:
parent
00cb5c8fc4
commit
f9a7cf528b
12
pkgs/by-name/me/meson/000-nixpkgs-cmake-prefix-path.patch
Normal file
12
pkgs/by-name/me/meson/000-nixpkgs-cmake-prefix-path.patch
Normal file
@ -0,0 +1,12 @@
|
||||
diff --git a/mesonbuild/dependencies/data/CMakePathInfo.txt b/mesonbuild/dependencies/data/CMakePathInfo.txt
|
||||
index 662ec58..4d5f4e4 100644
|
||||
--- a/mesonbuild/dependencies/data/CMakePathInfo.txt
|
||||
+++ b/mesonbuild/dependencies/data/CMakePathInfo.txt
|
||||
@@ -5,6 +5,7 @@ list(APPEND TMP_PATHS_LIST ${CMAKE_PREFIX_PATH})
|
||||
list(APPEND TMP_PATHS_LIST ${CMAKE_FRAMEWORK_PATH})
|
||||
list(APPEND TMP_PATHS_LIST ${CMAKE_APPBUNDLE_PATH})
|
||||
list(APPEND TMP_PATHS_LIST $ENV{CMAKE_PREFIX_PATH})
|
||||
+list(APPEND TMP_PATHS_LIST $ENV{NIXPKGS_CMAKE_PREFIX_PATH})
|
||||
list(APPEND TMP_PATHS_LIST $ENV{CMAKE_FRAMEWORK_PATH})
|
||||
list(APPEND TMP_PATHS_LIST $ENV{CMAKE_APPBUNDLE_PATH})
|
||||
list(APPEND TMP_PATHS_LIST ${CMAKE_SYSTEM_PREFIX_PATH})
|
@ -31,6 +31,9 @@ python3.pkgs.buildPythonApplication rec {
|
||||
};
|
||||
|
||||
patches = [
|
||||
# Nixpkgs cmake uses NIXPKGS_CMAKE_PREFIX_PATH for the search path
|
||||
./000-nixpkgs-cmake-prefix-path.patch
|
||||
|
||||
# In typical distributions, RPATH is only needed for internal libraries so
|
||||
# meson removes everything else. With Nix, the locations of libraries
|
||||
# are not as predictable, therefore we need to keep them in the RPATH.
|
||||
|
Loading…
Reference in New Issue
Block a user