Skip to content

Commit

Permalink
fix: nupm build script, fixes #6
Browse files Browse the repository at this point in the history
  • Loading branch information
FMotalleb committed Aug 22, 2024
1 parent 67c7b92 commit 510c7e2
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions build.nu
Original file line number Diff line number Diff line change
@@ -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)"
Expand Down

0 comments on commit 510c7e2

Please sign in to comment.