Supac is a declarative package manager written in rust, and configurable in nushell. It is meant to emulate nix but without the headaches that come along with it. It does not maintain packages by itself but rather hooks with the existing package managers on your system to configure them in a declarative fashion.
cargo install supac
# alternately, if you use cargo-binstall
cargo binstall supacInstall via git
cargo install --git https://codeberg.org/innocentzer0/supac.gitTo build it manually, clone the repo, cd into it, and run cargo build
Join us at matrix for discussion and support!
Right now the following package managers are supported:- Arch Linux (any package manager that respects pacman’s flags)
- Flatpak
- Cargo (both native toolchain and cargo-binstall)
- rustup
This is the order in which I wish to include package manager support:
rustup- uv/pipx
- opam
- npm
- dnf
Allow dry-run- update command
- Show unmanaged packages
- Add support for more package managers
- Config validation
- allow setting config options for config-files whose config can be represented in a format parse-able by nushell
- list active backends
- Allow disabling backends
- rebuild command
clean-cache commandFlatpak systemwide installations=pacman= support for archallow use of cargo-binstall for cargo installations
This is more or less a priority list on how I’d make updates to the repo. If you have any special requests, please open an issue! Please note that codeberg issues take precedence.
An example is provided in the example_config folder.
A brief rundown:
/home/user/.config/supac/package.nushould return a nu record with one record per backend- For
Arch, the record consists of a list of package records, each package labelled by its name and an optional post hook after execution. - For
Cargo, again, a list of package records, with each record labelled by its package name, an optional git remote, an optional post hook, optionally specifying the following:all_features: whether the binary should be installed with all the optional opt-in featuresno_default_features: whether the binary should be installed without any feature whatsoeverfeatures: a list of features that the binary supports that it should be installed with
- For
Flatpak, it parses three subrecords:Pinned: This is not compulsory, but this is a list of pinned runtimes, optionally specifying the branch and the architecture, along with a post hook and a systemwide cofigPackages: Like the other two, this specifies a list of package records. These may optionally contain the remote from which to install, whether to install systemwide, and a post hookRemotes: Useless as of now, will be useful once therebuildcommand is released
- For
Rustup, it parses a record, where each field’s name is the toolchain that you wish to install, and the entries are a list of target triples and a list of components. All targets must be explicitly stated. Default components can be skipped.
Anything except the package name is not needed in a package specification. The file config.nu
in the same directory should return a record giving out the configuration. As of now, only three
config options are implemented, which are fairly self-descriptive.
Copyright (c) 2025 innocentzer0 (on codeberg)
This project is licensed under the terms of either Apache 2.0 or MIT license at your option.
SPDX-License-Identifier: MIT OR Apache-2.0
Copyright (c) 2025 innocentzer0 (on codeberg)
Copyrights in this project are retained by contributors. No copyright assignment is required to contribute to this project.
Except as otherwise noted (below and/or in individual files), this project is licensed under the Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0) or the MIT license, (LICENSE-MIT or http://opensource.org/licenses/MIT), at your option.