cross-posted from: https://programming.dev/post/45148310
Supac - a declarative package manager written in Rust, scriptable in nushell
Supac is a declarative package manager written in Rust fully scriptable in nushell. It’s meant to make it easy to use the native package managers in existing distros without going through the associated headaches of using Nix, while maintaining the ergonomics of structured data in nushell.
Currently supported backends are:
- Archlinux and derivatives
- flatpak
- cargo/cargo-binstall
- uvx (packages only for now)
- rustup toolchains
I daily drive it, and it works well. Feel free to give it a try!
That is cool. I use dcli which is quite nice to use and easily manages dotfiles and scripts. I see you’ve added post install hooks which would allow to manage dotfiles for example.
I really like to use a declarative package manager on a different distro than NixOS. My current install is managed entirely by that tool with specific scripts that modify some config files like fstab for instance.
Ah yes, I came across this when someone else pointed it out as well. The project looks neat, ngl. supac also shares some goals along these lines, but dcli looks more mature. I still prefer supac (it’s my project duh) because supac allows you to script in nushell, which lets you do interactive development (if you use nushell as your shell, which you absolutely should!). I also don’t prefer something like YAML for config, but since it’s extensible with lua, I guess it makes sense to go with a config language as well. I do think the end goals are different, I try to orient supac to be a nix alternative but with integrated package management across different package managers. Also, supac is simpler in principle because a lot of the complexity is shifted to accompanying libs in nushell (such as systemd unit integration).
Not to mention, with a couple of lines of nushell code you can probably import all your yaml configs from dcli into supac :)
Honestly I’d consider using this in combination with NixOS just for the flatpak support
Haha, fair enough. The reason I even created this in the first place was because of how painful nix/nixOS is to use in general. Nushell is far simpler, and much more ergonomic to deal with. Especially with how much it supports structured data.
(just (try (guix (bro))):))
I’d rather just use nix 🙃


