Package Management System Manager - Generate, build, and publish packages for multiple package managers from a single YAML configuration.
Documentation: pmsm.readthedocs.io (built with MkDocs; sources under docs/).
- Single Configuration File - Define all package managers in one
pmsm.yamlfile - Multiple Package Managers - Support for APT/DEB, APK (Alpine), AUR (Arch), and Nix
- Generate, Build, and Publish - Complete workflow from definition to publication
- Per-Package Manager Customization - Override fields and scripts for each package manager
- Interactive Account Setup - Guided setup for package manager publishing credentials
- GitHub Actions Ready - Automated package generation and publishing on releases
# Enter development shell
nix develop
# Build the project
nix build
# Run the binary
./result/bin/pmsm --helpcargo build --release
./target/release/pmsm --help-
Initialize a configuration file:
pmsm init
-
Edit
pmsm.yamlwith your package details:package: name: myapp version: "1.0.0" description: "My application" homepage: "https://github.com/user/myapp" license: "GPL-3.0" maintainer: name: "Your Name" email: "your@email.com" build: source: "https://github.com/user/myapp/releases/download/v{version}/myapp-{version}.tar.gz" build: "make" install: "make install DESTDIR=\"$pkgdir\"" package_managers: apt: enabled: true aur: enabled: true
-
Validate your configuration:
pmsm validate
-
Generate package definition files:
pmsm generate
-
Build packages:
pmsm build
-
Setup publishing credentials:
pmsm setup --manager apt pmsm setup --manager aur
-
Publish packages:
pmsm publish
The pmsm.yaml file supports the following structure:
package:
name: myapp # Package name
version: "1.0.0" # Package version
description: "..." # Package description
homepage: "https://..." # Homepage URL
license: "GPL-3.0" # License identifier
maintainer:
name: "Name"
email: "email@example.com"build:
source: "https://..." # Source URL (supports {version}, {name} templates)
build: "make" # Build command (optional)
prepare: "./configure" # Prepare command (optional)
install: "make install" # Install command (optional)dependencies:
runtime: # Runtime dependencies
- libc6
- openssl
build: # Build-time dependencies
- gcc
- makeEach package manager can be customized:
package_managers:
apt:
enabled: true
section: "utils" # Debian section
priority: "optional" # Debian priority
depends: # Override dependencies
- libssl-dev
build: "make" # Override build script
install: "make install" # Override install script
apk:
enabled: true
depends:
- openssl-dev
aur:
enabled: true
pkgrel: 1 # Package release number
arch: ["x86_64"] # Supported architectures
nix:
enabled: true
flake: false # true: generate flake.nix + nix/overlay.nix; build with `nix build`
# flake_package: "my-app" # optional pkgs.<name> (default: package.name)
# nixpkgs_input: "github:NixOS/nixpkgs/nixos-unstable"
buildInputs: # Nix build inputs
- opensslCreate an example pmsm.yaml configuration file.
pmsm init [--output pmsm.yaml]Validate the configuration file.
pmsm validate [--config pmsm.yaml]Generate package definition files for enabled package managers.
pmsm generate [--config pmsm.yaml] [--manager apt]Build packages for enabled package managers.
pmsm build [--config pmsm.yaml] [--manager apt]Publish packages to package manager repositories.
pmsm publish [--config pmsm.yaml] [--manager apt]Interactive setup wizard for package manager publishing credentials.
pmsm setup [--manager apt]For a full walkthrough (secrets, triggers, and alignment with .github/workflows/pmsm-action.yml), see docs/github-actions.md or the hosted GitHub Actions page.
Add the workflow to your repository at .github/workflows/pmsm.yml:
name: PMSM Package Generation and Publishing
on:
release:
types: [published]
workflow_dispatch:
jobs:
generate-and-publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- run: cargo build --release
- run: ./target/release/pmsm generate
- run: ./target/release/pmsm build
- run: ./target/release/pmsm publish
env:
LAUNCHPAD_USERNAME: ${{ secrets.LAUNCHPAD_USERNAME }}
AUR_USERNAME: ${{ secrets.AUR_USERNAME }}
CACHIX_AUTH_TOKEN: ${{ secrets.CACHIX_AUTH_TOKEN }}- Generates:
debian/control,debian/changelog,debian/rules - Builds:
.debpackages usingdpkg-buildpackage - Publishes: Launchpad PPA using
dput
- Generates:
APKBUILD - Builds:
.apkpackages usingabuild - Publishes: Alpine repository (manual upload required)
- Generates:
PKGBUILD - Builds:
.pkg.tar.xzpackages usingmakepkg - Publishes: AUR via SSH using git
- Generates:
default.nixderivation; withnix.flake: true, alsoflake.nixandnix/overlay.nix - Builds:
nix-build default.nixby default, ornix buildwhen flakes are enabled - Publishes: Cachix or Nixpkgs (manual PR)
With flake: true, run nix flake lock once in your repo so flake.lock pins nixpkgs. End users can add your overlay and install the package, for example:
{ pkgs, ... }: let
version = "1.0.0";
mySrc = pkgs.fetchFromGitHub {
owner = "you";
repo = "yourrepo";
rev = "v${version}";
sha256 = "<hash from nix-prefetch-github or similar>";
};
in {
nixpkgs.overlays = [
(import "${mySrc}/nix/overlay.nix")
];
environment.systemPackages = [ pkgs."your-flake-package" ];
}Use the same string for pkgs."..." as flake_package in pmsm.yaml (defaults to package.name). Hyphenated names must be quoted as shown.
The following variables can be used in configuration strings:
{name}- Package name{version}- Package version{description}- Package description{homepage}- Homepage URL{license}- License identifier{maintainer_name}- Maintainer name{maintainer_email}- Maintainer email
Example:
build:
source: "https://github.com/user/{name}/releases/download/v{version}/{name}-{version}.tar.gz"# Enter development shell
nix develop
# Build the project
nix build
# Run tests
cargo test# Build
cargo build
# Run
cargo run -- --help
# Test
cargo test
# Format
cargo fmt
# Lint
cargo clippyGPL-3.0