Skip to content

Commit

Permalink
archlinux basic adaptation (#6)
Browse files Browse the repository at this point in the history
* archlinux basic adaptation

* archlinux nodejs and pnpm

* archlinux nvm via aur

* fix: archlinux nvm

* archlinux nvm fix and tip

* optimize nvm.lua for archlinux

* nvm uninstall for archlinux

* nvm archlinux always latest

* archlinux optionally reverts to the original installation

* archlinux update nvm

- specify the version for archlinux nvm
- add the archlinux init-nvm.sh script to bashrc

* archlinux nvm: optional script-based installation

* pmwrapper.lua: add a comma at the end of all lines

* nvm archlinux: change aur impl to pmwrapper.lua

* fix nvm.lua

- uninstall via aur pmwrapper
- fix bashrc grammar
  • Loading branch information
MoYingJi authored Dec 28, 2024
1 parent ad76eb5 commit 2d2746a
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pkgs/m/mdbook.lua
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ package = {
sha256 = "9ef07fd288ba58ff3b99d1c94e6d414d431c9a61fdb20348e5beb74b823d546b"
},
},
archlinux = { ref = "debain" },
ubuntu = { ref = "debain" },
archlinux = { ref = "debain" },
},
}

Expand Down
2 changes: 1 addition & 1 deletion pkgs/n/nodejs.lua
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ package = {
},
},
debian = { ref = "ubuntu" },
archlinux = { ref = "ubuntu"},
archlinux = { ref = "ubuntu" },
},
}

Expand Down
3 changes: 2 additions & 1 deletion pkgs/n/nvm.lua
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ package = {
sha256 = nil,
},
},
archlinux = { ref = "ubuntu" },
},
}

Expand Down Expand Up @@ -57,7 +58,7 @@ function install()
os.exec("sh " .. pkginfo.install_file)
utils.append_bashrc([[
# nvm config by xlings-xim
export NVM_DIR="$HOME/.nvm"
if [ "$NVM_DIR" == "" ]; then export NVM_DIR="$HOME/.nvm"; fi
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
]])
Expand Down
2 changes: 1 addition & 1 deletion pkgs/p/pnpm.lua
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ package = {
["9.15.0"] = { },
},
debian = { ref = "ubuntu" },
archlinux = { ref = "ubuntu"},
archlinux = { ref = "ubuntu" },
},
}

Expand Down
16 changes: 16 additions & 0 deletions pmwrapper.lua
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,36 @@ pmwrapper = {
["java"] = { ref = "openjdk8" },
["java8"] = { ref = "openjdk8" },
["jdk8"] = { ref = "openjdk8" },
["mdbook"] = {
archlinux = {"pacman", "mdbook"},
},
["nodejs"] = {
archlinux = {"pacman", "nodejs"},
},
["nvm"] = {
archlinux = {"aur", "https://aur.archlinux.org/nvm.git"},
},
["openjdk"] = { ref = "openjdk8" },
["openjdk8"] = {
windows = {"winget", "AdoptOpenJDK.OpenJDK.8"},
ubuntu = {"apt", "openjdk-8-jdk"},
archlinux = {"pacman", "jdk8-openjdk"},
},
["pnpm"] = {
archlinux = {"pacman", "pnpm"},
},
["python"] = {
windows = {"winget", "Python.Python.3.13"},
ubuntu = {"apt", "python3"},
archlinux = {"pacman", "python"},
},
["rust"] = {
archlinux = {"pacman", "rustup"},
},
["vim"] = {
windows = {"winget", "vim.vim"},
ubuntu = {"apt", "vim"},
archlinux = {"pacman", "vim"}
},
["visual-studio"] = { ref = "vs2022" },
["vs2022"] = {
Expand Down

0 comments on commit 2d2746a

Please sign in to comment.