pkgx icon indicating copy to clipboard operation
pkgx copied to clipboard

Reduce installation dependencies

Open kishaningithub opened this issue 3 months ago • 4 comments

Problem

I am trying to install pkgx into an EC2 machine using the following command

curl --retry 3 -fsSL https://pkgx.sh | sh

but the installation gets stuck over here

installing: /usr/local/bin/pkgx
######################################################################## 100.0%
pkgx 2.7.0
Download ▱▱▰▰▰▰ [02:45] 3/6
  https://deno.land/x/[email protected]/mod.ts

This is happening because as of now deno.land is not in my org's allow list.

Proposal (Thoughts)

This made me think, if pkgx is a standalone binary why does it need to install packages from else were? Can this dependency be removed altogether? If not, can you refer libpkgx from jsr instead of deno.land?

kishaningithub avatar Nov 14 '25 05:11 kishaningithub

this is almost certainly from one of pkgm, mash, or dev, all of which are written in typescript with deno. if all you want is pkgx, then one of the options starting here will give you a simpler system:

https://docs.pkgx.sh/pkgx/installing-pkgx#download-manually https://docs.pkgx.sh/pkgx/installing-pkgx#cargo

jhheider avatar Nov 14 '25 17:11 jhheider

I need pkgm to provision tools at the system level in the CI environment

kishaningithub avatar Nov 15 '25 01:11 kishaningithub

Since deno can also generate static binaries, can that be used ?

Also can you point me to the location of this install script in the source code?

kishaningithub avatar Nov 15 '25 01:11 kishaningithub

Since deno can also generate static binaries, can that be used ?

it could be done. deno scripting was used for flexibility.

Also can you point me to the location of this install script in the source code?

the install script is here: https://github.com/pkgxdev/setup/blob/main/installer.sh

you might find using the shim variant of pkgm solves this easily, if you don't want to set your LD_LIBRARY_PATH: pkgx shim [email protected]. that uses the "classic" shim scripts which manage their own environment. https://github.com/pkgxdev/pkgm#shims

jhheider avatar Nov 15 '25 01:11 jhheider