Correct way to install packages with Nixpacks

This didn't work for me:
[phases.setup]
nixPkgs = ["...", "shared-mime-info"]
[phases.setup]
nixPkgs = ["...", "shared-mime-info"]
But this did:
[phases.setup]
nixPkgs = ["...", "shared-mime-info"]
cmds = ["...", "sudo apt-get install -y shared-mime-info"]
[phases.setup]
nixPkgs = ["...", "shared-mime-info"]
cmds = ["...", "sudo apt-get install -y shared-mime-info"]
Should't they be equivalent/redundant?
10 Replies
Percy
Percy2y ago
Project ID: 469de9a8-9b00-491b-8798-ca03699b97ab
Percy
Percy2y ago
To install packages with Nixpacks, use the command npm or pnpm depending on your workspace setup.
⚠️ experimental feature
dwaynemac
dwaynemacOP2y ago
project ID: 469de9a8-9b00-491b-8798-ca03699b97ab
Finn
Finn2y ago
You can try aptPkgs instead. nixPkgs pulls deps from the nixos store or whatnot So they arnt equivalent
Adam
Adam2y ago
nixpackages and apt packages are different, yes. Replace nixPkgs with aptPkgs and it should work perfectly
dwaynemac
dwaynemacOP2y ago
thanks!
dwaynemac
dwaynemacOP2y ago
Using aptPkgs seems to work but not reflected on this summary.
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
dwaynemac
dwaynemacOP2y ago
🥴sorry. Time to rest and get a bit of sun
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
Want results from more Discord servers?
Add your server