From 510c7e2b94dd1b9c4200172f5b8d8a521a5aa25a Mon Sep 17 00:00:00 2001 From: FMotalleb Date: Thu, 22 Aug 2024 11:16:53 +0330 Subject: [PATCH] fix: nupm build script, fixes #6 --- build.nu | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/build.nu b/build.nu index 9b011bb..375f003 100644 --- a/build.nu +++ b/build.nu @@ -1,14 +1,12 @@ use std log -def main [package_file: path] { - let repo_root = $package_file | path dirname +def main [package_file: path = nupm.nuon] { + let repo_root = (ls -f $package_file | first | get name | path dirname) let install_root = $env.NUPM_HOME | path join "plugins" let name = open ($repo_root | path join "Cargo.toml") | get package.name - let features = [] - | if ($nu.os-info.name == "linux") { $in | append enforce-daemon } else { $in } - | if ($nu.os-info.name == "linux" and ($env.XDG_SESSION_TYPE? == "wayland")) {$in | append use-wayland } else { $in } + let features = [] let cmd = $"cargo install --path ($repo_root) --root ($install_root) --features=($features | str join ",")" log info $"building plugin using: (ansi blue)($cmd)(ansi reset)"