Skip to content

Package managers

APT/DEB (Debian/Ubuntu)

  • Generates: debian/control, debian/changelog, debian/rules
  • Builds: .deb packages using dpkg-buildpackage
  • Publishes: Launchpad PPA using dput

APK (Alpine Linux)

  • Generates: APKBUILD
  • Builds: .apk packages using abuild
  • Publishes: Alpine repository (manual upload required)

AUR (Arch User Repository)

  • Generates: PKGBUILD
  • Builds: .pkg.tar.xz packages using makepkg
  • Publishes: AUR via SSH using git

Nix

  • Generates: default.nix derivation; with nix.flake: true, also flake.nix and nix/overlay.nix
  • Builds: nix-build default.nix by default, or nix build when flakes are enabled
  • Publishes: Cachix or Nixpkgs (manual PR)

Flakes

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.