Skip to content

InnocentZero/supac

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

80 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Supac - A declarative package manager

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.

Install

cargo install supac
# alternately, if you use cargo-binstall
cargo binstall supac

Install via git

cargo install --git https://codeberg.org/innocentzer0/supac.git

To build it manually, clone the repo, cd into it, and run cargo build

Chat

Join us at matrix for discussion and support!

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

Checklist of package managers

This is the order in which I wish to include package manager support:

  • rustup
  • uv/pipx
  • opam
  • npm
  • dnf

Upcoming features

  • 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 command
  • Flatpak systemwide installations
  • =pacman= support for arch
  • allow 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.

Package declaration

An example is provided in the example_config folder.

A brief rundown:

  • /home/user/.config/supac/package.nu should 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 features
    • no_default_features: whether the binary should be installed without any feature whatsoever
    • features: 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 cofig
    • Packages: 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 hook
    • Remotes: Useless as of now, will be useful once the rebuild command 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 notice

Short version

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

Long version

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.

About

No description, website, or topics provided.

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published