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!

all 2 comments

sorted by: hot top controversial new old
[+] 3 points 9 months ago (1 child)
  • [–] [S] 1 point 9 months ago

    Yep, it should cover you alright! I use all the 5 package managers mentioned here (hence the order :p). Scriptability and post hooks in particular make it even better (cloning/copying dots, activating systemd units, other stuff, etc).

  • source
  • parent
  • 6 comments in c/linux@lemmy.ml view that post
    [–] 5 points 9 months ago (3 children)

    Honestly I'd consider using this in combination with NixOS just for the flatpak support

  • source
  • hideshow 3 child comments
  • [–] [S] 4 points 9 months ago (2 children)

    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.

  • source
  • parent
  • hideshow 2 child comments
  • [–] 1 point 9 months ago (1 child)

    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.

  • source
  • hideshow 1 child comment
  • [–] [S] 1 point 9 months ago

    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 :)

  • source
  • parent
  • 4 comments in c/rust@programming.dev view that post
    [–] 2 points 9 months ago (1 child)

    This is kinda like mise but also works with your distro's package manager?

  • source
  • hideshow 1 child comment
  • [–] [S] 4 points 9 months ago

    From what I understand (I've never used mise), mise is meant for programming environments and tools. Supac works with your distribution's package manager to manage all your system packages and also language toolchains like rustup and uvx (uvx backend doesn't manage toolchains yet, it's being developed though).

    What it doesn't manage are programming environments, basically, you cannot use it to spawn something like a nix devshell. Hope it makes sense. This is more meant to be along the lines of something like nix, but friendlier and easier.

  • source
  • parent
  • [–] 2 points 9 months ago (1 child)

    Very cool. This one has piqued my interest more than dcli. I'll be checking it out when I get the chance

  • source
  • hideshow 1 child comment
  • [–] [S] 2 points 9 months ago

    Dcli looks interesting! The long term goal of supac is to support many different relevant package managers as backends, so that all sorts of packages and language toolchains can be managed. Besides, nushell being a scripting AND shell language massively helps with that.

  • source
  • parent
  • 4 comments in c/linux@lemmy.world view that post
    [–] 1 point 9 months ago
    [–] 1 point 8 months ago* (2 children)

    this seems pretty cool. i might even give this a go.

    for anyone reading this, are there any dot file managers that would work well in tandem with supac? or just any dot file manager recommends?

  • source
  • hideshow 2 child comments
  • [–] [S] 2 points 8 months ago* (1 child)

    Thanks for the kind words! For dotfiles, I used org-babel for a long time, keeping a literate config. Now I use a git repo to hold everything with a script to pull in whatever I think is necessary. That said, one of the long term plans for supac is to add dotfile management as well, something like nix-wrapper does it. Although it will certainly take some time before we get there.

  • source
  • parent
  • hideshow 1 child comment
  • 2 comments in c/linux@programming.dev view that post
    [–] 3 points 9 months ago* (1 child)

    Now this looks interesting. I personally use chezmoi and scripts to install and manage the apps that I want. Having a dedicated manager would be ideal.

    Edit: it says that disabling backends is currently not supported, does that mean that it doesn't worn in environments without pacman for example?

  • source
  • hideshow 1 child comment
  • [–] [S] 2 points 9 months ago

    Right now, you can do it in two ways:

    • Don't have the Arch key at all. supac will silently skip it.
    • You can write a small wrapper in package.nu that checks the presence of your preferred arch package manager in $env.PATH, if it's there then it'll insert the key and value, and not otherwise.

    I'd mostly go with 1 unless you're sharing your non-arch config with an arch config on two separate machines.

  • source
  • parent