summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzzbaron <[email protected]>2025-09-17 15:47:25 -0400
committerzzbaron <[email protected]>2025-09-17 15:47:25 -0400
commit80fcef347511caa2efac1b5a169b166622d0024a (patch)
treeaef5b187341df7445fb7fda6095a14be8f10d19a
parentb4389c8c7505729113cc05df865dde9ebb42d0b3 (diff)
adjustments pointed out by ruki
-rw-r--r--xmake/modules/package/manager/nix/find_package.lua5
1 files changed, 2 insertions, 3 deletions
diff --git a/xmake/modules/package/manager/nix/find_package.lua b/xmake/modules/package/manager/nix/find_package.lua
index 3718bffe1..8f3a909e8 100644
--- a/xmake/modules/package/manager/nix/find_package.lua
+++ b/xmake/modules/package/manager/nix/find_package.lua
@@ -85,7 +85,6 @@ function _get_shell_build_inputs()
return all_paths
end
-
-- Environment variables to check for nix store paths
local env_vars = {
"PATH",
@@ -196,7 +195,7 @@ function _validate_package_in_store_path(store_path, name)
-- Look for exact match, or package name in the store path
local name_match = store_name:find(search_name, 1, true) or
- store_name:find(search_name:gsub("%-", "%%-")) -- handle hyphens
+ store_name:find((search_name:gsub("%-", "%%-"))) -- handle hyphens
if name_match then
return true
@@ -268,7 +267,7 @@ function _find_in_store_path(store_path, name)
filename:match("^lib(.+)%.dylib")
if linkname then
- if linkname == name or linkname:find(name) then
+ if linkname == name or linkname:find(name, 1, true) then
table.insert(result.links, linkname)
table.insert(result.libfiles, libfile)
end