diff options
| author | zzbaron <[email protected]> | 2025-09-16 13:14:04 -0400 |
|---|---|---|
| committer | zzbaron <[email protected]> | 2025-09-16 13:14:04 -0400 |
| commit | b4389c8c7505729113cc05df865dde9ebb42d0b3 (patch) | |
| tree | b0ad83ebf63958996c7cb113cba892cc07c647c3 | |
| parent | 600a1817c2f6af5a59a8f9c6f759e6b34f300468 (diff) | |
code cleanup
| -rw-r--r-- | xmake/modules/package/manager/nix/find_package.lua | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/xmake/modules/package/manager/nix/find_package.lua b/xmake/modules/package/manager/nix/find_package.lua index d9c2a3197..3718bffe1 100644 --- a/xmake/modules/package/manager/nix/find_package.lua +++ b/xmake/modules/package/manager/nix/find_package.lua @@ -207,8 +207,6 @@ function _validate_package_in_store_path(store_path, name) if os.isdir(libdir) then local libfiles = os.files(path.join(libdir, "lib" .. name .. ".*")) if #libfiles > 0 then - for _, libfile in ipairs(libfiles) do - end return true end end @@ -263,7 +261,6 @@ function _find_in_store_path(store_path, name) path.join(libdir, "*.a"), path.join(libdir, "*.dylib*")) - local found_libs = {} for _, libfile in ipairs(libfiles) do local filename = path.filename(libfile) local linkname = filename:match("^lib(.+)%.so") or @@ -274,7 +271,6 @@ function _find_in_store_path(store_path, name) if linkname == name or linkname:find(name) then table.insert(result.links, linkname) table.insert(result.libfiles, libfile) - found_libs[linkname] = true end if filename:endswith(".a") then @@ -369,6 +365,9 @@ function main(name, opt) for i, store_path in ipairs(nix_paths) do local result = _find_in_store_path(store_path, actual_name) if result then + if opt.verbose or option.get("verbose") then + print("Found " .. actual_name .. " in: " .. store_path) + end return result end end @@ -389,6 +388,9 @@ function main(name, opt) if storepath and os.isdir(storepath) then local result = _find_in_store_path(storepath, actual_name) if result then + if opt.verbose or option.get("verbose") then + print("Built and found " .. actual_name .. " in: " .. storepath) + end return result end end |
