diff options
| author | zzbaron <[email protected]> | 2025-09-11 10:58:06 -0400 |
|---|---|---|
| committer | zzbaron <[email protected]> | 2025-09-11 10:58:06 -0400 |
| commit | 3d600264dc2ffab5deffc04237dba407deff6245 (patch) | |
| tree | 8477394b7a524ccbb6044dbffcdbfb618b0be5a8 /xmake/modules/detect | |
| parent | a5223dbe4e7c2eef1592b36d9450e5044b8c17b6 (diff) | |
nix support: adjustments pointed out by ruki
Diffstat (limited to 'xmake/modules/detect')
| -rw-r--r-- | xmake/modules/detect/tools/find_nix.lua | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/xmake/modules/detect/tools/find_nix.lua b/xmake/modules/detect/tools/find_nix.lua index 33a056320..52531e029 100644 --- a/xmake/modules/detect/tools/find_nix.lua +++ b/xmake/modules/detect/tools/find_nix.lua @@ -45,10 +45,15 @@ function main(opt) local nix_paths = { "/nix/var/nix/profiles/default/bin", -- multi-user installation "/home/" .. (os.getenv("USER") or "user") .. "/.nix-profile/bin", -- single user installation - "/run/current-system/sw/bin", -- only on nixos, maybe separate nix logic from nixos logic? "/usr/local/bin", -- default path of nix when compiling nix from source } + + -- NixOS-specific paths + if linuxos.name() == "nixos" then + table.insert(nix_paths, "/run/current-system/sw/bin") + end + opt.paths = table.wrap(opt.paths) for _, nixpath in ipairs(nix_paths) do table.insert(opt.paths, nixpath) end |
